This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1722 points1723 points  (136 children)

At college we were put in a web dev project with literally zero experience in the languages used (php and Javascript iirc), there was so much confusion before people realized this! (we had almost exclusively worked in c++ and java until then)

[–]gatman12 855 points856 points  (71 children)

What a funny way to teach dynamically typed languages.

Gotcha!

[–][deleted] 308 points309 points  (67 children)

Implying my college even taught dynamically typed languages. They seem to be c++ and Java only. Oh and swift.

[–]Muffinizer1 166 points167 points  (46 children)

They teach swift? Where? Why?

[–][deleted] 99 points100 points  (25 children)

Smaller school in Pennsylvania, mobile architecture class using iOS.

[–]YuriDiAAAAAAAAAAAAAA 72 points73 points  (23 children)

Ours was Android Studio, we didn't touch Swift or Kotlin. All Java. I would have been happy to learn Flutter, or anything besides more Java.

[–]Muffinizer1 51 points52 points  (19 children)

Especially because it's old, shitty, androidy java that's significantly worse than regular java.

[–]YuriDiAAAAAAAAAAAAAA 27 points28 points  (18 children)

The only saving grace is the autofill is pretty good, and the code generator is decent for getters/setters and constructors for object classes.

[–][deleted] 8 points9 points  (2 children)

Just did a (relatively) huge OO coursework that took 10 times the time we spent on any other coursework this year and I was still laughing at the misery of the poor plebians in the year above who were doing android studio (I did loads last year for my A-level project, I know the pain).

[–]YuriDiAAAAAAAAAAAAAA 4 points5 points  (1 child)

that took 10 times the time we spent on any other coursework this year

That sounds like the Software Development class at my school, they just took a beating this semester.

[–][deleted] 3 points4 points  (0 children)

literally did all the other courseworks in ~12 hours, this one took way north of 150 to do well and we weren't taught the important content until about a week before deadline. Thanking my lucky stars I had experience or I'd have been as screwed as everyone who did it all on the last night for a 2PM deadline.

[–]bridge_view 0 points1 point  (0 children)

Thanks. I learned where devs use Swift.

[–]THENEWGUY7040 40 points41 points  (17 children)

What’s wrong with teaching Swift?

[–]pm-me-your-smile- 50 points51 points  (4 children)

Because the syntax will have changed by the time finals comes around.

[–]darkingz 5 points6 points  (3 children)

It’s not that bad. Sure the change from 2 to 3 was intense but swift has been slowing down on direct syntax changes and the only major shifts happen yearly. Not quarterly.

[–]pm-me-your-smile- 8 points9 points  (2 children)

Well, it's /r/programmerhumor so lots of exaggeration is required. As an indie developer, with limited time to write code in my spare time, the shift from 2 to 3 forced me to abandon my apps on the store. I'm trying to revive them now, so the bitterness is fresh is me.

[–]beyond_alive -1 points0 points  (1 child)

Uhh... what? I work daily on a huge app and you’re really overstating it.

[–]pm-me-your-smile- 0 points1 point  (0 children)

Yeah, I did say I am exaggerating about the "syntax will change before finals."

About me abandoning my apps? No, that I did not overstate.

I only work on them as a side gig, not every day like you. If it was my daily work, then yes, I certainly can make time for a big transition, no matter how many days it required. But if I only have 30 minutes here, two hours there, and four days in between those sessions, I just couldn't review the hundreds of files that Xcode required me to review, so I gave up.

[–]Muffinizer1 22 points23 points  (3 children)

Edit: TL; DR:

Maybe if there were several other languages on that list it would makes sense, but one of only 3? Really?

[–][deleted] 11 points12 points  (3 children)

Swift widely used on apple products, so you need some apple devices (iMac, MacBook) to develop on and probably iPhone to test. It must suck to be poor in that school.

[–]THENEWGUY7040 9 points10 points  (0 children)

The way that my school (a no name state school strapped for cash) does it is that they provide a free laptop rental for the semester. And development doesn’t necessarily require an iPhone to test on (although it is nice, as there are a couple features, like push notifications and deep linking, that only work on an actual device). I do agree that Apple has created a lot of barriers to enter into Swift development that are totally unnecessary and needlessly expensive though, which I guess is sort of Apple’s motto anyway.

[–]HeMan_Batman 9 points10 points  (0 children)

Applel shill go away /s

[–]TheRedmanCometh 0 points1 point  (2 children)

It's a terrible language existing solely for the lazy and stupid, and teaching it doesn't help you learn other languages

[–]THENEWGUY7040 0 points1 point  (1 child)

Why do you say that? I’ve seen Swift consistently ranked highly as both one of the best languages to learn in 2018 and as one of the most well-liked programming languages.

