GatoGigante
215295
15733
296
Learning How To Code In Real Life
Learning how to code is a process, not just a fuckall massive dump of links. That said, I think it's a super-useful thing to have in your repertoire. I might be biased, as I actually do it as a major component of my job, but it's certainly handy, and in more ways than you'd think. I find myself using my text editor, a few line of code, and a smattering of regular expressions all the time to pull meaningful words out of walls of meaningless words like this here.
First: Why Code?
The reasons to code are myriad. From marketability and resume padding (the worst reasons) to making the machine overlords do your bidding (the raddest reason), it is incredibly rewarding, but also fucking maddening in the highest order. Nothing ever works, nobody will ever understand you, and the computers you love will become the bane of your sad, nerd existence. Every *ding*, error popup, segfault, log barf, etc. will be a fresh antagonism of you and what you stand for. When things are going well, code will be your friend, but most of the time it is a fickle mistress at best and a bitter enemy at worst (and most probable). If doing your taxes makes you want to pull your hair out, you might want to rethink programming. It's like arguing on Facebook with someone paradoxically more pedantic than your shitty friends. If you can pass the gom jabbar test of humanity, then continue on. You might just enjoy the masochistic endeavor of programming.
Loadout
There are religious wars over what a programmer needs to do their job, but this is my humble opinion. Programming is done best, I think, on a POSIX operating system. A lot of people like Linux because it's free, and I like it a lot myself. Not only that, but when you go to deploy code you'll possibly be doing it on a lot of computers at once, and accordingly you'll probably be deploying it on Linux (unless you want to plonk down crazy coke money on Windows for every machine). It makes it easier, I find, to develop in an environment that feels like the one you're deploying on. That said, Unix-type OSes tend to all work faiiiirly similarly. I develop on OSX because my job gives me a MacBook. Surprisingly, Apple makes great computers for both trust fund yuppies and real programmers. Strange bedfellows. For the rubber meets the road of development, you'll want a good, solid, feature-filled, and performant text editor. I prefer Sublime Text. It runs everywhere, it's fast as heck, and it can be had for free. It's nagware, though, and well worth the dosh if you really use it every day. It also has a package manager, Package Control ( https://packagecontrol.io /) that is crazy good.
Google is your friend when you program. If you know how to solve a problem but things are going wrong, Google it. If you don't know how to solve a problem, Google it. The only thing you need to know to use it effectively is what strings of text are really important to your problem, so using Google effectively is a solution, a learned skill, and good eye training for what messages are of value. Most of your Googling will take you to...
Stack Overflow
This is the repository of all knowledge regarding programming fuckups. I make them, you'll make them, the entirety of your computer experience is essentially a sea of fuckups from the 80's under a sea of shitty patches from the 90's, with code snippets from Stack Overflow running on top and advice from Stack Overflow keeping the broke-ass snippets working together.
Languages
The next important thing to decide (after what you want to program; if you don't have that yet go back to square one, get out of here, save yourself, and wait until you have a problem worth solving) is what language to use. I won't waste your time with a million links to resources here, as, as frequent as not, finding the highest-rated thing on Amazon and piratd^purchasing it will give you better, more up-to-date info than I can. That said, I'll try to run down some pros and cons to languages to give you a good place to start deciding.
C/C++
The C-based languages are probably some of the most established that are still being used today. C makes up the foundation of nearly every OS, and its younger, cooler brother C++ introduces a load of features that, essentially, are the foundation of modern programming. One of the nice and, simultaneously, terrible things about it is that it's a "compiled" language. This means that, at the end of the day, you're left with a program that's translated directly into the language that the computer understands. This means that it's fast as hell; probably as fast as you can get without writing in assembly. We shall go not into assembly. If you're reading this, you're not insane enough for assembly yet. The problem here, though, is that it's really easy to shoot yourself in the foot. Things have gotten a lot better fairly recently, but I'd still recommend familiarizing yourself with C++ so you appreciate The Struggle, then moving on to something more expressive. If you go very far at all, invest in a good book on data structures and algorithms.
Perl
This is my language of choice, because I'm old and fat, I work on old and fat code, and my enjoyment is secondary to pulling down a paycheck. That said, it's actually pretty boss for a few reasons. It was one of the first languages that had a solid system of pre-packaged modules in a central repository (cpan: http://www.cpan.org/ ), it's actually pretty fast for an interpreted language. Unlike C/C++, it does NOT compile. There's a program that sits between your code and the CPU, translating your intent on the fly. This is slow, comparatively, but Perl folks like to say "computer cycles are cheap and human cycles are expensive". If performance is a huge deal, go for C++. If it's not, consider Perl. It's crazy easy to learn, and it still keeps you pretty close to thinking about things the way the computer does. If you get stuck, there's http://www.perlmonks.org/ It's like Stack Overflow if it was run off yr grandpa's BBS, but the people there have forgotten more than you'll ever learn.
Python
Python is an _amazing_ language to learn on. Even in production, it's pretty powerful, but for learning it's hard to beat. That said, it makes some weird choices. At the risk of people losing their shit, I don't like how they handle white space. Writing Python is like writing a paper. When you're not writing a paper, all that matters is what you say; your content. With a paper, style matters, and you lose points for indenting wrong, bad formatting, etc. Python is like that. If you don't keep your whitespace (tabs, spaces, etc. that separate code and code blocks visibly and, here, functionally) consistent, Python will lose its shit like this fellow. There's a style guide called PEP8 that code should really conform to, and Sublime has a plugin that can help you code to PEP8 as you go. Also, its package manager, pip, is either the most complete or one of the most complete package repositories in existence. If you want to solve a problem, someone else has probably already done it. Steal their work and use it how you need to. They want you to.
JavaScript
To hell with JavaScript. It's the only kid on the block that runs in the browser, and it's not the WORST language in the world (especially with ES6, the newer version that most browsers don't support fully), but you can't do fucking ANYTHING with it without layering modules on frameworks on other frameworks, and it's changing by the day. I'm trying to pick up Ember, and it's great, but I thought it was great yesterday and apparently it was shit yesterday. I guess it will be great tomorrow and what I think is great is shit today? Basically, fuck JavaScript. If you're doing web dev, you're stuck with it. The bastard. If you are, consider using a good framework like Ember which sucks or React which also sucks. If you're developing more traditional programs, ones that run largely outside the web browser, there's NodeJS, which takes the JavaScript engine from Chrome and separates it so it can fly free as a bird and run programs anywhere. It also has a boss package system, npm, which is crazy powerful but perhaps a little dense to understand when using to its full potential. Oh, and Node is changing all the time, too.
Also, fuck JavaScript.
Clojure
It's a neat language that runs on the JVM, or Java Virtual Machine. I don't know enough about Java to speak on it in syntactical detail here, but it has, probably, the broadest adoption in business logic of any language, and Clojure can do everything Java can. It's what's called a "functional language", which brings a lot of cool features with it as far as how you think of code, but it requires a very different viewpoint. Many people find it a bit alien, but, once you know another language or two, it's worth looking at Clojure to see what you can do in so few statements. Most languages try to get the computer to understand what the human is saying, but Clojure makes you speak in a way the computer can naturally understand. Once you get it, it's pretty elegant.
PHP
PHP is a bastard language. It's like JavaScript for people who don't want to let other people's computers do the heavy lifting. It is almost entirely a server-side language with good support in the most broadly-adopted server, Apache. There are also a few other ways to use it that make it a little more modern, like Laravel. It makes it really easy to format things. Essentially, it's for people who want to write HTML but need something that can respond dynamically, but who (understandably) hate (the demon fartspawn) JavaScript. Since it's not JS, though, it can't run in the browser, which is a real ding for modern web work.
Other Languages
Oh, you like Swift? Ruby? C#? Go? Fuckin'... Hack? There are a million languages for cool dudes. Most will die (watch the obituaries for Clojure, though I send get well cards every day), but if someone wants to push for their dying baby, I welcome their doing so in the comments.
Choose a language and GOGOGO
Hopefully one of these will sound like the tool for the job. Hop into it and write a "Hello, world" program. Figure out what you want your program to do from there, sketch out a flowchart ("I want to get data from this site and this site, and I want to use them both do make this data. Then I want to collect that over time and..."), and start trying to implement it. When you have a problem ("How the fuck am I supposed to pull tables from a site that doesn't have a fucking API???"), Google it, make a small sketch that uses what you learned, and debug it until it works. Then roll that into your code.
I hope this was helpful, and I hope it encourages you to give the divine fuckery that is programming a go. It's not as bad as you might think, and it's worse than you could ever imagine.
Other Resources
This is, by no means at all, a complete guide to programming. This is, in fact, maybe a small step better than a garbage list of tools. Here, though, are some things you'll probably want to learn as you go:
https://www.codecademy.com/ : A great place to learn a number of languages and tools interactively. The learning curve is pretty gentle and it's solidly arranged.
Version control: As you code, you're quickly going to save something bad over something good and proceed to shit your pants trying to get back to where you started. For that, there's version control. Look into GitHub, and you can start putting your code there. If you fuck something up, you can look through the history of changes you've made and go back to before The Incident.
Regular expressions: If you want to look through a web page and find everywhere it discusses Hot Russian Teens With Guns And Alligators, that's pretty easy, but there are a lot of times you want your search to be a little bit less specific. For that, you can use regular expressions to find (Hot|Sexy|Aged) (Russian|Chechen) (Teens|Milfs|Putins) With (Guns|Kittens). The flexibility of regular expressions makes just about anything possible, and essentially makes trivial all the splitting-apart-of-text I hated so much when I was doing C in school.
The command line: Remember when I said you should use Linux (or some Unix variant)? Yeah, you won't know why until you hop on the Cool Dude Command Line. It's where things get done. If you want to do something more complicated than what can be trivially represented with icons (as will constantly be the case with coding), you'll want to drop to the command line. I use TotalTerminal for Mac, Guake for Linux, and Cmder for Windows so I can quickly drop to a command line and back again with a keypress. It's handier than you might think.
IRC: If you have something more pressing than what you can have answered in Stack Overflow, most projects have an IRC you can go to. If your question is low-priority, post it to Stack Overflow. And your question is low priority. Almost guaranteed. That said, if you find a legit bug, or if you really need expert help, you might be able to find a good IRC with some smart folks.
alternativeto.net: I often find something that's alllllmost what I want. I can, from time to time, find something here that has the je ne sais quoi that makes it do what I want.
Markdown: If you want to tell other programmers a thing, it's frequently good to do it in Markdown. It's like HTML for people that have better things to do.
cacticat
<3 Perl <3
MrFJ
C# is the future.
Acera
Also for new programmers Python is reaaaally hard to debug and figure out wtf you did wrong sometimes.
friedgold19
Once familiar with a language I'd recommend learning a functional programming language helped improve me a lot as a programmer.
Jolfr
If you want to learn to be a good programmer, learn to look at references, not at tutorials like codecademy. Tutorials often times will (1)
Jolfr
only tell you enough for you to complete the "assignment" they gave you, or will only tell you how to use a part of a language in a very (2)
Jolfr
basic way. Often times you will miss out on really great things if you stick to tutorials.
MrClownShoes
C# is being revived massively in the gaming industry thanks to Unity. I wouldn't be so hasty to say it's on its way out.
GatoGigante
Heh :) That's largely a joke; C# is pretty entrenched, but it's not my baby so it's an ugly baby. Honestly, it looks pretty cool.
FrozenWaterIsCool
Python is fantastic
AzuMaki
I've been programming for 6ish years as i am 22 now. And nothing pleases me like python does ^^
afromanex
Dev here.. I you actually learn javascript... like learn learn it, there's lots of things you can and will have to do without a framework.
afromanex
I'm not shaming libraries. Jquery and Angularjs are great, but dependence on libraries because you can't code is a mistake.
afromanex
JavaScript goes beyond the browser. Check out NodeJs and MongoDB too! Same language, different use.
andriticus
I actually like the object model in JavaScript.
bepadapbadabop
I think people should learn it just not pursue it. It's good to have in your pocket if you need it but it's not something you want to relyon
Eldibs
Additionally - Fuck COBOL. I'd rather fistfight the Hulk than code COBOL ever again.
muenzfach
I like COBOL.
elbdms
It's like the sewers. It's still under you everywhere and when you open it shit goes everywhere, but somebody needs to maintain it/upgrade.
ScottHitz
My college taught Modula 2 a COBOL variant. Because I played vid games they put me in 200 level class. Never learned anything else. So bad.
spartaness
Fucking COBOL.
ArcangelAwesomo
That would make an hilarious and educational comic book. The creators of COBOL hire the hulk to fight you. 1
Eldibs
And I would gladly die to his fury with the honor of taking money away from the creators of COBOL. Worth it to not have to code COBOL again.
ArcangelAwesomo
Then you start spouting off all the problems with COBOL to the hulk and he gets so mad he turns on the guys who hired him. Hilarity ensues!
Eldibs
Better than what I imagined, but who has enough money to pay off the Hulk?
Jolfr
Personally I prefer Atom (I like that I have complete control over EVERYTHING in the editor), but sublime text is pretty good too!
GatoGigante
Atom is great! I find it a little sluggish comparatively, but it's mad powerful. Now if only regex-find-all worked like Sublime :D
Jolfr
I will say that the startup is slow, but for me it's fine after that. (regex just got a fair upgrade recently IIRC)
GatoGigante
Good to know. I'll give it another whirl. I'm looking forward to it working right on the Raspberry Pi so I can make a portable editing tool.
Jolfr
That would be pretty cool! One of the main reasons I use Atom over ST is that I do c++ development, so with some of Atom's plugins (1)
Jolfr
I found it to be much nicer. (but I know some people that still prefer ST. It's all personal preference really)
ThisMonkeysGoneToHeaven
+1 And it's free.
ThomasJeffersonAirplane
Praise Perl, our lord and savior.
GatoGigante
Blessed be Larry Wall, whose mustache be the source of all regex. May our programs be unparseable before runtime; may all things be map {} @
hansTrina
I would also suggest to learn by doing a small project for each property/feature you're focusing on. Just 'studying' or following a (1/2)
hansTrina
(2/2) tutorial means forgetting it tomorrow. If anyone's interested I have a website for 'newbies' to make a portfolio, ask questions, etc..
Baelstrom
ooo link please?
hansTrina
Www.degenerationit.com
Baelstrom
Thank you!
yoshifreak
In short, learning to programming takes effort, like learning math. But programming will have more practical applications.
SmokeyQuartz
Codeacademy.com is a pretty fun way to get started with a ton of different languages.
JackHarwood
Man how the fuck can anyone actually recommend codeacademy? That site'll fail you for having fun with your code.
GatoGigante
Oooh, good call. Added to the resources section.
ivdok
Last I was there, they annoyed me with basics, which I couldn't skip.
iinfinitusequitas
I've made a lot of money helping companies debug old VB6 applications. Doesn't mean it doesn't still suck donkey balls.
JackTheRipper69
Java and Java script have absolutely nothing to do with eachother. How can you leave Java off the list? It is the most widely used language
doublederp
Clojure is on it, and it runs in the JVM. Java itself is so boring and terrible that it's good to be left out.
BloodQueef
He mentioned in the Clojure segment that he isn't as knowledgeable in Java as with the other languages so he can't say much about it.
WhippyCleric
My thoughts exactly
zagibu
The same reason why posts about music don't include Justin Bieber. Just because something is popular doesn't mean it's good, too.
tenderape
So since I'm working on a small web dev with no prior experience with JavaScript (or anything else for that matter), I'm fucked?
dfoxinator
Start with a simple JS library like jQuery. Tons of info on the web and jQuery allows you to do almost everything you need easily.
tenderape
Currently working with jquery. Trying to figure out how to make two lists I can transfer items between. Trial & error style. Mostly error.
dfoxinator
Haha, that's good practice. Take a look at jQuery UI (a supplemental library built on jQuery). It's great for pre-made stuff like that.
tenderape
I will, thanks!
GatoGigante
JavaScript is a massive headache... that will enable you to do great things. For web dev, it's really the best thing.
monkeyrapecave
No way man. Javascript is the shit these days! Keep on working that JS :)
tenderape
I'll get right on it then! Thanks (Goodbye sunlight)
AntTrapHouse
The biggest motivator for learning code is by making something cool. Look for teams who make things that involve computers. contribute.
GatoGigante
I was of two minds about even talking programming languages, because, yeah, open source is the king of educators and language comes second.
AntTrapHouse
I agree, one robotics project has made me learn Python, C++, OpenCV, Arduino, ROS, and Ubuntu. Most of that falls under "C++" kinda broad.
AntTrapHouse
Also fuck JavaScript
GatoGigante
I regret that I have but one like to give because Fuck JavaScript
aldriel
I remember learning JavaScript in school and I instantly hated it. I love C++ tho
N4g4rok
If anyone was wondering, Java and JavaScript have nothing to do with each other beyond name. Java is to JavaScript as car is to carpet.
Notouchingofthehairorface
Care to elaborate? I'm beginning to learn code, and am curious! I didn't know they were much different..
N4g4rok
Here's a little blurb: http://www.bing.com/search?q=difference+between+javascript+and+java&form=OPRTSD&pc=OPER
whatsisname
Netscape put "Java" in the name "Javascript" for BS marketing reasons and confusion. They have nothing to do with each other.
justsomepersonbutyeah
10 PRINT "Hello World" 20 GOTO 10
imgwtchr
ah, one of the first lines of program i ever wrote
justsomepersonbutyeah
Same as myself
9678904
As an ex programmer and someone who is looking to re-enter it, well done sir.
SharkyTheSharkDog
why did you break up with programming?
9678904
My career just evolved into being someone who interfaces with clients well and can speak tech with developers. I'm social, so I enjoy that.
GatoGigante
Thanks! I hope it's handy. I expect the comments will be more so.
9678904
I'm jumping into Python, I look forward to losing my shit again. I've been too subdued by meds for too long :) Thanks for the PEP8 tip
GatoGigante
My coworker swears by PyCharm, but, as I said above, I recommend Sublime Text for everything. You'll feel like you're in Star Trek.
SwagginMcBagginz
What about Java? It's a solid language to start learning that has many useful applications and tools.
ledious
JavaScript != Java
KingOfAllMen
I cringe when ever I heard them used interchangeably... that.. that...you arn't making sense!
ledious
haha! true true
Sairvous
Its also pretty universal
KingOfAllMen
I like to stick to my Java, C#, and MATLAB.
Glads
Because OP doesn't like any programming language newer than 1987. Also he likely doesn't code for Windows or Windows servers.
elbdms
Everybody has java and everyone wants it. It's the English of the machine world.
damouse
C is the english of the machine world by a long shot.
GatoGigante
I wish I had the experience in Java to speak educatedly about it. That said, I love Clojure syntax and it has Java interop, so... ¯\_(ツ)_/¯
LetumComplexo
You could probably pick it up in a couple of months if you put your mind to it; it's quite easy.
iamtheimguriankingofupvotes
I will play around with Clojure but Lisp-like parans tire me. Kotlin is also another nice JVM language and has Java interop.
GatoGigante
I hadn't heard of Kotlin. I'll have to give it a whirl.
TheWhiteBarry
Interacting with the OS is a pain in the ass when your code runs inside a VM. Just saying there are cases where Java is now the right tool.
pmgllc
Such disdain for the languages that power a majority of the web is ridiculous. Want a (better) job? Program where programming is needed.
ThisMonkeysGoneToHeaven
Exactly, you shouldn't just learn any language. You need to find a niche then stick to the appropriate language and skill set.
BadTimesFriendAhead
So, COBOL then? Good luck.
ThisMonkeysGoneToHeaven
Nah, let's say your niche is you want to make IOT home appliances. Learning COBOL isn't going to help you there. See my point?
nonprophe7
Would you say that you also need to adapt to the market demands? Like you say, COBOL has gone to the wayside, so continual learning amirite?
ThisMonkeysGoneToHeaven
Depends on which market. Like if you work on web projects, then yes absolutely. You have to keep learning to keep up.
kessle
With that logic we'd all still be using COBOL. You can realise a language is poor by modern standards but still know how to use it.
dfoxinator
The problem I have is the OP trashing various languages in a post aimed a newcomers. Let them decide what to use, especially (1/2)
dfoxinator
if you aren't knowledgable about most of the languages you're putting on the list. IMO this is just another bad programming post. (2/2)
dfoxinator
Well said. I make a ton of money writing... PHP! OP is clueless, IMO. Gave very bad advice and left off Java (red flag).
pmgllc
Yup. I support a family of 4 nicely with PHP, CSS, & JS. Those three wrapped in one particular platform powers 25% of the web… & growing.
dfoxinator
Nice! Exactly, huge companies like Facebook depend on it, and even new unicorn startups like Slack. PHP 7 is awesome and bright future, IMO
MostValuableDickbutt
Interesting that @OP didn't even mention Java, which is probably the most common coding language (even though it's fucked, imo).
Snodig
He's talking about stuff you should bother to actually learn.
GatoGigante
I mentioned it (in the Clojure section) , but I'm frankly not familiar enough with it to speak to it knowledgeably. Learn Clojure, tho!
fightmehellen
Considering how much space Java takes, you think it would have gotten a little in this post
asumagic
W- [jit overheading] -ell actually I [garbage collecting] think it [garbage collecting] shoul- [jvm crash]
zagibu
AgreementOrDisagreementStatementFactory.getInstance(new AgreementOrDisagreementStatementFactoryConfiguration("config/aodsfc.xml")).print();
DarkUranium
You might like this: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
zagibu
It's brilliant!
dnebdal
There is a reasonable-enough language in Java, it's just a shame how far away from it many developers seem to go...
fightmehellen
One of my biggest current projects is actually in Java. Love the language so I was wondering how it didn't make the cut
organicolcomns
Such a fitting image for JavaScript.
YourFriendlyNeighborhoodAnon
I was starting to worry that I was the only one who hated Javascript
elbdms
LOL pretty good impersonation of a web dev.
peterned
I was thinking the exact opposite thing, but then again I code it for a living ;)
bl1nkbl1nk
YES! Thank you
onepaaaaaaaaaanch
Can you teach me :)
squallau
I know it's cool and edgy to pick on JavaScript, but it's going through its rebirth at the moment with stuff like Emscripten.
madrush
Coding for something that runs on browsers with rules that change faster than my son's diapers is the epitome of suckage. Fuck javascript
GatoGigante
Ugh, using jQuery.ajax() is like 2008. I use a framework you probably haven't heard of yet.
elbdms
LOL pretty good impersonation of a web dev.
BoreasTheNorthWind
Sometimes it is an useful shortcut. JS is bad as base code, but as auxiliary (the purpose it was made for) works pretty well.
TheTruestRepairman
You guys are really hurting me, I love JS.
nclu
The thing that's greatest about JavaScript is that we can all start learning it just by hitting f12
TheTruestRepairman
You're right. It's sad how much time I've spent executing random code in the element inspector. It's a fun language.
MarcoPoloOnPollo
Are you a hipster of the coding world?
ivdok
I will React.js your WebGL so hard, you will Angular to death!
wilup
C# for the win baby
BoredBird
C#, .NET MVC and Visual Studio with Resharper and some other nice addons... coding is such a joy :)
EvilTwinSoftware
C# + Xamarin = Android, iOS, OSX, and Windows. Do you want to use the same language and support the largest consumer platforms? Yes, please!
DefinitelyProbablyPooping
I make a decent living programming .NET applications (C#)
XenoHorse
Yes! As someone who learned using C++ and Java, and who programs in Java and PHP, using Unity and C# has been a joy in comparison to others.
ColorblindMonk
I started learning C# for my job just a couple weeks ago. Such a godsend after going up the ladder in college with all Java courses.
Mimsey
I learned Python then C# and they're both super easy. Writing them is like writing a normal sentence. C++, on the other hand...
johnskydiver
haven't touched C++ since college. I do not miss pointer arithmetic.... at all.
ColorblindMonk
Attending a C++ course. Prof is knows it all, including assembly. Spent 30 minutes watching him replacing a method VC wasn't pulling in(1/2)
ColorblindMonk
My impression thus far is that C++ is a powerful language that can crash and burn for no reason. (2/2)
Nehemek
I'm teaching myself C# right now, have been some wild nightds but all good :D
MakeMeACakeOrGrillMeASteak
I'm currently learning C# in school :D
wilup
Jealous. They taught us Java in ap comp sci.
RichCorinthian
I'm jealous. I learned Java because C# didn't exist yet. C# is my favorite.
BoreasTheNorthWind
Not if you want to be linux-compatible and don't want to use Mono. But beside that, not bad indeed.
AetherMcLoud
.net is open source, it will be released for linux proper too. C# is the new java.
Snodig
Kids today...
williagr
I had a professor who thought the user interface for computers should have ended with a black screen and green text. Shoot me now.
Snodig
I think I work with that guy.
FunkyH
Thumbs up from a fellow perl jock. Check out Damian Conway's Perl Best Practices book for some great style and usage tips. I swear by it.
pancreas
http://www.zoitz.com/comics/perl_small.png
ivdok
fork while fork;
FunkyH
You're going to have a bad time....
ivdok
With perl it's always a bad time, deciphering what string of <;'<:"*(^$(@#$%*@$#>"<":?> means.
kentnl
That's not actually true. But it is if you're working with an asshole who obfuscates code on purpose. I tend to write to be read...
kentnl
Also, check out Modern Perl, its not outdated, and the book is free! https://pragprog.com/book/swperl/modern-perl-fourth-edition
FunkyH
Solid, thanks for that, downloading now. :)
geonerd
Perl is my language of choice, but now it makes me feel old. Learn Python, kids!
Cere4l
perl is just so... easy and convenient though and python is so bitchy about well... everything
geonerd
Agreed, but the Python repositories are much bigger (and growing), and it might be possible to understand your code later.
Cere4l
#i usually use these to be able to read my code later on >_>
geonerd
s/^#.*//;
FunkyH
Yeah I'm slowly coming to the same conclusion. We've got a huge amount of perl to maintain and support so it'll be relevant for a while tho.
perlcat
I downloaded git, and the perl they packaged with it borked my environment.
kentnl
Moo is a bit more minimal <3
perlcat
I'll look into it. Thanks.
kentnl
Oh wow. Imgur fucked up hard and put my message in the wrong place.
FunkyH
Git comes with perl? What's that for then?
perlcat
Yeah, it was real funny, when modules I'd loaded didn't work right, and I found that git had put itself in the path before strawberry.
kentnl
Lots of git commands are perl script. Interactive rebase for instance
FunkyH
TIL
TheresAGermanWordForThat
Its generally quite great, although the OOP section is outdated (cf. Moose). I still pass named arguments without an explicit hashref.
FunkyH
But perl is still my goto for fast text processing scripts
FunkyH
Yeah, perl ain't the best place to be doing OO. I tend to go to python these days of i need to start something new, or for larger tasks.
TheresAGermanWordForThat
Perl's OOis a bit grafted on, sure, but with Moose it can more than compete with Python's OO. And with Moops, it doesn't even look bad.
FunkyH
I've never used moose, don't have much requirement for oo in my work. I'll check it out though, thanks!
GatoGigante
I love Moose! I use it all the time. I have a coworker who talks shit about it continuously, but it's so rad. Delicious modules.
kentnl
Moo is a bit more minimal <3
GatoGigante
How does that compare to Mouse?
kentnl
Instead of needing Any::Moose nonsense, Moo classes turn into Moose ones when Moose features are needed
kentnl
But not exactly. Td;Dr = done right, no over engineering in the mouse factory
saintjohn
This angry but useful rant of a post is why I love programming. The humour is espresso for the soul
elbdms
But ...Eclipse.... HELLO?
ivdok
Also, modern Web sucks.
bedrok
As a php dev, Javascript is the bane of my existent. Like damn it I'm tired of parsing JSON
peterned
What do you consider modern web; just the tech, or that most everything comes via npm these days?
ivdok
Why not both? Also, primitive "metro" and "material" styles which load over 10s on 100mbps and make both phones ant computers beg mercy.
peterned
Yeah, despite things like graceful degradability and responsive design, clients often still just prefer gfx over ux.
ivdok
What I don't get is that "modern" looks basic (sans fonts and animations), but even the shitstorm called "Web 2.0" was more responsive.
kentnl
Preach. It's like reinventing the 90s in a virtual machine
ivdok
We need to go deeper. VM inside VM inside VM. Soon people will consider things like Xen/KVM "barebone" and "close to metal".
kentnl
https://github.com/dreamlayers/em-dosbox/
ivdok
Windows 98 in browser: had to force shutdown PC because browser went nuts and hanged up whole system. I couldn't even remote connect to it.
SPascareli
I learned programming in Python then went on to learn C then C++. I think it's a very smooth learning curve since Python is simple and 1/2
elbdms
The use of whitespace in Python is brilliant. It forces people to write readable code. You will wish for this if your company outsorces.
ILikeTheWayYourWormShits
And you will hate it forever if you cannot use whitespace consistently. Source: I code in Java, aka "What even is whitespace?"
ivdok
Learning C# was easier because of abundant examples & tasks, and Schildt's "Learning C# 4.0". Python learning aids were... Scarce.
TommyWa
I went from Java to Javascript (I hate it with a passion) to C++, I found C++ difficult because I just wasn't used to it and rushed into it.
dragonflyy69
Started with Basic (like ProDOS basic on Apple II computers) then worked my way to VB6. Stopped on that for web dev (PHP). 1/
dragonflyy69
2/ have also worked on C# (winforms) for company purposes and still work on my web sites with PHP/jQuery.
dragonflyy69
3/ My experience with C# learning (and OOP) has lead me to using more object oriented work in PHP. Still use both depending on needs.
SPascareli
I"ve a similar career so far, I pretty much only got jobs with PHP and I think it's very easy to do everything with arrays and functons 1/
SPascareli
considering PHP arrays are so powerful and versatile, but a good OOP base will go a long way to a better code in the end.
kyusec
I started with C++. I have ptsd now.
ivdok
I started with PHP. It almost ruined everything to me
TheWorstPirateYouHaveEverHeardOf
That was my first language in my first computer science class. I enjoyed it. But D:
NocturnalGreed
It's really not that bad. I started with it as well and the only hardpart with starting with it is learning the place of objects in code.
BlueDrache
Same. Pissed the teacher off when I read the F1 help instead of the book and added different .H files to get the assignment done faster.
khan95
I hear this often, but I first tried Java and just couldn't wrap my head around it and decided to try C++ instead and it all just clicked.
dietderpsy
Me too, when I moved to Haskell I went crazy trying to understand where things magically came from.
bioshockingly
I had grown men weep into my tender arms after they start courses with C++. It ruins sanity
bioshockingly
one time, a friend of mine tried at step 1, writing ' Hello World! ' , the program responded "Goodnight, sweet prince"
Thatguywiththejk
Speaking of programming in general though, I believe people should learn to design their programs (uml, statecharts, use cases, etc) 1/2
krysber
We used to write pseudo-code in High School before we would actually write the code. Plan out everything we wanted the code to do stepbystep
Thatguywiththejk
Before learning a language. I think it would help knowing how to program before writing a program. 2/2.
PainGwen
I'm a business analyst, so that's my jam...I agree wth you! I'm learning SQL first because i need it for work, and then I'll tackle Python.
dietderpsy
I would mix it in a little later but not too late, learn what makes a bad program etc.
kessle
That's the #1 guaranteed way to make sure new programmers burn out after a few hours. Learning and experimenting first, theory later.
Thatguywiththejk
True, I see your point. I just know it could've possibly saved me from headaches earlier on.
SPascareli
optionally object oriented, C is a good step up but really confusing to learn as first language, and C++ is good to learn OO. 2/2
SanguineKnave
I'd say Java's better to learn OO, and a large amount of enterprise software is written in it. I use Scala for personal projects though
dietderpsy
This is why I recommend learning C++ first and then learning Python.
ItWasCool
I went from Python, Java, C/C++, Bash, Osascript, HTML, CSS, Javascript to ruby.
dietderpsy
Loved Ruby but made a switch to python, Ruby is beautiful but has soooo many ways of doing the same thing.
ItWasCool
I do most of my coding still in C/C++ I learned HTML through to ruby for website applications, and to add to my resume
GatoGigante
That's a fair flow. I crashed into the wall first, then learned road signs second. Perhaps your flow is better?
Hepwolfx
I agree, I did python and now I'm doing c++, Perl, ML, and Prolog.
SPascareli
I used to think C is a good way to start, but it can be very hard to enjoy coding when you can't to a scanf right because you forgot the &.
40watz
MY LIFE as a freshmen in college doing a cs degree
GetRektus
Pointers. Pointers to pointers. Addresses and all these things. Pointer hell. Welcome to C.
seancosgrove
Hate pointers, any quick resources to help me actually understand these mysteries? Lecture notes are no help in this realm.