420chan now has a web-based IRC client available, right here
Leave these fields empty (spam trap):
Name
You can leave this blank to post anonymously, or you can create a Tripcode by using the float Name#Password
A subject is required when posting a new thread
Subject
Comment
[*]Italic Text[/*]
[**]Bold Text[/**]
[~]Taimapedia Article[/~]
[%]Spoiler Text[/%]
>Highlight/Quote Text
[pre]Preformatted & Monospace text[/pre]
1. Numbered lists become ordered lists
* Bulleted lists become unordered lists
File

Sandwich


Community Updates

420chan now supports HTTPS! If you find any issues, you may report them in this thread
Do It Yourself Career by Priscilla Fenderlock - Sun, 15 May 2016 21:04:28 EST ID:a2qE3/F5 No.35629 Ignore Report Reply Quick Reply
File: 1463360668560.jpg -(416769B / 407.00KB, 1920x1200) Thumbnail displayed, click image for full size. 416769
What are some realistic expectations for getting a career from learning to program yourself? How easy/hard?

Scenario is someone in their late 20s with a bachelor's in an unrelated field. I work in IT support.

I want to get my A+ certification on my own and then go from there but I'm more interested in learning programming.

Any milestones I should be aiming for? General advice?
4 posts omitted. Click Reply to view.
>>
Phineas Dobberlin - Thu, 19 May 2016 15:24:33 EST ID:9QSfnS0r No.35646 Ignore Report Quick Reply
I mean you could pick a topic, write software, put it on github then make it as useful as possible while you are learning.
Of course you have to do actual programming for that so it might not be your thing.

Sorry for the snark, but it cracks me up that large portion of the IT world now thinks you learn programming by memorizing design patterns and CS concepts instead of writing software that is useful.
>>
Tetragrammaton !!Gm+jdoM7 - Thu, 02 Jun 2016 23:21:19 EST ID:9X4Si/jy No.35690 Ignore Report Quick Reply
As someone who has run a small web firm and currently works at a larger one having only been writing code seriously for about a year and three quarters, web development is a gold mine. You can learn for free, get all kinds of jobs at any pay scale and work scale locally or online, make your own hours, and when you get better and have a solid portfolio you can hire on with an established firm making $50k a year with benefits. Extremely good career choice if you can drink lots of coffee and don't mind ruining your health by sitting and staring into a light box for 8 hours or more a day.
>>
Nigel Movingcocke - Sat, 04 Jun 2016 08:34:50 EST ID:J0cP3q/Q No.35699 Ignore Report Quick Reply
>>35690
If you really really think that method will work I will drop everything, work part time instead of fulltime and get a roomate. Tell me what to do with my life.
>>
Nell Grimhall - Tue, 07 Jun 2016 22:38:16 EST ID:c9gFFBFz No.35713 Ignore Report Quick Reply
>>35690
>web design
>good career

yeah okay. or you could learn real programming and make 100k+ per year. As an intern in college I was making $45 an hour working on pattern matching / machine learning for BLE wearables.
>>
Albert Fobblestut - Wed, 08 Jun 2016 12:50:51 EST ID:hLgfGbIj No.35714 Ignore Report Quick Reply
>>35713
Most real programmers probably make more than most web designers, but certainly aren't pulling in six figures.


hELLo by PHP same preview - Mon, 06 Jun 2016 18:21:11 EST ID:677AANqx No.35704 Ignore Report Reply Quick Reply
File: 1465251671801.jpg -(252410B / 246.49KB, 1920x1080) Thumbnail displayed, click image for full size. 252410
Hello, I'm programming this site in PHP (nette framework) and I've got a problem with FB previews. Althought all the title, keywords, preview images are set correctly, it always shows with Homepage data. I even look it up in source code, and everything is what it should be. Any experts that know what to do? I can provide more invo. I would really appreciate the help. I need to finish in a few hours. I do it for money and am not any good in php.
>>
PHP same preview - Mon, 06 Jun 2016 18:42:38 EST ID:677AANqx No.35705 Ignore Report Quick Reply
Edit: Skype shows everything correctly, FB not
>>
Edwin Lightdale - Mon, 06 Jun 2016 22:08:42 EST ID:/F8uz4kq No.35706 Ignore Report Quick Reply
Nobody knows what you're talking about.
>>
Eugene Billingshaw - Tue, 07 Jun 2016 14:19:09 EST ID:UbSntvr/ No.35711 Ignore Report Quick Reply
>>35706
Yea, it's gibberish.
I started to write a useful reply then got to
>I need to finish in a few hours.
lol
>>
Cedric Ferringdetch - Tue, 07 Jun 2016 21:01:59 EST ID:OL0r/8Kb No.35712 Ignore Report Quick Reply
Is there a live URL of the site we can look at?

Make sure the og:url meta tag is also different on each page. That's all I can think of.


Save file encrypter -feedback welcome by Stphan Floffingbridge - Fri, 15 Apr 2016 17:20:35 EST ID:SWJfiJ9j No.35491 Ignore Report Reply Quick Reply
File: 1460755235253.jpg -(55202B / 53.91KB, 480x480) Thumbnail displayed, click image for full size. 55202
Just a little thing I put together to discourage save-file editing. Any notes are appreciated.

import java.util.Random;
public class OpCrypter {
private static final int lock = 32;
public static String decryptString(String cryptoString){
cryptoString = cryptoString.replaceAll("[a-zA-z]", "&");
String[] crdata = cryptoString.split("&");
String decryptedString = "";
int key=0;
for(String line : crdata){
if(line.startsWith("@")){
key = Integer.parseInt(line.substring(1))/lock;
} else {
decryptedString+=getCharTable()[(Integer.parseInt(line)/key)];
Comment too long. Click here to view the full text.
10 posts omitted. Click Reply to view.
>>
Was ur Key Gen System Based Off My Post? - Fri, 27 May 2016 04:41:57 EST ID:+6d1kOO+ No.35666 Ignore Report Quick Reply
>>35491

function GenMedPass()
{
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,/\?";

for( var i=0; i < 12; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));

password.value=(text);
}
function GenStrongPass()
{
var text = "";
Comment too long. Click here to view the full text.
>>
Eugene Duckville - Fri, 27 May 2016 15:28:41 EST ID:sLq6zDO/ No.35672 Ignore Report Quick Reply
>>35666
>possible.length
Fuck of BrU, you can't even do arrays right.
>>
Hugh Murdbury - Fri, 27 May 2016 18:09:16 EST ID:+6d1kOO+ No.35673 Ignore Report Quick Reply
>>35672
u cant even spell off right ;-0
>>
Nathaniel Blebberspear - Sun, 29 May 2016 15:27:07 EST ID:8bzTFDIQ No.35676 Ignore Report Quick Reply
1464550027972.jpg -(71795B / 70.11KB, 1300x918) Thumbnail displayed, click image for full size.
learn to use pastebin please
>>
John Havingfield - Mon, 30 May 2016 00:06:02 EST ID:znriAcds No.35677 Ignore Report Quick Reply
>>35491
>>int key = r.nextInt(9999)+99;
yeah just randomizing the key without saving it somewhere... that's gonna go smooth are you sure this ain't copy pasta code?


Twitterbot pointers? by Shit Bungold - Mon, 16 May 2016 10:29:03 EST ID:gxLmjRi7 No.35632 Ignore Report Reply Quick Reply
File: 1463408943784.gif -(46501B / 45.41KB, 382x380) Thumbnail displayed, click image for full size. 46501
Hello, total noob here.

I'm looking to set up a twitterbot, but the no coding required ones are just a touch too basic for what I'm trying to do, which is a sort of database one, wherein I can have a variety of posts with variables in them that can be pulled from a list, like:

(VarType1) text (VarType2) text (VarType3)
(VarType1) text (VarType3) text
(VarType1) text (VarType4) text (VarType2) text (VarType2)

Etcetc. The ones I've found are random words taken from columns in order which is not what I want.

I'm not asking for someone to build me the darn thing, just point me to what can teach me how to build this myself, or anything like that. Thank you in advance/apologies if this is the wrong place.

Pic unrelated.
>>
Basil Homblewell - Mon, 16 May 2016 19:39:30 EST ID:JhIhwAJD No.35634 Ignore Report Quick Reply
>>35632
What exactly do you need help with?

You probably want to start out with being able to post to twitter, you can do this by using their REST API
https://dev.twitter.com/rest/reference/post/statuses/update

After you can do that you need to be able to build your string for your tweet. From your description I am not quite sure what you want to do.
>>
Barnaby Criddleshit - Sat, 28 May 2016 08:33:43 EST ID:9QSfnS0r No.35674 Ignore Report Quick Reply
>>35632
I'd install a generic twitter bot, like this one:
https://github.com/rhiever/TwitterFollowBot

And then simply write a program to generate the strings to post yourself.

If you just want to get some words from a spreadsheet you can easily do this with the csv python library.


Cleaning a wordy script by OP - Sun, 22 May 2016 20:07:07 EST ID:A1ajpRPI No.35655 Ignore Report Reply Quick Reply
File: 1463962027732.jpg -(43722B / 42.70KB, 349x350) Thumbnail displayed, click image for full size. 43722
I apologize in advance is this is not the correct community for this.


Skippable intro: Been in a help desk role for some time and through turnover and other reasons I've slowly been adding more advanced tasks to my role. Now effectively in a hybrid help desk, Jr admin role I'm trying to earn my stripes by replacing a lot of tedious repetitive tasks with scripts. These scripts have generally been short, usually just a few lines. I've been using nagios to stay on top of things. Anything under sun basically. I'm seeing some messy scripting that could be a good opportunity to improve and get some muscle memory going.


I'm using this in a nagios check to check the status of printers throughout the office.

Right now, check runs fine, I just grabbed it off of the nagios exchange. This is for my own edification. I just see that as a chance to learn and every attempt to shorten scripts like this usually just becomes a messy waste of time that breaks the check.



Here it is:

#!/bin/bash
Comment too long. Click here to view the full text.
>>
Emma Depperdale - Sun, 22 May 2016 22:37:47 EST ID:YeHb+A49 No.35656 Ignore Report Quick Reply
>I just see that as a chance to learn and every attempt to shorten scripts like this usually just becomes a messy waste of time that breaks the check

That may be because short is an awful goal. Short is good for one liners, not complex scripts. What you really want is easily understood and not painful to maintain. And unfortunately, this is a shell script and there isn't much room for software engineering practices.
>>
Beatrice Mindlepudge - Thu, 26 May 2016 13:02:16 EST ID:mfkLzG/S No.35659 Ignore Report Quick Reply
Just review some style guides https://www.cs.cmu.edu/~112/notes/notes-style.html and see if you can write helper functions in awk instead of repeating lines or eliminate magic numbers.

You could rewrite that entire script in awk too https://www.amazon.ca/Unix-Programming-Environment-Brian-Kernighan/dp/013937681X that's a small book which basically taught me the proper way to write awk/shell scripts.


Bubble Sort Question by Edwin Sembleworth - Fri, 20 May 2016 22:47:48 EST ID:YfNtQmPq No.35650 Ignore Report Reply Quick Reply
File: 1463798868276.jpg -(101782B / 99.40KB, 920x299) Thumbnail displayed, click image for full size. 101782
I have a question about a Loop in C ++.
I know how to write a loop and do a bubble sort but it just fucking kills me that this loop I have written here doesn't have any letters but it knows to sort the names I input by alphabetical order. HOW THE FUCK DOES IT DO THAT?!

for (int i = 1; i <= stud; i++)

{

cout << "Please enter the name of student " << i << ". ";

cin >> name;

if (i == 1)

{
Comment too long. Click here to view the full text.
>>
Phineas Bardson - Sat, 21 May 2016 01:47:52 EST ID:4AC8OQBZ No.35651 Ignore Report Quick Reply
>>35650
It looks to me like it doesn't sort the names you enter in alphabetical order very well. It only sorts to the front of the list or to the end of the list, but never into the middle of the list.

So if you entered letters of the alphabet instead of full names, then you could enter:
Z, Y, X, W, V, U, ...
And it'd print the alphabet correctly forwards ("sorted").

However if you enter this sequence:
A, Z, B, X, C, Y, ...
It would not end up printing the alphabet in order (it would not be sorted).


How to look at Tomorrow's stupid deal of the day??? by Phineas Wemmlenig - Thu, 19 May 2016 22:50:36 EST ID:NTDuQOYX No.35648 Ignore Report Reply Quick Reply
File: 1463712636794.jpg -(81527B / 79.62KB, 520x750) Thumbnail displayed, click image for full size. 81527
So at www.musiciansfriend.com they have a pretty great deal everyday called "The Stupid Deal of the Day". There used to be a way of seeing the image of tomorrow's stupid deal of the day when you looked at the script of the page but it looks like they figured out people were doing that. Is there another way to check it out (that's still legal) ?
>>
Edward Hottingwill - Fri, 20 May 2016 03:18:37 EST ID:92a19VVt No.35649 Ignore Report Quick Reply
There isn't a compelling reason for them to design the page in that way, so probably not.


Good starting place by Fuck Brookfuck - Wed, 11 May 2016 17:09:08 EST ID:KNHdydFq No.35604 Ignore Report Reply Quick Reply
File: 1463000948348.png -(831535B / 812.05KB, 575x560) Thumbnail displayed, click image for full size. 831535
I'm sure this question has been asked a million times but where is a good place to start programming. I remember years ago when I was first interested, all fingers pointed towards python. I remember trying python a few times and I never ended up sticking with it.

What is a good language to start with?

My goal is to know and understand web development, and app development. I would say I have a good understanding of html. I want to soon learn java script, but not sure what to learn after that.

My next question is. What is a good resource to learn these languages? What are some good books that really get to the point and accurately explain what I need to know?

This is all my thoughts off the top of my head. Sorry if this wasn't organized well. If you need any other information just ask.

Pic unrelated
>>
Jarvis Horringchot - Wed, 11 May 2016 21:58:03 EST ID:w/mYfe4W No.35608 Ignore Report Quick Reply
Web dev here. My first foray into Javascript was adding effects and interactivity to static pages using only jQuery, and I probably wouldn't have enjoyed it as much otherwise. jQuery is nice because it abstracts away a lot of the tedium and cross-browser concerns of DOM manipulation, but doesn't limit you at all in terms of building production-ready sites and apps. It is (obviously) a hugely popular library and one that will benefit you professionally to know how to use well, especially once you start working with its sister libraries (jQuery UI and Mobile) and writing your own plugins.

After that I moved on to Angular for building larger apps, which I really like. I can't speak for other frameworks like React (which Facebook is built on, I believe) but Angular 2 is on the horizon so it's a good time to get started. In working with Angular, I have learned a lot more about Javascript itself, and I feel like I could do just about anything with the language now.

There's also Node if you're more interested in server stuff, but I don't have much experience with that besides using NPM and gulp.

I learned both jQuery and Angular just by reading the docs (jQuery's are excellent; Angular's are somewhat lacking), experimenting and spending a lot of time on Google and Stack Overflow. The only specific resources I'll recommend that I've found helpful are (founder of jQuery) John Resig's Secrets of the Javascript Ninja which covers a lot of useful information about the language itself and how to write cleaner and more performant code. That, and Code School, which is where I got my first taste of Angular and really got excited about it.

I'm by no means an expert, but I'm making a decent living with these skills so I figure I'm doing something right.
>>
Samuel Blurringsture - Thu, 12 May 2016 12:40:07 EST ID:mfkLzG/S No.35609 Ignore Report Quick Reply
The Zed Shaw books are a good intro and he has free copies up
http://learncodethehardway.org/
http://learnpythonthehardway.org/book/ is a good starter

There's lot's of shit in compsci you'll need to know like algorithms, and why one algorithm is faster than another O(n), O(1), ect. You can learn this from Harvard's free intro to compsci https://www.edx.org/course/introduction-computer-science-harvardx-cs50x

This page basically covers the entire course condensed: https://study.cs50.net/

After, every compsci student takes a course in abstraction. Harvard has CS51 (CompSci II) but it's not public so what you can do is take SICP instead, which is the same course http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/ read the lecture notes, then read the chapters, do the book exercises. This book is important because it literally hands you everything you will run into while programming.

This is as to the point as you can get. Zed Shaw very to the point, the Harvard course if you skip the lectures and just watch the "Sections" or "Walkthroughs" also very to the point. SICP is a masterclass in writing where absolutely no word is superfluous, and every exercize important. If you want to learn Linux/Unix command line filters after, get the small book "The Unix Programming Environment" it's a crash course on the commandline and all you will ever need to know. Combine that book with Zed Shaw's Regex online book and now you can call yourself DevOps.

Congrats you're now a programmer that's already better than 60% of other developers. Now go get a book on modern Ruby, or advanced Python book, or gopl.io book (since very similar to C) and you can now go earn some money somewhere. As you go through the books type out all the programs, do the exercises. Try learning a framework, like Django if doing Python or Rails if doing Ruby.

If you want a job, at some point during all this go on stack exchange and start helping people with Python, Ruby, C, or other questions of shit you learned. Then go apply somewhere for 'Remote Support Engineer' and show…
Comment too long. Click here to view the full text.
>>
Samuel Blurringsture - Thu, 12 May 2016 19:51:12 EST ID:mfkLzG/S No.35613 Ignore Report Quick Reply
>>35609
I forgot to add, the language you learn in any intro to programming book or course doesn't actually teach you that language, it's just a prop to help you learn the basics like for-loops/while do/arrays/hashes ect. Pick the course that has the least amount of weird syntax going on so you aren't distracted for example if you do the Zed Shaw Ruby book, you'll run into the strange Ruby syntax of how they do loops (each.do) and other language specific shit like screwing around with gems that you can always learn later after you get the basics down.

You learn the actual language when you're finished the course and go get a book on React or Javascript or Ruby that completely covers the language and all it's standard libraries, then you go through that book. If it's a good book it will have exercises to test your knowledge so you really actually learn the material instead of reading and forgetting a day later.


Returning a String Java by Phyllis Clinnershit - Mon, 15 Feb 2016 01:01:23 EST ID:9GNL65xE No.35160 Ignore Report Reply Quick Reply
File: 1455516083471.jpg -(33118B / 32.34KB, 300x300) Thumbnail displayed, click image for full size. 33118
I have a class called Model, which has one enter in data for a particular model.
I want a method that takes height in inches and converts it into feet and inches using a static instance variable and then returning it as a String. The instruction state to return it as a string.

class Model
//instance variables
private int height;
public static final int IN_PER_FOOT = 12;

public int getHeight(){
return height;
}

public void setHeight(int modelHeight){
height = modelHeight
}
Comment too long. Click here to view the full text.
>>
Cyril Driggleket - Mon, 15 Feb 2016 17:27:07 EST ID:FZqsCuoJ No.35171 Ignore Report Quick Reply
>>35160
Why is your code obviously incorrect?
Because your method doesn't take in height as inches?
>>
Walter Hedgenod - Wed, 04 May 2016 10:51:19 EST ID:TBTemjoO No.35551 Ignore Report Quick Reply
>>35160
You are missing a " on the end of the line

String feetAndInches = feet + "feet" + inches + "inches;
>>
Stphan Floffingbridge - Fri, 06 May 2016 08:43:49 EST ID:SWJfiJ9j No.35566 Ignore Report Quick Reply
>>35551
Cyril is correct, however you should also get into the habit of cleaning up your code. Instead of declaring a new String try:

return String feetAndInches = feet + " feet " + inches + " inches ";

It's also never too early to get in the habit of handling data in strings properly. Your method works for a display method but outside of software-dev 101 you'll want to do this:

return "feet="+feet+",inches="+inches;
This will allow you to easily process the data OR use it in a display method, i.e:

public void displayFeetInches(){
String data = convertHeightToFeetAndInches();
if(data!=null&&data.length()>0){
if(data.contains(",")){
for(String line : data.split(",")){
Comment too long. Click here to view the full text.
>>
Reuben Brookstock - Sat, 07 May 2016 11:41:52 EST ID:9QSfnS0r No.35568 Ignore Report Quick Reply
>>35566
>return "feet="+feet+",inches="+inches;
> This results in your desired output but increases cohesiveness while reducing coupling.
lol no quite the opposite there is no coupling when dealing with local variables and it's way more useful to be able to change the return value of a function.


SOLID is a bad idea even for a mature software developer but of a bloody newbie it's probably the one thing that can lead to discouragement at this stage.


<<Last Pages
0 1 2 3 4 5 6 7 8
Report Post
Reason
Note
Please be descriptive with report notes,
this helps staff resolve issues quicker.