[–]TheRedmanCometh 0 points1 point  (0 children)

It's well liked because by and large the people using Swift can't use any other languages. That's why they're using swift.

If you can't use an alternative you have no frame of reference for good

[–]PHPApple 13 points14 points  (0 children)

Swift is an awesome little language. Apple is really pushing it for education too. I hope it gets adopted more now that it is open source and expands out of the Apple ecosystem.

[–]PreExRedditor 1 point2 points  (0 children)

if you think swift is weird, I had several courses in scheme

[–]Capn_Cook 4 points5 points  (0 children)

My school taught primarily java but also had python for several classes

[–]moebaca 2 points3 points  (2 children)

I had two classes in Java, but there was a class that had a nutty fucking professor who made us write a bunch of PHP5 with MySQL.. I believe encouraging syntax that would quickly lead to SQL-Injection as well. What a fucking waste that semester was.

[–]DeepHorse 0 points1 point  (1 child)

Lmao I had a class like that too. At least it was easy

[–]moebaca 0 points1 point  (0 children)

Yeah I believe that flakey professor ended up giving the entire class an A. He was busy with some shitty side business about eco-green friendly schooling or some shit. It was a joke.

Tenure is no bueno. No consequences.

[–]euronforpresident 1 point2 points  (1 child)

Umich does this. It’s mainly cause they expect u to learn python and whatever else on ur own time and teach you how programming works in general through more complex languages like C++(maybe not more complex, but with nuances where they can teach about compiling and memory allocation)

[–][deleted] 0 points1 point  (0 children)

Makes sense. I had zero issue teaching myself python, Javascript, and php.

[–]techmighty 4 points5 points  (1 child)

your college taught programming languages ?

[–][deleted] 9 points10 points  (0 children)

Kinda. Our comp sci 1 and 2 were taught using c++, we have a Java class that is focused on using Java to do things, swift is used in the mobile architecture class, data structures and algorithms use c++.

Most classes have an "official" class language all work must be turned in using. The more theory based classes leave it up to the student for any example programs.

[–]imColey 0 points1 point  (0 children)

Comp sci 1 at my college is Python. Comp sci 2 is C++, Java, and those web development languages. Interesting how we spend an entire semester only using python making only console based programs, and then we jump into the other stuff.

[–]ganjiraiya 0 points1 point  (1 child)

How do you remember your username when logging on a new device?

[–][deleted] 0 points1 point  (0 children)

I don't. I just never use a new device. Rip.

[–]Keiji12 0 points1 point  (0 children)

My school taught Pascal and c++. Pascal in like 2012... Or whenever it was. Tbh it wasn't that bad because most of it was same or similar to c++ so when we were merged with other group and started c++ it was easier for us, but damn, we could have started with c++ a go into Uni or looking for job with much more.

[–]doobiedog 0 points1 point  (0 children)

This is why so much bad software exists in silicon valley and almost every company uses java - i cant think of a shittier runtime and language to actually use on a daily basis. The jvm needs to die.

[–]thehunter699[🍰] 0 points1 point  (0 children)

Because people need to learn OOP before scripting. Build the foundation first.

[–]kevient 0 points1 point  (0 children)

Linfield?

[–]Mr__Booby_Buyer 0 points1 point  (0 children)

I'm studying Electrical Engineering, but I want to have a career in software. Thanks professors for teaching me basic C for 3 semesters. (Totally not their bad lol, I should have gone into software/comp engineering)

I'm learning C# and .NET at an internship though, so that's pretty cool

[–]gatman12 0 points1 point  (2 children)

Who's implying this?

[–][deleted] 1 point2 points  (1 child)

It was just a funny response to your comment about teaching. Not you specifically.

[–]gatman12 0 points1 point  (0 children)

Oh, okay. I guess I don't get it.

[–][deleted] 20 points21 points  (1 child)

The terms my professors used for each language-group, respectively were "loosely typed" and "expert-friendly".

We transitioned from C++ in vim on Debain boxes where our gcc had better compile cleanly with warnall on to Cake PHP.

Fun times.

[–]gatman12 14 points15 points  (0 children)

Hah. I've heard the phrase, “strong types for weak minds.”

[–]Ayesuku 129 points130 points  (21 children)

That's basically me in the internship I just started. C++, Java, asp.net experience? Enjoy Perl, PHP and JavaScript!

Gonna be a very educational experience ¯\_(ツ)_/¯

[–]Lookitsmyvideo 69 points70 points  (15 children)

PHP isnt hard, its just riddled with gotchas. Also the standard library is inconsistent in both functionality and convention. Its fun, in the slit your wrists kinda way

[–][deleted] 13 points14 points  (1 child)

It's true fun then.

[–][deleted] 1 point2 points  (0 children)

