Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "multi core"
I used to work in a role that was basically tech support for engineers. Folks would call, we'd look at their code and see where things were going wrong.
One customer calls in, they're having timing problems with a satellite control system.
I dig down through their code, and buried in one of the modules is a comment to the effect of:
"Once we upgrade to Windows 98, we'll need to change this call to the precision counter"
They never did.
This system was running XP.
Somehow, they'd avoided destroying satellites despite having the code run on Win98, and ME without fixing that call. It wasn't until they upgraded to a multi core system and XP that their gyros stopped responding correctly.
I started two months ago a new role in a new company.
Together with 3 colleagues I manage a HUGE OpenStack platform (I’m talking about more than 300 customers, many petabytes of data, dozens of compute nodes 😍).
On Friday night a well-known multinational had the GREAT idea to update the software of one of the core components of the platform (Neutron).
Obviously it all went wrong and customers started to call and open tickets, so even if it was already past midnight we’ve been all called to arms.
As a workaround we had to rebuild ALL the networks, detach all the ports and reattach them to the VMs, with all the errors that came with this kind of operations, such as failing to get an internal/external IP, fail to boot etcetera.
What amuses me is the fact that the above-mentioned multinational just asked for logs with no solution (except for the above workaround) until Monday morning.
It has been a good weekend, i talked with professionals from all over the world, in various languages, and worked multi-tasking with two different computers, with a third that was used just to share my screen and VPN for the management network.
During this weekend I virtually met all the possible colleagues that I will meet in this new role, and it was pretty funny to see how they handle stress. (Badly if you ask)
I’ve been woken up at 7:30 after falling asleep at 6:45, I’ve slept 17 hours in 5 days, haven’t taken a shower in 5 days (I know, it happens, I worked from home) but it was worth it.
Not only and merely for the money (overtime work), but mainly for the job itself.
I love to handle this HUGE infrastructures for now, even if I think they have many limitations and many components could have been written better.
The best thing about this weekend was to meet a group of people from all over the country and the world that worked non-stop from Friday night until Wednesday night to solve the situation.
All of them understood me when I asked them questions, and didn’t treat me like the [insert random]science nerd that I am.
I felt like in the movies, in front of three monitors, working from the comfort of my chair, in my underwear, eating as fast as I could because I was constantly in call with someone.
Apart from that, WHAT THE FUCK WENT THROUGH YOUR HEAD TO DEPLOY AN UPDATE ON FRIDAY NIGHT, YOU FUCKING PIECE OF adorable man???
WHY COULDN’T YOU WAIT UNTIL MONDAY??? NOBODY USES THOSE SERVICES AT NIGHT APART FROM THE SCHEDULED JOBS!!!!!
I HOPE YOU’LL HAVE A LONG AND PROSPER LIFE, FULL OF JOY AND HAPPINESS5
Doing linguistic research where I need to parse 2000 files of a total of 36 GB. Since we are using python the first thing I thought was to implement multi threading. Now I changed the total runtime from three days to like one day and a half. But then when I checked the activity monitor I saw only 20 percent of the CPU usage. After a searching process I started to understand how multi threading and multi processing works. Moral of the story: if you want to ping a website till they block you or do easy tasks that will not use up all power of one core, do multi thrading. If you need to do something complicated that can easily consume all the powers of a single CPU core, split up the work and do multi processing. In my case, when I tried to grab information from a website, I did multi thrading since the work is easy and I really wanted to pin the website 16 times simultaneously but only have 4 cores. But when it come to text processing which a single file will take 80 percent of cpu, split it up and do multi processing.
This is just a post for those who are confused with when to use which.12
I now understand why we have multi-core processors. So that a process that dun shit the bed doesn't hog the whole fucking CPU! Of course at the expense of "yeah our shitty software can hog the CPU no problem, there's now several cores anyway". Hardware solving the crap that software presents, yet again.7
"In programming mutable state is evil. In future programming we need to avoid mutable state because we will throw cores at our code which will work on it in parallel."
Hmmm, this feature that I added seems to make the whole process 50% longer. I need to optimize something. Let's see now...
Yeah, make that a shared resource and parallelize IO to leverage the multi-core architecture. Hash map for this, binary tree for that. This thing that gets called a million times can be written easily without a regexp. That thing can be rewritten in Rust as it's too demanding.
There! Works! And it's also a lot cleaner. Nice!
How's the performance doing? 70% longer.11
Before doing any systems programming you should definitely read this book... most people think they know what they are doing but in fact they are completely clueless and the worst part is you don’t realize how clueless you are... you don’t know what you don’t know nor do you know how much you really don’t know.. a most people are part of this group, including myself lol.
Computers are much more than a bunch of CPUs, buses and peripherals. (Embedded folks realize this). But this goes beyond embedded this is a systems book, on architecture of computers in general.
Learning only java and the java/C# python and the others SDK/Api and spending your life with horse blinders for what’s going on below only sets you up for failure in the future, and when you that point it’s gonna be a shocker. Could be tomorrow could be 20 years from now, but most people with those horseblinders get to that point and have that “experience” no avoiding the inevitable lol.
I really enjoyed this book in their quantitative approach to teaching the subject. Especially understanding parallelism and multi core systems.5
I am at work, some one says to me this system we are working on is multi threaded. I tell the no its not multi threaded and in this context. Things cannot happen concurrently. Its a single core arm 7tdmi. Arguments ensue abot the difference between multithread multitasking an multiprocessing. I proceed to explain this is a multitasking interrupt driven system. With no context switching or memory segmentation so one heap for all tasks cause thats how we have it configured and there is only one core. So there is no way the error he just described could possibly happen. Then he tells me im wrong but refuses to even look at the processor manual and rejects the Wikipedia entry for multithreading. So I plan on calling off so i can just have the next two weeks off while he trys to figure out why two things ar happening at once on this system. He deserves all the frustration that is to follow.1
Inspired by @NoMad. My philosophy is that technology is a means to and ends. We’re a tool oriented species. As it relates to software and hardware, they should be your means to achieve your ends without you needing to think. Think of riding a bicycle or driving a car. You aren’t particularly conscious of them - you just adjust input based on heuristics and reflex - while your doing the activity.
For a long time Software has been horrendously bad at this. There is almost always some setup involved; you need to front-load a plan to get to your ends. Funny enough we’re in the good days now. In the early days of GUI you did have to switch modes to achieve different things until input peripherals got better.
I’ve been using windows from 95 and to this day, though it’s gotten better it’s not trivial to setup an all in one printer and scan a document - just yesterday I had to walk my mother through it and she’s somewhat proficient. Also when things break it’s usually nightmare to fix, which is why fresh installing it periodically is s meme to this day. MS still goes to great lengths with their UI so that most people can still get most of their daily stuff done without a manual.
I started Linux in University when I was offered an intro course on the shell. I’ve been using it professionally ever since. While it’s good at making you feel powerful, it requires intricate knowledge to achieve most things. Things almost never go smoothly no matter how much practice you have, especially if you need to compile tools from source. It also has very little in the ways of safe guards to prevent you from hurting yourself. Sure you might be able to fix it if you press harder but it’s less stress to just fresh install. There is also nothing, NOTHING more frustrating than following documentation to the T and it just doesn’t work! It is my day job to help companies with exactly this. Can’t really give an honest impression of the GUI ux as the distros have varying schools of thoughts with their desktop environments. Even The popular one Ubuntu did weird things for a while. In my humble opinion, *nix is better at powering the internet than being a home computer your grandma can use.
Now after being in the thick of things, priorities change and you really just want to get things done. In 2015 I made the choice to go Mac. It has been one of my more interesting experiences. Honestly, I wish more distros would adopt its philosophy. Elementary only adopted the dock. It’s just so intuitive. How do you install an application? You tap the installer, a box will pop up then you drag the icon to the application folder (in the same box) boom you are done. No setup wizards. How to uninstall? Drag icon from app folder to trash can. Boom done. How to open your app? Tap launch pad and you see all your apps alphabetically just click the one you want. You can keep your frequent ones on the dock. Settings is just another app in launchpad and everything is well labeled. You can even use your printers scanner without digging through menus. You might have issues with finder if your used to windows though and the approach to maximizing and minimizing windows will also get you for a while.
When my Galaxy 4 died I gave iPhone a chance with the SE. I can tell you that for most use cases, there is no discernible difference between iOS and modern android outside of a few fringe features. What struck me though was the power of an ecosystem. My Mac and iPhone just work well together. If they are on the same network they just sync in the background - you need to opt in. My internet went down, my iMac saw that my iPhone had 4g and gave me the option to connect. One click your up. Similar process with s droid would be multi step. You have airdrop which just allows you to send files to another Apple device near you with a tap without you even caring what mechanism it’s using. After google bricked my onHub router I opted to get Apples airport series. They are mostly interchangeable and your Mac and iOS device have a native way to configure it without you needing to mess with connecting to it yourself and blah. Setup WiFi on one device, all your other Apple devices have it. Lots of other cool stuff happen as you add more Apple devices. My wife now as a MacBook, an IPad s d the IPhone 8. She’s been windows android her life but the transition has been sublime. With family sharing any software purchase works for all of us, and not just apples stuff like iCloud and music, everything.
Hate Apple all you want but they get the core tenet that technology should just work without you thinking. That’s why they are the most valued company in the world14
I just felt like Google is the best player out there in terms of Companies.
Seriously, Well played Google.
This is not a negative opinion, I am just awe-struck at its tactics.
See, Google is currently the biggest name in terms of development in Android, ML and multi-platform software but no one can say it being a monopoly due to its dedication to open source community.
Recently Android emerged out to be One of the Biggest , most advanced, trusted and loved Technology . It saw great achievements, and up till 2016-17, it was at its peek. BUT when the market started shifting towards multi-platform boons and Ai, it got its hands into that too with its flutter and kotlin environment
One could have a negative opinion about this, But i can't seem to engulf the vast amounts of positive situations i see in this:
1) this IO18 (and many months before that) saw ML/AI being incorporated in Android (also the arcore, proje tango and many more attempts in the past) meaning that Android will not officially "die". It will just become an extremely encouraged platform( not just limited to mobiles) and a beginning of the robot -human reality ( a mobile is handling everything of your everyday life: chats, music apps sxhedules, alarms, and with an actively interacting ML, it won't be long when Android comes installed in a green bug lime droid robot serving you tea xD). Meanwhile the market of Windows games may shift to mobiles or typically " Android games" (remember, Android won't be limited to mobiles)
2)java may or may not die. The animations and smooth flow it seems to provide is always appreciated but kotlin seems to do so too. As for the hard-core apps, they are usually written in c++ .So java is in the red zone
3) kotlin-native and Flutter will be the weapons of future , for sure. they will be developing multi-platform softwares and will be dividing the market of softwares into platform specific softwares(having better ml/ai interactions,animations) and platform independent apps(access and use anywhere softwares).
And where does google stand?Its the lord varys of game of thrones which just supports and enhances the people in the realm. So it benefits the most . That's a company for you, ladies and gentlemen! If seen from common eyes they seem to be the best company ever and our 1 true king but it can also be a very thick fur cloak hiding their negetive policies and tactics , if any.
Well played, Google.16
Be me, get a consultant job, go to a supposedly great client that has fame of getting scouted by Google. (attn: I doubted all this shit before I started)
Learn the basics by a awesome mentor and trial/error stuff at the same time to get the hang of things, after that was done, I noticed there was no documentation whatsoever, code is spaghetti and your documentation, good luck!
Royal spaghetti, you can't make heads or tails of it, dev code in production, empty try/catch blocks, empty statements, if (true)... (incl. their core classes)
Keep in mind this is a multi milion dollar company...
Someone please understand my pain...6
I've said this once before and I'll say it again, if you create a game engine, development kit or the like that is single threaded with no easy ability to allow multi threaded work loads, grab a cactus and firmly shove it down your urethra :-3
(It's mostly a rant with GameMaker but fuck sake, we have CPU's with more than 1 core... Let us use them!)4
So I did this https://devrant.io/rants/797965/... which works fine until medium sized data.
However for large data the ETL pegs a 6 core Xeon (2.2GHz) with 50GB of ram. Because of it ends up doing six threaded compares, so 12 different data sets. Other than "pull less data", any tips?
Code (C#) is basically a Linq multi column join between two DataTables and when the compared columns don't match it returns as a var which is turned into a third DataTable to be SqlBulk loaded into the DB.
Table1 is external API return data (no windowing) and Table2 is from our DW.7
TL:DR: Unclear requirements led to a complete code rework
Background: We (2 friends, both already work as developers beside studying, and myself) are in a course about multi core programming for Java. We got an simple assignment which we were about to finish today.
An other friend of us is also in this course and asked if he could use some special method which is far above the taught material. He got a email with the following answer: "You are free to use any features of java 8 apart from lambdas and concurrents as we use them for our next assignment." He told us as he couldn't believe that we weren't allowed to use lambdas an we sat in front of our codebase and the only thing we could think of was "fuck".
Our entire code base was filled with lambda expressions as the requirement paper didn't mention any restrictions apart from using java 8.
FUCKING FUCKTARDS GET YOUR REQUIREMENTS RIGHT AND SAY WHAT YOU DON'T WANT TO SEE.
And here I am, sitting in front of intellij and merging my lambda filled fixing branch with our now lambda free working branch.2
I'm looking for advice on building a cross-platform java library for embedded devices, where I want the same framework for all devices, but some hardware is incompatible.
Should I make this thing multi-part, where the framework is the "core library" and hardware-specific parts are add-ons?3
Been working frontend on a very large ASP.Net Core project with React. The company is a multi national oil company. I asked for some documentation on their React components, like where is the props, why is this component showing this side-effect and is there a component for X and Y so that you won't have to pay me in order to dig around in the codebase? They told me they will document the frontend when the project is finished (whenever that may be?)
So basically, there won't ever be any documentation then.3
Sigh...this is kinda stupid.
I'm getting a new ThinkPad at work after 4 years. At first I was like "oh yeah...a new machine!". But they are replacing my quad core T540p with a dual core T560. The T560 CPU has a 30-40% less multi core benchmark score (surprise).
So...dear IT: We are not a small 50ppl company that builds some console apps or small shiny hipster web sites. We are developing fucking large business applications with dozens of projects. Our IDEs and our compiler platform are benefiting from raw CPU power and multiple cores. So can I pls not getting A FUCKING DOWNGRADE AFTER >4 YEARS FFS? THANK YOU!
(before anyone asks: keeping the current notebook is not an option because of warranty/support contracts)5
Any .NET Core and Vue.js developers here?
I made this template( Nuget ) showcasing how to use .NET Core MVC with Vue as a multi-page application. You can build multiple "mini spa's" to enhance UI or simply use plain .cshtml and razor if you don't need Vue on a particular page.
I would like to know, how many of you fellow .NET developers actually use full SPA applications and is something like this useful?
It features Vue.js, Typescript, Vuex, Vue router, Bulma, Sass and Webpack 4.
I heavily use Vue CLI and SPA's but have notices that a lot of people around me still like this approach.9