#month of code
Explore tagged Tumblr posts
watchmorecinema · 2 years ago
Text
Normally I just post about movies but I'm a software engineer by trade so I've got opinions on programming too.
Apparently it's a month of code or something because my dash is filled with people trying to learn Python. And that's great, because Python is a good language with a lot of support and job opportunities. I've just got some scattered thoughts that I thought I'd write down.
Python abstracts a number of useful concepts. It makes it easier to use, but it also means that if you don't understand the concepts then things might go wrong in ways you didn't expect. Memory management and pointer logic is so damn annoying, but you need to understand them. I learned these concepts by learning C++, hopefully there's an easier way these days.
Data structures and algorithms are the bread and butter of any real work (and they're pretty much all that come up in interviews) and they're language agnostic. If you don't know how to traverse a linked list, how to use recursion, what a hash map is for, etc. then you don't really know how to program. You'll pretty much never need to implement any of them from scratch, but you should know when to use them; think of them like building blocks in a Lego set.
Learning a new language is a hell of a lot easier after your first one. Going from Python to Java is mostly just syntax differences. Even "harder" languages like C++ mostly just mean more boilerplate while doing the same things. Learning a new spoken language in is hard, but learning a new programming language is generally closer to learning some new slang or a new accent. Lists in Python are called Vectors in C++, just like how french fries are called chips in London. If you know all the underlying concepts that are common to most programming languages then it's not a huge jump to a new one, at least if you're only doing all the most common stuff. (You will get tripped up by some of the minor differences though. Popping an item off of a stack in Python returns the element, but in Java it returns nothing. You have to read it with Top first. Definitely had a program fail due to that issue).
The above is not true for new paradigms. Python, C++ and Java are all iterative languages. You move to something functional like Haskell and you need a completely different way of thinking. Javascript (not in any way related to Java) has callbacks and I still don't quite have a good handle on them. Hardware languages like VHDL are all synchronous; every line of code in a program runs at the same time! That's a new way of thinking.
Python is stereotyped as a scripting language good only for glue programming or prototypes. It's excellent at those, but I've worked at a number of (successful) startups that all were Python on the backend. Python is robust enough and fast enough to be used for basically anything at this point, except maybe for embedded programming. If you do need the fastest speed possible then you can still drop in some raw C++ for the places you need it (one place I worked at had one very important piece of code in C++ because even milliseconds mattered there, but everything else was Python). The speed differences between Python and C++ are so much smaller these days that you only need them at the scale of the really big companies. It makes sense for Google to use C++ (and they use their own version of it to boot), but any company with less than 100 engineers is probably better off with Python in almost all cases. Honestly thought the best programming language is the one you like, and the one that you're good at.
Design patterns mostly don't matter. They really were only created to make up for language failures of C++; in the original design patterns book 17 of the 23 patterns were just core features of other contemporary languages like LISP. C++ was just really popular while also being kinda bad, so they were necessary. I don't think I've ever once thought about consciously using a design pattern since even before I graduated. Object oriented design is mostly in the same place. You'll use classes because it's a useful way to structure things but multiple inheritance and polymorphism and all the other terms you've learned really don't come into play too often and when they do you use the simplest possible form of them. Code should be simple and easy to understand so make it as simple as possible. As far as inheritance the most I'm willing to do is to have a class with abstract functions (i.e. classes where some functions are empty but are expected to be filled out by the child class) but even then there are usually good alternatives to this.
Related to the above: simple is best. Simple is elegant. If you solve a problem with 4000 lines of code using a bunch of esoteric data structures and language quirks, but someone else did it in 10 then I'll pick the 10. On the other hand a one liner function that requires a lot of unpacking, like a Python function with a bunch of nested lambdas, might be easier to read if you split it up a bit more. Time to read and understand the code is the most important metric, more important than runtime or memory use. You can optimize for the other two later if you have to, but simple has to prevail for the first pass otherwise it's going to be hard for other people to understand. In fact, it'll be hard for you to understand too when you come back to it 3 months later without any context.
Note that I've cut a few things for simplicity. For example: VHDL doesn't quite require every line to run at the same time, but it's still a major paradigm of the language that isn't present in most other languages.
Ok that was a lot to read. I guess I have more to say about programming than I thought. But the core ideas are: Python is pretty good, other languages don't need to be scary, learn your data structures and algorithms and above all keep your code simple and clean.
20 notes · View notes
inkskinned · 9 months ago
Text
it is november, and yesterday it felt like it was supposed to be snowing. in boston, november used a winter month, not a fall month. it is supposed to be chilly; rarely capping over 45F. it is a sweater-and-jacket month. it is a "maybe a scarf too" month. in my childhood, november meant blizzards and sleet.
it did not snow. tomorrow the weather predicts a high of 76.
i have spent so many years of my life studying the longterm possibilities of climate change - the culmination of capitalism wreaking havoc on the bodies of people, animals, plants - but every so often i am still shocked by something small and personal.
in a hundred years, when someone goes outside in boston - will they know the feeling of "snow in the air"?
i know it's a learned feeling, a sensation that maybe only longterm experience can teach. a few years ago, i was walking with my friend who had just moved up from the south. i said it smells like snow and she gave me this look like - what the fuck. i said it feels like snow too, which didn't help. she looked up to the bright blue sky and then back at me and then back at the sky. 12 hours later, we had 3 inches. you can just tell if it's going to snow.
except i can't tell, anymore. i stand outside in a tee shirt and watch my dog dance around a lake. we're in a drought and the skin of the water has peeled back twenty meters. the lake is tamed, quiet, puddlelike and sour. my pokemon go app warns there's a weather condition in my area.
my dog gets too hot from running and sits in the water and i want to laugh about his long frame and how awkwardly he sits - and i can't. some simian part of my brain is scratching the walls. it was supposed to snow. it was supposed to snow, but now it's warm instead.
during the last full solar eclipse, the dogs and the birds and the crickets went crazy under utter darkness. we laughed at them then, promising it will all be okay in a moment. but some part of me is still locked in that long night: some animal sensation.
something is wrong, my body says. i can't afford eggs or rent. i go outside to watch a sunset and listen to birdsong. i don't bring a jacket. allergies are killing me this season, allergies i didn't have as a kid. everyone comments that halloween has started to feel strange, offkilter. that it's hard having "holiday cheer." my body thinks it's april, and then it thinks we're in september, and then june.
something is terribly wrong, she whispers. go outside. it is supposed to be snowing.
16K notes · View notes
canisalbus · 9 months ago
Text
Tumblr media
✦ Fashionably late ✦
14K notes · View notes
shepscapades · 1 year ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Surely this will have no negative consequences whatsoever!
10K notes · View notes
endangere-d · 2 months ago
Text
Tumblr media
happy pride month creepypasta fandom. i redrew this meme i made a year ago that got thousands of notes and wow am i surprised it got that many because it was very shitty
2K notes · View notes
sadagios · 3 months ago
Text
Tumblr media
self indulgent doodle of scarian as characters from a comic i made in 2022 to cheer myself up
1K notes · View notes
solshii · 5 months ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
behind the scene is lbh telling (begging) sy that he can pluck his feathers whenever he needs to write (and preferably with his mouth)
previous || extras || next
2K notes · View notes
zilanthix · 2 months ago
Text
Tumblr media Tumblr media
Happy pride to those celebrating. Unhappy pride to those not
Tumblr media Tumblr media Tumblr media
1K notes · View notes
daydreamerwonderkid · 2 years ago
Text
Tumblr media
Big bird protecting his baby bird :3
8K notes · View notes
thefishywizard · 7 months ago
Text
Tumblr media
The siblings ever
2K notes · View notes
separatist-apologist · 1 year ago
Text
Genuinely, and I mean this kindly, but learning to recognize bait and not engaging with it will change your fandom experience.
2K notes · View notes
nooskadraws · 10 months ago
Text
Tumblr media
the wizard of waterdeep ✨💜🔮
3K notes · View notes
werrrrrrrrrrrrrrrcat · 2 months ago
Text
CW: Suggestive
Tumblr media
Pretty girl, put down your pen, I'll show you how it's done
505 notes · View notes
belaweskerr · 3 months ago
Text
Tumblr media
Sketches of my man in code Veronica
546 notes · View notes
baileythebean · 2 months ago
Text
the duality of trying to explain that some relationships in fictional media can and should be interpreted as platonic because friends/family CAN IN FACT be very close and affectionate without it having some romantic context behind it and that we shouldn’t take away from ace and aro representation by using ‘oh but aces/aros can still be in relationships!’ As a simple excuse to ship them
AND
trying to explain that some characters have heavily queer-coded/romance-coded relationships that may have not become canon, but are quite obviously there if you pay attention and that some explicit relationship definition (especially for queer relationships) might be replaced by using best friend/family terminology because of censorship.
406 notes · View notes
theredrenard · 6 months ago
Text
Tumblr media
Incorrect 9-1-1 + text posts (part 41/??) prev || next
704 notes · View notes