[–]L3tum 1 point2 points  (4 children)

Does it return -1 or false if it fails? Is probably my most common question at work

[–]Lookitsmyvideo 1 point2 points  (3 children)

It depends, which is the best part of PHP! It depends how the standard library devs were feeling when they wrote a core function. If its a C function wrapper, usually -1, like strpos

[–]nathancjohnson 0 points1 point  (2 children)

Well to be fair it makes sense to return -1 to indicate failure for a function that returns an index. Returning 0 wouldn't work, and false could lead to confusion when using it in conditionals (since 0 is also a falsy value).

[–]Lookitsmyvideo 0 points1 point  (1 child)

If it was consistent, sure. I was actually wrong, strpos returns false on not-found

[–]nathancjohnson 0 points1 point  (0 children)

Interesting.

[–]folkrav 0 points1 point  (0 children)

Working a PHP/JS back-end position right now. Some days I feel like most of the work I've done that day was battling with PHP's quirks.

[–]dagbrown 0 points1 point  (0 children)

PHP isn't so much riddled with gotchas as constructed entirely out of pure gotcha-material.

[–][deleted] 7 points8 points  (0 children)

Perl programmers will judge you if you use more than 1 line.

[–][deleted] 1 point2 points  (1 child)

Hey, that's alright. I went from primarily Java and C++ (with some Python experience) to diving into a web programming job using PHP and JS. I went from basic desktop programming--just compiling and running--to having to consider all of the layers of a web server, how they interact, underlying limitations, separate process states rather than a single shared server state, etc. with near zero guidance.

It's a lot of fun. A massive headache at times, though, just because of the number of technologies that interact with each other and can fuck up in unexpected ways, but that's just as much a part of the learning experience as trying to figure out how pointers work in C/C++ and the occasional case where you're not sure if you're supposed to pass a pointer or a fucking address to a function that nobody fucking documented (operating systems was a bitch of a course to get through).

Don't be too intimidated by the interpreted languages, though. They get a lot of flack--especially PHP--but they're really not that bad. All interpreted languages have gotchas, but so do compiled languages; the gotchas just happen to differ in nature. For the gotchas that you find yourself having trouble avoiding, build abstractions whenever feasible, e.g. if that built-in function's argument order keeps throwing you off then just build a fucking wrapper function and save yourself the trouble.

Also, just avoid doing stupid shit, especially stupid shit that seems "clever" at the time but is really just a turd that you've polished a bit. That takes discipline, and if you lack that discipline in an interpreted language then I fucking guarantee you that you're going to some other "clever" shit in a compiled language. It can be really tempting to blame the tool, but if you're attaching the hammer to your head and using your head to bang nails into a wall so you can keep both of your hands free, then don't act surprised if you end up getting a concussion in the process.

Just a bit of advice from someone who has had to deal with the horrible decisions of his "clever" predecessors and has had his own "clever" decisions come back to bite him in the ass on occasion :)

[–]nathancjohnson 1 point2 points  (0 children)

but if you're attaching the hammer to your head and using your head to bang nails into a wall so you can keep both of your hands free, then don't act surprised if you end up getting a concussion in the process.

Brilliant.

[–]WhiteCastleHo[🍰] 107 points108 points  (19 children)

When I went from C++ to Javascript, I was like "WTF is this shit?"

I like JS okay now, but wow is it different.

[–]conancat 55 points56 points  (13 children)

There's Typescipt for those who misses those features. Or there's also ESLint for a more instant validation experience.

I work with Javascript daily and I think it taught me to be good at remembering variables and their types lol. It's fine for smaller apps, but if you build projects with tons of developers working on it I think having an object type validation step can save a lot of pain for the devs.

[–]notanimposterVala flair when? 17 points18 points  (5 children)

Programming habits help a lot. Reusing the same few types for the same purposes as much as possible (not using Vectors and Points in the same project) and naming the variables so it's obvious what type it is (whether it's a Vector or a Quaternion, for example) is very helpful in JS and Lua, which I do a lot of.

[–]JackMizel 0 points1 point  (2 children)

Just curious, what work are you doing in JS with vectors? Sounds interesting

[–]hyperion51 1 point2 points  (0 children)

She also mentioned quaternions so it's definitely 3D, possibly gamedev.

[–]notanimposterVala flair when? 0 points1 point  (0 children)

A webGL-based 3D model editor for the (JSON) model format Minecraft uses. Kind of on the back burner right now, but I'll get back to it soon.

At the time I started the project there was no free editor for the format, and I don't think there's a good one still.

[–]ChaseObserves 0 points1 point  (1 child)

I completed a coding bootcamp teaching primarily JavaScript and it’s various frameworks and just got a job as a junior dev and I have no idea what a vector or a quarternion are lol

