#hardware programming
Explore tagged Tumblr posts
watchmorecinema · 1 year 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.
16 notes · View notes
digitalismmm · 10 days ago
Text
Tumblr media
Cable chaos
485 notes · View notes
computer-nerd-girl · 5 months ago
Text
Tumblr media
223 notes · View notes
scipunk · 2 months ago
Text
Tumblr media Tumblr media Tumblr media
Paranoia 1.0 AKA One Point O (2004)
115 notes · View notes
hungwy · 8 months ago
Text
i have no computer goals. i dont have any computer wants or needs. im likea computer buddhist. this is my main barrier to coding
127 notes · View notes
incorrect-hs-quotes · 1 year ago
Text
DAVE: do you think the army men in toy story came like preprogrammed with horrible memories of a war they never really fought in or did andys play create those memories
DAVE: like do they come out of the bucket quietly rocking muttering about hill 40 or did andy force them to kill
JOHN: …….gonna be thinking about that one. :(
117 notes · View notes
bynux · 7 months ago
Text
I know this take has been done a million times, but like…computing and electronics are really, truly, unquestionably, real-life magic.
Electricity itself is an energy field that we manipulate to suit our needs, provided by universal forces that until relatively recently were far beyond our understanding. In many ways it still is.
The fact that this universal force can be translated into heat or motion, and that we've found ways to manipulate these things, is already astonishing. But it gets more arcane.
LEDs work by creating a differential in electron energy levels between—checks notes—ah, yes, SUPER SPECIFIC CRYSTALS. Different types of crystals put off different wavelengths and amounts of light. Hell, blue LEDs weren't even commercially viable until the 90's because of how specific and finicky the methods and materials required were to use. So to summarize: LEDs are a contained Light spell that works by running this universal energy through crystals in a specific way.
Then we get to computers. which are miraculous for a number of reasons. But I'd like to draw your attention specifically to what the silicon die of a microprocessor looks like:
Tumblr media Tumblr media
Are you seeing what I'm seeing? Let me share some things I feel are kinda similar looking:
Tumblr media Tumblr media
We're putting magic inscriptions in stone to provide very specific channels for this world energy to flow through. We then communicate into these stones using arcane "programming" languages as a means of making them think, communicate, and store information for us.
We have robots, automatons, using this energy as a means of rudimentarily understanding the world and interacting with it. We're moving earth and creating automatons, having them perform everything from manufacturing (often of other magic items) to warfare.
And we've found ways to manipulate this "electrical" energy field to transmit power through the "photonic" field. I already mentioned LEDs, but now I'm talking radio waves, long-distance communication warping and generating invisible light to send messages to each other. This is just straight-up telepathy, only using magic items instead of our brains.
And lasers. Fucking lasers. We know how to harness these same two energies to create directed energy beams powerful enough to slice through materials without so much as touching them.
We're using crystals, magic inscriptions, and languages only understood by a select few, all interfacing with a universal field of energy that we harness through alchemical means.
Electricity is magic. Computation is wizardry. Come delve into the arcane with me.
26 notes · View notes
n64retro · 1 year ago
Text
N64 architecture
33 notes · View notes
emissary-of-dog · 3 months ago
Text
Tumblr media
@beesbeesbees42 (putting this here just so i don't spam op's notifs;) THAT I DID, YES!!! it took sooooo so long because getting all the minigame exclusive items was a pain as was fishing up the remaining fish (LOOKING AT YOU, ANGLERFISH) and getting all the health upgrades from charlotte & ambrose... but i know this game like the back of my hand it is my absolute favorite game ever and that's no exaggeration 😭😭 I DIDNT KNOW U KNEW THIS GAME TOO THATS SO KEWL!!!!!!
4 notes · View notes
shironezuninja · 3 months ago
Text
Tumblr media
10 days of emotional contempt, and I finally put these OSTs on my iTunes program this Saturday. They were ready to be uploaded to my laptop’s music library by last weekend, but that dumb Spider-Man moral obligation got in the way.
2 notes · View notes
1o1percentmilk · 1 year ago
Text
i actually think hatori is more of an electrical/hardware engineer than an informatics/information technology/software engineering person
13 notes · View notes
dullahandyke · 7 months ago
Text
Like that one post abt 'find out who are you and then do it on purpose' but instead its 'find out how to activate weird insane computer options you stumble into by accident using a keyboard shortcut. And then do them on purpose'
3 notes · View notes
digitalismmm · 1 month ago
Text
Tumblr media
03/12/21
37 notes · View notes
computer-nerd-girl · 1 year ago
Text
Tumblr media
456 notes · View notes
scipunk · 25 days ago
Text
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Paranoia 1.0 AKA One Point O (2004)
33 notes · View notes
n64retro · 1 year ago
Text
Tumblr media
source: https://www.moria.us/blog/2020/10/n64-part3-building-a-sample-program
48 notes · View notes