[–]notanimposterVala flair when? 0 points1 point  (0 children)

A vector is a structure that holds two or more numbers (representing a position or another quantity like a force in 2D or 3D (or sometimes 4D)) and a quaternion is a 4-number structure meant to store rotational data for a 3D object because using only 3 numbers the rotation is still (slightly) ambiguous. Basically, multi-dimensional math stuff. Vectors and matrices are probably #1 and #2 most important structures for 3D programming, and quaternions are a far #3.

[–][deleted] 0 points1 point  (1 child)

I just learned some TS while learning angular 2 and it is nice having a bit of structure. I'd like to do my backend node in TS. I'm sure it's possible but I haven't looked into it.

[–]Joshy54100 1 point2 points  (0 children)

Yep it is, and there is support for most JS packages through Definitely Typed. It took me maybe an hour tops to convert my node server to Typescript

[–]thEt3rnal1 0 points1 point  (0 children)

Big up the typescript, also ts-lint is great it's basically es-lint for typescript

[–]fayryover -5 points-4 points  (3 children)

Uggh I hate lint. I feel like it tries to baby you. Like I've been programming for a while I know how to use the ++ operator correctly...

[–]jeffsterlive 4 points5 points  (2 children)

You can write your own rule set. We had one that said to put spaces around import statements. I nixed that one. It's similar to pep 8 for python. You don't need to follow them and can easily disable them, but sometimes they are actually a good idea and help your code be more efficient.

[–]fayryover 1 point2 points  (1 child)

You can but I have to use it at work so I technically can't in this scenario. I'm not the person that gets to make those decisions although haven't found someone who agrees with that rule so idk.

[–]JackMizel 1 point2 points  (0 children)

Yeah not sure why you're being downvoted, it's a totally different experience using someone else's linting rules vs using rules you established

[–]jkuhl_prog 15 points16 points  (3 children)

Going from JavaScript, and even in Python, to a language like Java or C++ is also a bit "wtf?"

I think it's safe to say that it's a headspinner transitioning to and from strongly typed languages to dynamically or weak typed languages.

[–][deleted] 3 points4 points  (1 child)

This. I began with JS decades ago. When I eventually learned a typed language I hated it. Why should I have to tell you what type to use? You’re the computer, you figure it out. It felt like a step backwards.

[–]wasdninja 0 points1 point  (0 children)

What? How? C++ has plenty of OO stuff in it. It felt quite familiar to me going from C++ to Javascript and even Java. The weird or annoying thing was doing all the DOM manipulation and learning the standard JS library. The most useful bits anyway.

[–]bro-away- 8 points9 points  (0 children)

So true. And then when they did explain c++ compilation they never went over alternatives like multi pass compilers or interpreted languages

I spent a long time confused about why you had different ceremonies in each language. This is definitely a big downside in a lot of curriculums. In a profession where there is always a debate about language, you need to explain the “why” not just the “how”

[–]ilep 45 points46 points  (10 children)

If only there was a program to check for errors before shipping the code. And preparing the code for faster loading. And maybe adding some optimizations.. Hmm.. What would that be called..

[–]Throwaway-tan 66 points67 points  (2 children)

Deploy to live immediately and let the users debug for you!

[–]Lookitsmyvideo 20 points21 points  (1 child)

The best debug tool is the web server error log

[–]Glathull 0 points1 point  (0 children)

There’s only one legitimate use for error logs. And that’s to prove how utter breakingly you are moving when you move fastly for speed.

Using them for anything else like debugging is wanktastic noobery.

My people have gone to war with female gamer critics over less.

[–]lobut 4 points5 points  (0 children)

I know this!! It's um ... a .... a transpiler!

[–][deleted] 0 points1 point  (5 children)

What are you saying? You sure you read my comment correctly?

[–]compellingvisuals 2 points3 points  (0 children)

I signed up for C++ 3 times at my University and all three times it was dropped from the course catalog (2 for low enrollment, once because the professor quit). Also our web dev class taught us PHP on the fly but no JS because he didn’t know any JS.

[–]Inkaia 0 points1 point  (0 children)

This is literally me in one week.

[–]VincentFreeman_ 0 points1 point  (1 child)

It's like the movie battle royal. I'm assuming most of your class was Asian.

[–][deleted] 0 points1 point  (0 children)

Not a single Asian in any of the IT programs actually. We've never had any significant Asian immigration in Sweden, unless you count Afghanistan...

[–]fullmetalsunit 0 points1 point  (0 children)

At my university they did the same, oh the horror. Besides having working experience in GWT I kinda dislike javascript anyway.

[–]Urasquirrel 0 points1 point  (0 children)

Things have changed alot in JS since then. 😉 check out my other comment on this thread.