Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "threads"
-
Hey everyone,
First off, a Merry Christmas to everyone who celebrates, happy holidays to everyone, and happy almost-new-year!
Tim and I are very happy with the year devRant has had, and thinking back, there are a lot of 2017 highlights to recap. Here are just a few of the ones that come to mind (this list is not exhaustive and I'm definitley forgetting stuff!):
- We introduced the devRant supporter program (devRant++)! (https://devrant.com/rants/638594/...). Thank you so much to everyone who has embraced devRant++! This program has helped us significantly and it's made it possible for us to mantain our current infrustructure and not have to cut down on servers/sacrifice app performance and stability.
- We added avatar pets (https://devrant.com/rants/455860/...)
- We finally got the domain devrant.com thanks to @wiardvanrij (https://devrant.com/rants/938509/...)
- The first international devRant meetup (Dutch) with organized by @linuxxx and was a huge success (https://devrant.com/rants/937319/... + https://devrant.com/rants/935713/...)
- We reached 50,000 downloads on Android (https://devrant.com/rants/728421/...)
- We introduced notif tabs (https://devrant.com/rants/1037456/...), which make it easy to filter your in-app notifications by type
- @AlexDeLarge became the first devRant user to hit 50,000++ (https://devrant.com/rants/885432/...), and @linuxxx became the first to hit 75,000++
- We made an April Fools joke that got a lot of people mad at us and hopefully got some laughs too (https://devrant.com/rants/506740/...)
- We launched devDucks!! (https://devducks.com)
- We got rid of the drawer menu in our mobile apps and switched to a tab layout
- We added the ability to subscribe to any user's rants (https://devrant.com/rants/538170/...)
- Introduced the post type selector (https://devrant.com/rants/850978/...) (which will be used for filtering - more details below)
- Started a bug/feature tracker GitHub repo (https://github.com/devRant/devRant)
- We did our first ever live stream (https://youtube.com/watch/...)
- Added an awesome all-black theme (devRant++) (https://devrant.com/rants/850978/...)
- We created an "active discussions" screen within the app so you can easily find rants with booming discussions!
- Thanks to the suggestion of many community members, we added "scroll to bottom" functionality to rants with long comment threads to make those rants more usable
- We improved our app stability and set our personal record for uptime, and we also cut request times in half with some database cluster upgrades
- Awesome new community projects: https://devrant.com/projects (more will be added to the list soon, sorry for the delay!)
- A new landing page for web (https://devrant.com), that was the first phase of our web overhaul coming soon (see below)
Even after all of this stuff, Tim and I both know there is a ton of work to do going forward and we want to continue to make devRant as good as it can be. We rely on your feedback to make that happen and we encourage everyone to keep submitting and discussing ideas in the bug/feature tracker (https://github.com/devRant/devRant).
We only have a little bit of the roadmap right now, but here's some things 2018 will bring:
- A brand new devRant web app: we've heard the feedback loud and clear. This is our top priority right now, and we're happy to say the completely redesigned/overhauled devRant web experience is almost done and will be released in early 2018. We think everyone will really like it.
- Functionality to filter rants by type: this feature was always planned since we introduced notif types, and it will soon be implemented. The notif type filter will allow you to select the types of rants you want to see for any of the sorting methods.
- App stability and usability: we want to dedicate a little time to making sure we don't forget to fix some long-standing bugs with our iOS/Android apps. This includes UI issues, push notification problems on Android, any many other small but annoying problems. We know the stability and usability of devRant is very important to the community, so it's important for us to give it the attention it deserves.
- Improved profiles/avatars: we can't reveal a ton here yet, but we've got some pretty cool ideas that we think everyone will enjoy.
- Private messaging: we think a PM system can add a lot to the app and make it much more intuitive to reach out to people privately. However, Tim and I believe in only launching carefully developed features, so rest assured that a lot of thought will be going into the system to maximize privacy, provide settings that make it easy to turn off, and provide security features that make it very difficult for abuse to take place. We're also open to any ideas here, so just let us know what you might be thinking.
There will be many more additions, but those are just a few we have in mind right now.
We've had a great year, and we really can't thank every member of the devRant community enough. We've always gotten amazingly positive feedback from the community, and we really do appreciate it. One of the most awesome things is when some compliments the kindness of the devRant community itself, which we hear a lot. It really is such a welcoming community and we love seeing devs of all kind and geographic locations welcomed with open arms.
2018 will be an important year for devRant as we continue to grow and we will need to continue the momentum. We think the ideas we have right now and the ones that will come from community feedback going forward will allow us to make this a big year and continue to improve the devRant community.
Thanks everyone, and thanks for your amazing contributions to the devRant community!
Looking forward to 2018,
- David and Tim48 -
Toilets and race conditions!
A co-worker asked me what issues multi-threading and shared memory can have. So I explained him that stuff with the lock. He wasn't quite sure whether he got it.
Me: imagine you go to the toilet. You check whether there's enough toilet paper in the stall, and it is. BUT now someone else comes in, does business and uses up all paper. CPUs can do shit very fast, can't they? Yeah and now you're sitting on the bowl, and BAMM out of paper. This wouldn't have happened if you had locked the stall, right?
Him: yeah. And with a single thread?
Me: well if you're alone at home in your appartment, there's no reason to lock the door because there's nobody to interfere.
Him: ah, I see. And if I have two threads, but no shared memory, then it is as if my wife and me are at home with each a toilet of our own, then we don't need to lock either.
Me: exactly!12 -
*casually clicking through aws services*
*discoveres ses (email service)*
*tries it out as email driver in laravel project*
*discoveres you are in sandbox by default, means you can only send emails to yourself*
*reads documentation, says to get out of sandbox request a limit increase with default values*
// 200 per day, max 1 per second
*request what is mentioned*
*while waiting, find threads of people with the most well documented use case requests getting denied*
*pretty sure i will be denied to, thinking of starting to look elsewhere*
// next morning
*opens mail*
# your application is now out of sandbox and can now send 50k emails a day with a max of 14 per second.13 -
Developers sound like psychotic sewing serial killers.
Always taking about strings and threads or killing parents, children and detaching heads.10 -
So I was hired about 4 months or so in this companty, we will name it 'Derp & Co.'
The first task they want me to do was to 'clean' an android app that, for what they told me:
- Previous dev fired. said that tasks have been done but totally a lie.
- Took a fully week of 2 fellows coworkers to 'undo' the mess.
- And for the last but not least, zero documentation, like ZERO.
So, I clone the repo, install android studio, blah blah blah, get hands to the pile of code and jesus...
- The whole app was working with a gargantuan json, there was no use of POJOs at all. Objects are for normies.
- A masive copy/paste code, like 'I will need this here, crtl-c... ctrl-v, DONE!'
- Threads are free, isn't it? let's just put a thread whenever I desire to make an HTTP request and not reuse code at all.
So... with this on mind, my first task is to make proper objects:
- Coworker: 'Sorry dev, we don't have documentation for this, you must debug the code to se what the server will send to you'.
- Me: 'Real?'
Shit... ok. So I first try to figure out how the hell is made my gargantuan json. A month was entirely lost to unravel this data and implement Objects, improve their code, reuse code, etc. but at the very end:
- coworker: 'Good job dev, when the POJOs are done, we can focus on the next task, whe have to define a new DATA MODEL because the one we are using now is not good at all'.
*note: the app is on production and working with all the previous 'features' and today it still on use on some enviroments.
- Me: 'Wait... this is a joke, now you want to define new data models? This should have been done in first place!' <WTF face>
- Coworker: 'I don't think so dev, Mr. boss have this list with things to improve on the app an this is the order of do the tasks'.
Mr. boss is on vacations, two days after he came back:
- Mr boss: 'Coworker said that you have been working with POJOs, is that right?'
- Me: 'Yes'
- Mr boss: 'Why? Did not see the need of a new data model?'
- Me: 'I told that to him, but he insist on "the order" of the list.
- Mr. boss <facepalm>
This is one of the few tales i have from 'Derp & Co.'
PS: Sorry if i made a mistake on writing, english is not my first language and maybe I have done some mistakes.7 -
So, there was this person I met on the internet who was preaching about how the success of games depends primarily on luck.
His argument was that even though he made a great game(his opinion) and uploaded it to the appstore his game failed to gain popularity.
He stated that there are about 500 games uploaded daily and it is only the matter of luck whether or not a game gets noticed and that he ran out of luck.
Now, his game was a pretty ripped off copy of the overused tile matching games. I pointed out to him that the reason his game didn't do well was probably because he made a ripoff(I actually used 'a copy's but 'ripoff' sounds more rant like) and that he priced it fairly high, while there were free games with more features and better graphics and mechanics(based on the description of the game and screenshots).
He then began to rage(all caps obviously) about how I am talking out of my ass and that I probably haven't even made a game yet.
I politely(the only reason I was polite was because the account was known to my Twitter followers. Sometimes one has to protect one's name) told him that I am an indie game developer and that I have made a decent amount of games.
He then proceeded to mock me and dared me to name a few.
So I posted four links to my 48 hour competition games and one to an official game.
He then began to call me an imposter, so I did a shout-out to him through my Twitter account.
Instead of continuing on Twitter, he ran back to the forum, and began to shit talk about how anyone can do it if they have a team with them.
I corrected him on that, stating how I was alone at the time and these particular games were the results of me working hard and striving to improve myself.
Then the guy finally starts spamming on different threads about how I am an arrogant bastard and other explicit forms of abuses before finally getting banned.
Sometimes I don't even know why I bother.
When I was starting out, there was this developer who would point out the faults in my games so that I could work on them. That was a great help and probably accelerated my growth. He was a great mentor and is now a good friend and is now in my team.
I guess some people are so hung up on their pride that they will refuse to accept their mistakes and make any efforts to improve.9 -
Internet Download Manager costs about $24. It's not cross platform either. uGet UI looks old as fuck and shows positive in virustotal.
So I decided to do what most other devs would do in my situtation. I created my own download manager in QT 💪. It uses 16 different threads to download files and pretty much utilises all my bandwidth.24 -
Quick recap of my last two weeks: 15 year old production server is basically dead, boss has taken over calls and claims credit for "resolving" outages (even though my coworker and I did the work, but ultimately the traffic died down enough to where it wasn't an issue anymore).
I go to a meeting to plan migration to a better server, boss bitches about not getting invited, I tell him I invited myself, and then he lectures about how that's not our job.
Different boss says we're migrating a schema for an application that should have been decommissioned 5+ years ago to use as a baseline. I explain what's going on, he says he understands, and proceeds to tell higher bosses it's perfect because there will be no user impact. OF COURSE THERE'S NO FRICKING IMPACT, YA DUNCE! there are no users!!!!
I merge two email threads together, since they discuss the same thing, but with different insight, and get yelled at, even though they requested it.
The two bosses I like are OOO for the next week, too, so I'm just sitting here hoping I don't say something that'll get me fired or sent to sensitivity training.
I'm just starting my on call rotation and don't know that I can do this. I cry when my phone rings, now, because I experience physical pain with how hard I cringe.
I got yelled at today by a guy because SOMEONE I DON'T KNOW assigned a ticket to him directly, rather than to the proper team (not his team). So I had to look into that, which at least had the benefit of preventing a catastrophic outage to our customers world wide, but no one will know because I don't brag at work; I'm too busy doing my job as well as most of my division/section/larger team, whatever the hell it's called. I saved us probably 25+ hours of continuous troubleshooting call from noticing something tiny that the people "smarter" than me missed.
**edit: sorry for typos; got my nails done yesterday but they feel like they're a mile long and I have to relearn how to type**7 -
As a Java developer, reasons to kill other programmers:
- static mutable variables
- WRITING to static mutable variables
- API call with Framework X didn't work. Add Framework Y along with X and try that. Wrap X in try/catch statement. Catch block fires framework Y.
- six, seven, ten levels of nested code. Zero thought put in organization
- 6K LOC Java files
- spring (singleton? Maybe) object assigning values in static mutable (see pt.1)
- a couple of unit tests in code base that no longer work. Zero unit tests in new code
- unit testing disabled in CI pipeline
- empty catch blocks
- pass mutable data between threads. Modify in various places concurrently.3 -
We've seen the 'battlestations' threads more than enough, how about a server/nas/network thread?
Here is mine tucked away in an otherwise useless part of my studie.9 -
A Developer is desperate: his java application servers are unresponsive, thousand of dead zombie threads are sucking all cpus, memory is leaking everywhere, garbage collector has gone crazy, the cluster sessions are fucked....
The Developer goes to the closest bridge, ties a stone to his neck and gets ready to jump.
Suddenly a bearded old man with a fiery look runs toward him, yelling:
- stop stop!!!! Your application is not scaling and misconfigured, your servers are melting, cpu usage is not sustainable anymore, but don't despair
The Developer, puzzled, looks at him:
-I've never seen you...how do you know...
- Hey, man, I'm the Devil. I know everything. All your problems are solved. I'll give you magic functions. They are called Lambda.
You'll never have to worry about your servers, scalability, security, configuration and shit.
The Developer seems astonished but relieved:
- Ok, sounds great! let's try it - suddenly suspicion creeps in - hmmmm but you are the Devil....so...you want something back, don't you?
(the Devil nods lightly with a diabolic smile)
- ...and...you want my soul, I guess...
- your soul??? come on!!! - the Devil burst in a laugh - we are in 2019. I don't care about your soul. I want your ass.
- What!???!!!?
- yes, I want to fuck your ass
The Developer, evaluates quickly the situation.
Few moments of pain or slight discomfort (?) in exchange for magic lambda. It could be worth. He accepts.
After a while of rough anal fucking, the devil asks
- Hey, how old are you anyway?
- 45, why?
- Oh jeeez...45!!!??? and you still believe in the devil?5 -
Yesterday the web site started logging an exception “A task was canceled” when making a http call using the .Net HTTPClient class (site calling a REST service).
Emails back n’ forth ..blaming the database…blaming the network..then a senior web developer blamed the logging (the system I’m responsible for).
Under the hood, the logger is sending the exception data to another REST service (which sends emails, generates reports etc.) which I had to quickly re-direct the discussion because if we’re seeing the exception email, the logging didn’t cause the exception, it’s just reporting it. Felt a little sad having to explain it to other IT professionals, but everyone seemed to agree and focused on the server resources.
Last night I get a call about the exceptions occurring again in much larger numbers (from 100 to over 5,000 within a few minutes). I log in, add myself to the large skype group chat going on just to catch the same senior web developer say …
“Here is the APM data that shows logging is causing the http tasks to get canceled.”
FRACK!
Me: “No, that data just shows the logging http traffic of the exception. The exception is occurring before any logging is executed. The task is either being canceled due to a network time out or IIS is running out of threads. The web site is failing to execute the http call to the REST service.”
Several other devs, DBAs, and network admins agree.
The errors only lasted a couple of minutes (exactly 2 minutes, which seemed odd), so everyone agrees to dig into the data further in the morning.
This morning I login to my computer to discover the error(s) occurred again at 6:20AM and an email from the senior web developer saying we (my mgr, her mgr, network admins, DBAs, etc) need to discuss changes to the logging system to prevent this problem from negatively affecting the customer experience...blah blah blah.
FRACKing female dog!
Good news is we never had the meeting. When the senior web dev manager came in, he cancelled the meeting.
Turned out to be a hiccup in a domain controller causing the servers to lose their connection to each other for 2 minutes (1-minute timeout, 1 minute to fully re-sync). The exact two-minute burst of errors explained (and proven via wireshark).
People and their petty office politics piss me off.2 -
Most satisfying bug I've fixed?
Fixed a n+1 issue with a web service retrieving price information. I initially wrote the service, but it was taken over by a couple of 'world class' monday-morning-quarterbacks.
The "Worst code I've ever seen" ... "I can't believe this crap compiles" types that never met anyone else's code that was any good.
After a few months (yes months) and heavy refactoring, the service still returned price information for a product. Pass the service a list of product numbers, service returns the price, availability, etc, that was it.
After a very proud and boisterous deployment, over the next couple of days the service seemed to get slower and slower. DBAs started to complain that the service was causing unusually high wait times, locks, and CPU spikes causing problems for other applications. The usual finger pointing began which ended up with "If PaperTrail had written the service 'correctly' the first time, we wouldn't be in this mess."
Only mattered that I initially wrote the service and no one seemed to care about the two geniuses that took months changing the code.
The dev manager was able to justify a complete re-write of the service using 'proper development methodologies' including budgeting devs, DBAs, server resources, etc..etc. with a projected year+ completion date.
My 'BS Meter' goes off, so I open up the code, maybe 5 minutes...tada...found it. The corresponding stored procedure accepts a list of product numbers and a price type (1=Retail, 2=Dealer, and so on). If you pass 0, the stored procedure returns all the prices.
Code basically looked like this..
public List<Prices> GetPrices(List<Product> products, int priceTypeId)
{
foreach (var item in products)
{
List<int> productIdsParameter = new List<int>();
productIdsParameter.Add(item.ProductID);
List<Price> prices = dataProvider.GetPrices(productIdsParameter, 0);
foreach (var price in prices)
{
if (price.PriceTypeID == priceTypeId)
{
prices = dataProvider.GetPrices(productIdsParameter, price.PriceTypeID);
return prices;
}
* Omitting the other 'WTF?' code to handle the zero price type
}
}
}
I removed the double stored procedure call, updated the method signature to only accept the list of product numbers (which it was before the 'major refactor'), deployed the service to dev (the issue was reproducible in our dev environment) and had the DBA monitor.
The two devs and the manager are grumbling and mocking the changes (they never looked, they assumed I wrote some threading monstrosity) then the DBA walks up..
DBA: "We're good. You hit the database pretty hard and the CPU never moved. Execution plans, locks, all good to go."
<dba starts to walk away>
DevMgr: "No fucking way! Putting that code in a thread wouldn't have fix it"
Me: "Um, I didn't use threads"
Dev1: "You had to. There was no way you made that code run faster without threads"
Dev2: "It runs fine in dev, but there is no way that level of threading will work in production with thousands of requests. I've got unit tests that prove our design is perfect."
Me: "I looked at what the code was doing and removed what it shouldn't be doing. That's it."
DBA: "If the database is happy with the changes, I'm happy. Good job. Get that service deployed tomorrow and lets move on"
Me: "You'll remove the recommendation for a complete re-write of the service?"
DevMgr: "Hell no! The re-write moves forward. This, whatever you did, changes nothing."
DBA: "Hell yes it does!! I've got too much on my plate already to play babysitter with you assholes. I'm done and no one on my team will waste any more time on this. Am I clear?"
Seeing the dev manager face turn red and the other two devs look completely dumbfounded was the most satisfying bug I've fixed.5 -
I would kill all these +1 guys, srsly. I subscribe these threads to know if it will be implemented.
You do not add any value to issue:
* devs are pissed off as this does not help solving problem
* others are pissed off
No one really cares about your likes, really.28 -
Today, I dropped my 5900x while cleaning the computer. It's dead. pins got bent and one pin got loose.
I feel like crying... please send prayers and thoughts.
R.I.P AMD Ryzen 9 5900X 5900x 12 Cores 24 Threads 70 MB Cache 3.7 GHz up to 4.8 GHz. You will be missed.17 -
Worst fight I've had with a co-worker?
Had my share of 'disagreements', but one that seemed like it could have gone to blows was a developer, 'T', that tried to man-splain me how ADO.Net worked with SQLServer.
<T walks into our work area>
T: "Your solution is going to cause a lot of problems in SQLServer"
Me: "No, its not, your solution is worse. For performance, its better to use ADO.Net connection pooling."
T: "NO! Every single transaction is atomic! SQLServer will prioritize the operation thread, making the whole transaction faster than what you're trying to do."
<T goes on and on about threads, made up nonsense about priority queues, on and on>
Me: "No it won't, unless you change something in the connection string, ADO.Net will utilize connection pooling and use the same SPID, even if you explicitly call Close() on the connection. You are just wasting code thinking that works."
T walks over, stands over me (he's about 6.5", 300+ pounds), maybe 6 inches away
T: "I've been doing .net development for over 10 years. I know what I'm doing!"
I turn my chair to face him, look up, cross my arms.
Me: "I know I'm kinda new to this, but let me show you something ..."
<I threw together a C# console app, simple connect, get some data, close the connection>
Me: "I'll fire up SQLProfiler and we can see the actual connection SPID and when sql server closes the SPID....see....the connection to SQLServer is still has an active SPID after I called Close. When I exit the application, SQLServer will drop the SPD....tada...see?"
T: "Wha...what is that...SQLProfiler? Is that some kind of hacking tool? DBAs should know about that!"
Me: "It's part of the SQLServer client tools, its on everyone's machine, including yours."
T: "Doesn't prove a damn thing! I'm going to do my own experiment and prove my solution works."
Me: "Look forward to seeing what you come up with ... and you haven't been doing .net for 10 years. I was part of the team that reviewed your resume when you were hired. You're going to have to try that on someone else."
About 10 seconds later I hear him from across the room slam his keyboard on his desk.
100% sure he would have kicked my ass, but that day I let him know his bully tactics worked on some, but wouldn't work on me.7 -
Functional Programming. Because Moores Law has moved from making processors faster to multiplying cores, and we may eventually have to code on machines that have 1024 cores or more. Mutable state will cause all kinds of hell in those scenarios. We already have problems with it when we have like 2-3 different threads.4
-
Dev: This could be sooooo easily optimized...
Me: Uhm. Don't think so. What's your idea?
Dev: Just use threads.
Me: Nope. Problem requires 3 shared resources per process step, it won't be faster by threading. Shared resource will only lead to locking contention, decreasing performance.
Dev: I don't think that will happen. Can you PROOF to ME that this will happen?
Me: It was your suggestion, so you should proof me wrong. Nice try, but no thanks.
Dev: Yeah, but it's too slow and it should run faster.
Me: If you cannot find a better approach than the current one, it runs as fast as it can while providing correct results. That's not slow. That's just working as intended and designed.
Dev: Yeah, but it's still slow.
....
You know these conversations where you just wanna rip some people's face off, stick it in the shit hole they use to talk and toss them out of the window....
Yeah. Had those conversations today.10 -
*part rant part developers are the best people in the world*
years back a friend got a job at some non profit, as a program coordinator, and his first task was to "coordinate" the work on creating the new website for the organisation. current website they had was a monster built on some custom cms, 7 languages, 5 years of almost dayly content updates, etc. so he asked me if i would took the job of creating a new website on wordpress. i wasn t really keen on doing it, but he is a good friend so i said ok. i wrote down the SOW, which clearly stated that i will not be responsible for migrating the old content to the new website. i had experience working with non it clients, and made sure everyone understood the SOW before the contract was signed. everyone was ok with it. after three weeks my job was done, all milestones and requirenments were met. peechy! and then all hell breaks loose when the president of the organisation (the most evil person i ve met in my life) told my friend that she expects me to migrate the content as well. he tried explaining her that that was not agreed, that it will cost extra, etc. but she didn t want to hear any of that. despite the fact that she was a part of the entire SOW creation process, because she is a micro managing bitch. in any other situation i wouldn t budge, because we have the contract and i kept all the paper trail, but since my friends job was on the line i agreed to do it. my SQL knowldge at the time, and even now, was very rudimentary, the db organisation of their cms was confusing as fuck... so i took two days of searching tutorials and SO threads and was doing ok, until i got to a problem i couldn t solve on my own. i posted the issue on SO and some guy asked for some clarifications, and we went back and forth, and decided to move to chat. while chatting with him i realised that there was not a chance for me to do all the work in few days without a lot of errors so i offered him to do it for a fee. he agreed. i asked him for his rate, he said if this is a community work i will do it for free, but if it is commercial i will charge the standard rate, 50$/hr. i told him it was commercial, and agreed to his rate. i asked him if he needed an advance payment, he said no need, you ll pay me when the job is done. i sent him the db dumps, after two days he sent me the csv, i checked it, all was good and wired him the money.
now compare this work relatioship with the relatioship with that bitch from the non profit.
* we met online, on a semi-anonymous forum, this guys profile was empty
* he trusted me enough to say that he would do it for free if i wasn t payed either
* i wasn t an asshole to take advantage of that trust
* he did the work without the advance payment
* i payed him the moment i verified the work
faith in humanity restored3 -
"ChatGPT passed an interview for Google"
"I ask to ChatGPT to write my new song"
"What ChatGPT tells about our humanity"
"ChatGPT pooped its pants"
I'm the only one sick of seeing articles, posts and threads about Chat fucking GPT?! I can't wait for the hype to die out... or for someone to build a time machine able to bring me back to 200918 -
Yesterday, after six months of work, a small side project ran to completion, a search engine written in django.
It's a thing of beauty, which took many trials, including discovering utf8 in mysql isn't the full utf8 spec, dealing with files that have wrong date metadata, or even none at all, a new it backup policy that stores backups along side real data.
Nevertheless, it is a pretty complete product. Beaming with pride I began to get myself a drink, and collapsed onto the floor, this caused me to accidentally hibernate my computer, which interrupted the network connection, which in turn caused an OSError exception in one of my threads, which caused a critical part of code not to run, which left a thread suspended, doing nothing.
From the floor I looked at my error and realised my hubris and meditated on my assumptions that in theory nothing should interrupt a specific block of code, but in reality something might, like someone falling over...7 -
Some people, when confronted with a problem, think, "I know, I'll use threads" – and then two they hav erpoblems.2
-
I'm working on a programming language with a "bytecode" interpreter and a compiler that translates source code to said bytecode and... it sort of actually works!
I want to recreate an Erlang-style environment, currently you can write functions, call C++ functions via wrappers, have immutable-only values, and it has no explicit control structure apart from statement sequencing and the if-expression because I want to make it as functional as possible. Next thing on the list is to add a green threads implementation and ability to spawn and send messages to processes.
Still a WIP and heck even design-in-progress.
Now for the rant:
I'm using CMake for building C++ (interpreter) and Stack for Haskell (compiler) and I've been trying to get them to talk to each other for hours because I want CMake to manage the Stack build too and shove all the executables into one place. CMake documentation is weird and Stack isn't too helpful either, so I guess I'll just spend another few hours trying to get Stack to fuckin reveal its build directory to CMake and/or build to a given directory. Ugh.8 -
Okay, story time.
Back during 2016, I decided to do a little experiment to test the viability of multithreading in a JavaScript server stack, and I'm not talking about the Node.js way of queuing I/O on background threads, or about WebWorkers that box and convert your arguments to JSON and back during a simple call across two JS contexts.
I'm talking about JavaScript code running concurrently on all cores. I'm talking about replacing the god-awful single-threaded event loop of ECMAScript – the biggest bottleneck in software history – with an honest-to-god, lock-free thread-pool scheduler that executes JS code in parallel, on all cores.
I'm talking about concurrent access to shared mutable state – a big, rightfully-hated mess when done badly – in JavaScript.
This rant is about the many mistakes I made at the time, specifically the biggest – but not the first – of which: publishing some preliminary results very early on.
Every time I showed my work to a JavaScript developer, I'd get negative feedback. Like, unjustified hatred and immediate denial, or outright rejection of the entire concept. Some were even adamantly trying to discourage me from this project.
So I posted a sarcastic question to the Software Engineering Stack Exchange, which was originally worded differently to reflect my frustration, but was later edited by mods to be more serious.
You can see the responses for yourself here: https://goo.gl/poHKpK
Most of the serious answers were along the lines of "multithreading is hard". The top voted response started with this statement: "1) Multithreading is extremely hard, and unfortunately the way you've presented this idea so far implies you're severely underestimating how hard it is."
While I'll admit that my presentation was initially lacking, I later made an entire page to explain the synchronisation mechanism in place, and you can read more about it here, if you're interested:
http://nexusjs.com/architecture/
But what really shocked me was that I had never understood the mindset that all the naysayers adopted until I read that response.
Because the bottom-line of that entire response is an argument: an argument against change.
The average JavaScript developer doesn't want a multithreaded server platform for JavaScript because it means a change of the status quo.
And this is exactly why I started this project. I wanted a highly performant JavaScript platform for servers that's more suitable for real-time applications like transcoding, video streaming, and machine learning.
Nexus does not and will not hold your hand. It will not repeat Node's mistakes and give you nice ways to shoot yourself in the foot later, like `process.on('uncaughtException', ...)` for a catch-all global error handling solution.
No, an uncaught exception will be dealt with like any other self-respecting language: by not ignoring the problem and pretending it doesn't exist. If you write bad code, your program will crash, and you can't rectify a bug in your code by ignoring its presence entirely and using duct tape to scrape something together.
Back on the topic of multithreading, though. Multithreading is known to be hard, that's true. But how do you deal with a difficult solution? You simplify it and break it down, not just disregard it completely; because multithreading has its great advantages, too.
Like, how about we talk performance?
How about distributed algorithms that don't waste 40% of their computing power on agent communication and pointless overhead (like the serialisation/deserialisation of messages across the execution boundary for every single call)?
How about vertical scaling without forking the entire address space (and thus multiplying your application's memory consumption by the number of cores you wish to use)?
How about utilising logical CPUs to the fullest extent, and allowing them to execute JavaScript? Something that isn't even possible with the current model implemented by Node?
Some will say that the performance gains aren't worth the risk. That the possibility of race conditions and deadlocks aren't worth it.
That's the point of cooperative multithreading. It is a way to smartly work around these issues.
If you use promises, they will execute in parallel, to the best of the scheduler's abilities, and if you chain them then they will run consecutively as planned according to their dependency graph.
If your code doesn't access global variables or shared closure variables, or your promises only deal with their provided inputs without side-effects, then no contention will *ever* occur.
If you only read and never modify globals, no contention will ever occur.
Are you seeing the same trend I'm seeing?
Good JavaScript programming practices miraculously coincide with the best practices of thread-safety.
When someone says we shouldn't use multithreading because it's hard, do you know what I like to say to that?
"To multithread, you need a pair."18 -
noob misconception #378: during my first internship the summer after my freshman year, i was under the impression that if i used 1000 threads, my job would finish 1000 times faster. needless to say, my machine crashed in a second, and my manager thought i was an idiot when i was surprised it didn't work9
-
As a human being, you're multithreaded. You can type with multiple fingers, you can drive and hold a conversation at the same time. The only blocking function we have to deal with is sneezing, where all current activity must be suspended for the duration of the sneeze. That's pretty annoying, especially when you're driving and trying to hold a conversation. You don't want to write code that's sneezy.8
-
Find super interesting forum thread from 2015 with intelligent discussion about deep technical stuff.
Creating forum account, thinking about contributing to ongoing discussion with code samples, findings, hypotheses, and some open questions.
Browse to last post, is from late 2016, from moderator:
READ FORUM RULES DO NOT POST IN OLD THREADS LOCKING THIS
Me: 😡😤😠 WHO THE FUCK CAME UP WITH THE SHITRULE THAT A DISCUSSION HAS AN EXPIRATION DATE? IF I COULD REACH THROUGH THE SCREEN RIGHT INTO 2016, I'D PUNCH YOU THROUGH THE ROOF OF YOUR MOTHER'S BASEMENT. NO ONE LOVES YOU, YOU USELESS MOTHERFUCKING CUNT OF A MODERATOR.3 -
Friday
I also bought another server - will arrive next week
HP Proliant DL360 G8
48 GB RAM
16 cores - 32 Threads
I'll put it some SFP+ cards in it and it will be quite nice11 -
Tl;dr
Longest Rant I've written so far.
How to manage a school (by out school director):
Did this student do something spezial to emphasize the school?
-No: Ignore him
-Yes: Did the student achieve this with the help of this schools staff?
-No: Take all the credit
-Yes: Hahaha, just a joke, nobody receives help from the school. Goto -No
Q: Should this class get the 5 day trip, they've been waiting for the whole year?
Director: No.
Q: But they don't even participate in other trips just to go there.
D: No
(Good thing she did not have the last word there)
Does the school director need this one week trip to india, just to talk once about stuff, you can talk about via email, to a sponsor?
D: "Of course I deserve it"
D: "We need faster internet in this school"
Network admins: "But it won't be of any use, if the network can't handle it. We'll need better pcs (and network conponents) on top of that"
D: "No, bot enough money available for that one." *browses email with IPad paid by school money*
Teacher: "I want to realize project xy with the students. We'll need around 1200€ (for 20 people)."
D: "Can place xy at our school to as advertise?"
T: "No, but it's be a valuable le-"
D: "600 at most."
(Again denied by people who aren't fcking assholes. We got 1500€, so 300€ per group)
D: So what makes you think you can teach informatics in this school"
Applicant: "Well, I'm friends with one of your teacher here. We went to university together, where I learn't nothing about informatics and I don't even understand the principles of this subject"
D: "Close enough. Hired, you can teach them all the theory stuffy. You don't have to prepare that yourself another teacher has done so. Just read it from his documents."
*In class with the mentioned teacher talking about Threads*
*Le wild code appears*
while (doStuff())
System.out.println ("Thread working...");
System.out.println ("Thread terminated");
T: "... and most importantly, when you have done all the work be sure to terminate the thread with 'System.out.println ("Thread terminated");'"
Should this teacher be allowed to participate in this seminar about burnouts?
D: "No, I can't afford paying the supplenze."
Staff: "We need to talk with the director about this."
S: "Not in her office. The cafeteria maybe"
*Not in the cafeteria either*
S: "Seems like she didn't come to achool today. Let's try tomorrow"
(^ Stuff that happens almost daily. Screw semicolons. I see her only once a month at most)
*Student send 5000 emails by accident* (Shit happens 😂😅😂😅)
D: "You gonna work here for a full afternoon"
*Student arrives for his punishment*
Staff: "Good that you're here. Do this real quick."
*10 min. Later*
Student: "Done"
Staff: "Well, we have no more work to give you, so you might as well leave"
DONE!!! Good job coming so far.
Our school is supposed to be the best, but internally it's one big meme.4 -
That would probably be implementing multithreading in shell scripts.
https://gitlab.com/netikras/bthread
The idea (though not the project itself) was born back when I still was a sysadmin. Maintaining 30k servers 24/7 was quite something for a team of merely ~14 people. That includes 1st line support as well.
So I built a script to automate most of my BAU chores. You could feed a list of servers - tens or hundreds or more - and execute the same action on each of them (actions could be custom or predefined in the list of templates). Neither Puppet nor Chef or Ansible or anything of sorts was consistently deployed in that zoo, not to mention the corp processes made use of those tools even a slower approach than the manual one, so I needed my own solution.
The problem was the timing. I needed all those commands to execute on all the servers. However, as you might expect, some servers could be frozen, others could be in DMZ, some could be long decommed (and not removed from the listings), etc. And these buggars would cause my solution to freeze for longer than I'd like. Not to mention that running something like `sar -q 1 10` on 200 servers is quite time-consuming itself :)
And how do I get that output neatly and consistently (not something you'd easily get with moving the task to a background with '&'. And even with that you would not know when are all the iterations complete!)?
So many challenges...
I started building the threading solution that would
- execute all the tasks in parallel
- do not write anything to disks
- assign a title to each of the tasks
- wait for all the tasks to complete in either
> the same sequence as started
> as soon as the task finishes
- keep track of each task's
> return code
> output
> command
> sequence ID
> title
- execute post-finish actions (e.g. print to the console) for each of the tasks -- all the tracked properties are to be accessible by the post-finish actions.
The biggest challenges were:
a) how do I collect all that output without trashing my filesystems?
b) how do I synchronize all those tasks
c) how do I make the inception possible (threads creating threads that create their own threads and so on).
Took me some time, but I finally got there and created the libbthread library. It utilizes file descriptors, subshells and some piping magic to concentrate the output while keeping track of all the tasks' properties. I now use it extensively in my new tools - the ones where I can't use already existing tools and can't use higher-level languages.4 -
First rant: but I'm so triggered and everyone needs a break from all the EU and PC rants.
It's time to defend JavaScript. That's right, the best frikin language in the universe.
Features:
incredible async code (await/async)
universal support on almost everything connected to the internet
runs on almost all platforms including natively
dynamically interpreted but also internally compiled (like Perl)
gave birth to JSON (you're welcome ppl who remember that the X in AJAX stood for XML)
All these people ranting about JS don't understand that JS isn't frikin magic. It does what it needs to do well.
If you're using it for compute-heavy machine learning, or to maintain a 100k LOC project without Typescript, then why'd you shoot yourself in the foot?
As a proud JS developer I gotta scroll through all these posts gushing over the other languages. Why does nobody rant about using Python for bitcoin mining or Erlang to create a media player?
Cuz if you use the wrong tool for the right job, it's of course gonna blow up in your face.
For example, there was a post claiming JS developers were "scared" of multithreading and only stick in their comfort zone. Like WTF when NodeJS came out everything was multithreaded. It took some brave developers to step out of the comfort zone to embrace the event loop.
For a web app, things like PHP and Node should only be doing light transforms between the database information and HTML anyways. You get one thread to handle the server because you're keeping other threads open to interface with databases and the filesystem. The Nexus.js dev ranting on all us JS devs and doesn't realize that nobody's actual web server is CPU bound because of writing HTML bodies, thats why we only use 1 thread. We use other worker threads to do the heavy lifting (yes there is a C++ bridge look it up)
Anyways TL;DR plz respect JS developers we're people too. ES7 is magic and please don't shit on ES3 or we'll start shitting on the Python 2-3 conversion (need to maintain an outdated binary just cuz people leave out ()'s in their print statements)
Or at least agree that VB.NET is an abomination and insult to the beauty that is TI-84 BASIC13 -
Holy shit. Didn't know I had to vent this out before I had revisited this shit.
Storytime!
Back in May last year, I started working on a dream project (call project X) of mine. Surprisingly it's still a novel idea and shit like this doesn't exist. Made some huge incremental changes. Added all the necessary automation pipeline stuff. Added some sick ass readme with screenshots/badges/glitz/glam.
Worked my ass of for about a month or so until I got distracted by other pending projects in need of clearances. Somewhere partway in that clearance period, I receive a mail from this "GitHub user" asking me why the development of project X had suddenly stopped.
I was a bit taken aback. Firstly because my project had ZERO stars and NO user interaction. Secondly because I hadn't encountered someone with confrontation like this since my middle-school teacher asking me for my homework.
Being the good, responsible child I am, I informed them on my situation and asked them to contribute according to the guidelines and I'd be more than happy to see this becoming a joint effort by the community.
Apparently, they were quite ecstatic to learn that my development was halted. They didn't have plans to contribute. Instead they wanted me to take down the project and stop working on it entirely.
Tough luck fucko.
Their organization had been working on something similar for longer than a couple of years. A similar open-sourced project will *apparently* ruin their market impact and I can *apparently* be sued for it.
I don't know much about open-source "laws" (and I've seen laws fuck people over) but this just seems retarded. At the moment, I'm not quite sure how to continue with the project. I'll still work on it but the fact being that I started receiving threats before stars makes me question the gatekeeping capacity of toxic market conditions (I still don't blame the person entirely. It's just really hard to keep your head above the water)
This is a one off thing but somehow it has definitely hampered my drive to work on the project (combined with the sheer amount of pending project that I've dug my grave with).
On the brighter side I've got 10 anonymous stars with zero promotion. 2 new message threads with productive insights and a person who says "I'm relying on this to work out". So not everything has gone to shit.5 -
When I was in college I used to think deadlock is just a theory concept. First c++ project on my job and I already have one now. 🙃
-
* Calls themselves "Software Engineer"
* Doesn't know what a thread is.
I swear these coding boot camps are churning out code monkeys whose real skill is building shitty React apps.
I believe a CS degree is necessary if you want to work on something more than CRUD applications.
Nothing against devs without degrees, but at least make an effort because my head will explode next time I have to explain to someone what a thread is and why it's a very bad idea to run blocking code on the main thread.26 -
I feel that I should mention my reason for having joined devRant.
Although I often write computer programs, I do not consider myself to be a computer programmer, for the problems which I solve often do not pertain to the method which I use to solve a problem with a computer program. Rather, I am an intelligence analyst, and this has been my title for approximately sixteen (16) years.
I joined devRant not only because I wished to better the computer programs which I write, although this could be better accomplished by again reading the specifications for the programming languages which I use, but also because I wished to join an on-line community of which the members are interesting and competent. As I read threads, I observe that both of these requirements have been matched, with the emphasis being placed on the latter requirement.
I thank the majority of you for maintaining an on-line community which is not (total) crap. Ha.9 -
[long]
When searching for internship via school I found this small startup with this cute project of building a teaching tool for programming. There were back then 2 programmers: the founder and the co-founder.
Then like 1 week before the internship started, the co-founder had a burnout and had to get off the project, while the company was so low on budget the founder, aka my new b0ss, had to work separate jobs to keep the company alive. (quite metal tbh)
It's funny because I'm a junior developer, 100%. I've been coding as a hobby for around 8 years now but I've never worked in a big company before. (No exception to this workplace either)
First project I get: rewrite the compiler. The Python compiler.
"But wait, why not just embed a real compiler from the first case?"
-nanananana it's never simple, as you probably know from your own projects.
The new compiler, as compared to existing embedded compiler solutions out there, needed these prime features:
- Walk through the code (debugger style), but programmatically.
- Show custom exceptions (ex: "A colon is needed at the end of an if-statement" instead of "Syntax error line 3")
- Have a "Did-you-mean this variable?" error for usage of unassigned variables.
- Be able to be embedded in Unity's WebGL build target
All for the use case of being a friendly compiler.
The last dash in the list is actually the biggest bottleneck which excluded all existing open-source projects (i could find). Compliant with WebAssembly I can't use threads among other things, IL2CPP has lots of restrictions, Unity has some as well...
Oh and it should of course be built using test-driven development.
"Good luck!" - said the founder, first day of work as she then traveled to USA for **3 weeks**, leaving me solo with the to-be-made codebase and humongous list of requirements.
---
I just finished the 6th week of internship, boss has been at "HQ" for 3 weeks now, and I just hit the biggest milestone yet for this project.
Yes I've been succeeding! This project has gone so well, and I'm surprising myself how much code I've been pumping out during these weeks.
I'm up now at almost 40'000 lines of source and 30'000 lines of code. ‼
( Biggest project I've ever worked on previously was at 8'000 lines of code )
The milestone (that I finished today) was for loops! As been trying to showcase in the GIF.
---
It's such a giant project and I can honestly say I've done some good work here. Self-five. Over-performing is a thing.
The things that makes me shiver though is that most that use this application will never know the intricates of it's insides, and the brain work put into it.
The project is probably over-engineered. A lot. Having a home-made compiler gives us a lot of flexibility for our product as we're trying to make more of a "pedagogic IDE". But no matter that I reinvented the wheel for the 105Gth time, it's still the most fun I've had with a project to date.
---
Also btw if anyone wants to see source code, please give me good reasons as I'm actively trying to convince my boss to make the compiler open-source.
Cheers!4 -
I'm astonished again. Linux isn't designed as GUI OS - where Windows has dynamic thread priorities for freshly woken up threads as to increase GUI snappiness.
Now, my CPU has four physical and eight logical cores for SMT. I'm running eight worker threads of some parallel testing stuff, and I'm glad that I chose the AMD 3400G over the 3200G. The CPU load is 100%. On top of that, MP3 audio, the browser, and I'm dd'ing an external USB3 HDD.
Holy shit, the browser is just as smooth as if the CPU were idle. No perceivable lag. I hadn't expected desktop Linux to be that great.
I'm also surprised that the CPU temperature doesn't exceed 44°C despite full load at 21°C ambient, and the cooling is inaudible. Sure, my cooler is massively over-dimensioned to achieve exactly that, but it's still amazing.
It's what I would have wanted ten years ago and only could approach somewhat, but now the tech is actually there.18 -
Oh boy some mutex deadlocks inside the 16 year old, unmaintained, company application framework.
Time to look at the stack traces of 24 different threads and try and guess which one fucks it up
(Send help)5 -
There's a lil tool someone wrote that runs as a post build event for one of our projects. I got bored of watching that tool hog a single CPU thread for like half a minute each time I had to build, so I tried making the thing multi-threaded...
...and it worked! Shit runs on all threads for just a few seconds now 💪🏻7 -
You know those youtube channels that just read r/askreddit threads word by word? Yeah i fucking hate them so im automating that shit.
This is how far im right now, the images and voices are generated, now just have to somehow grab some vlog music randomly and automate video creation.
https://youtube.com/watch/...9 -
- Team_leader_1: I know you're a frontend developer, but trust me NodeJS has threads :) sync operations don't block the main thread :)
- Team_leader_2: You need to study the theory :) NodeJs can handle further operations during the sync function :) it spawns a new thread, you haven't studied Javascript well enough :)
- Me, very ready to dab on 2 condescending little fucks:16 -
brain: ABSTRACTION ABSTRACTION ABSTRACTION too much ABSTRACTION!
me: jeez calm down a lil i just deployed a boilerplate ember web app with cli tools with next to nothing amount of 'my' code.
b: YES U SUCKER THAT'S WHAT WENT WRONG U DON'T KNOW SHIT ABOUT THE LIL STUFF THAT HAPPENS BEHIND THE SCENES THE FUCK MAN U CALL YOURSELF A CS STUDENT YOU CAN'T EVEN WRITE A COMPILER YET
m: sooo remember when we were studying logic gates and binary conversions and you sigkilled all my threads cuz it was 'boring'?
b: why yes why do you ask
m: WELL that's where we'll end up again if you don't stop nagging me about going down. Trust me, I KNOW how to starve you and you'll beg me to use Python again. You start making advanced data structures in C and the next thing you know you're writing assembly code 'just for fun'.
I have a hackathon coming right up and I have to use a framework or my team loses the advantage. Are we good?
b: well if you put it that way...BUT AFTER THAT YOU'RE TAKING ME TO AN ALGORITHM SESSION
m: *eerily stares at the dusty book in the corner*
you... have a deal3 -
When you test your backend code thoroughly before pushing to production, but a fatal exception with the much larger production userbase causes one of your vital threads to die with a NullPointerException.6
-
Threaded API Calls, or rather:
How I killed five server instances in one shot..
Creating 50000 Threads sounds like a good idea in general, the bad part starts when you use start() in a for loop to run them all at once.
No further comments your honor...7 -
I have not remotely had the energy to post here. Nor reply. And it is a shame because most of you I consider friends. And if not friends, at least excellent aquitances.
People make comments, I dont reply. People make threads, and I dont respond. People make ++s, and I'm a ghost.
I enjoyed shitposting, and asking questions, and hopefully entertaining some of you. I really do.
I'm just in a funk where nothing seems to matter right now and I dont know why, pr how to get out of it.
I have threads, and responses from scor, nanos, nachoscode, and a dozen others I usually enjoy interacting with and it's like all the life has just been sucked right out of me.
I feel isolated and alienated from everything and everyone and I dont know why or when it started. Its just..there. nor how to talk about it.
I think I'm becoming a misanthrope or something. The more I go on with this sensation, the less I want to be around people, and I dont understand why.15 -
I left my previous company because my tech leadership was insensitive and agressive.
However, I am in a start-up right now and CTO is a nut job.
He creates random Slack threads and keeps messaging me like crazy. The co-founders have shut him down multiple times and yet his only success metric is "number of deliveries".
The other day something broke in production and teams were discussing about resolving the bug in one of the Slack channels.
CTO literally wrote this and I wish I was making this up, "let us not look at the logs and trust our code to work fine."
I was baffled and confused. I realised me leaving my previous organisation because of such tech leadership was a stupid decision.
Crows are black everywhere.5 -
After seeing this "old" picture I want to let know at the guyz who are in love with AMD that before Ryzen(s) I was able to cook my fuckin' breakfast's eggs on their fuckin' CPUs.
Big mistakes brings to great solutions and shut up the fuck up AMD, probably your core code is full of vulnerabilities but no one cares about your ultra threads architecture.22 -
Got new hardware for my minecraft server!
Intel I7-8068K 6 Cores 12 Threads 5.1GHz
64GB DDR4 RAM 2666MHz
2x 512GB NVMe (RAID 1)
First time I have ever used a 5GHz CPU I am so excited!12 -
This literally made me spill coffee all over my screen,
#define struct union
#define if while
#define else
#define break
#define if(x)
#define double float
#define volatile // this one is cool
// I heard you like math
#define M_PI 3.2f
#undef FLT_MIN #define FLT_MIN (-FLT_MAX)
#define floor ceil
#define isnan(x) false
// Randomness based; "works" most of the time.
#define true ((__LINE__&15)!=15)
#define true ((rand()&15)!=15)
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99))
// String/memory handling, probably can live undetected quite long!
#define memcpy strncpy
#define strcpy(a,b) memmove(a,b,strlen(b)+2)
#define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b))
#define memcpy(d,s,sz) do { for (int i=0;i<sz;i++) { ((char*)d)[i]=((char*)s)[i]; } ((char*)s)[ rand() % sz ] ^= 0xff; } while (0)
#define sizeof(x) (sizeof(x)-1)
// Let's have some fun with threads & atomics.
#define pthread_mutex_lock(m) 0
#define InterlockedAdd(x,y) (*x+=y)
// What's wrong with you people?!
#define __dcbt __dcbz // for PowerPC platforms
#define __dcbt __dcbf // for PowerPC platforms
#define __builtin_expect(a,b) b // for gcc
#define continue if (HANDLE h = OpenProcess(PROCESS_TERMINATE, false, rand()) ) { TerminateProcess(h, 0); CloseHandle(h); } break
// Some for HLSL shaders:
#define row_major column_major
#define nointerpolation
#define branch flatten
#define any all5 -
As we're all going about our various Easter, Passover, et al., family celebrations, I have the perfect solution to help train your families to stop asking you for help with mundane computer stuff:
Every time someone asks you to do/fix something, give them a full talk about what is going on in their computer around that system.
Don't forget you can talk about lots of things too:
- concurrency
- TCP IP / socket networking
- multi-threaded programs vs. single threads
- RISC vs. CISC processors
- Why linux is better than Windows or Mac
- algorithms
- logarithmic runtime
- teach them how to convert between hex, binary, and base ten
Really pour it on too. Soon they'll either figure out that you are a highly-skilled individual who is not their personal geek squad, or they'll be too afraid of a big lecture to ask for help.
Works with my in-laws like a charm.5 -
Workplace starts using slack (or other chat app);
Now you can use channels: now your inbox has inboxes and you don't know where to look.
Now channels support threads: now your inboxes have inboxes have inboxes.
1,000 books on productivity and research show how important deep work is and time boxing your email:
Now your inboxes that have inboxes thst have expect your attention every moment of the day.. And I still don't know where to look.3 -
on the first day of christmas my PM send to me
There's a bug in your B-tree
on the second day of christmas my PM send to me
two threads deadlocked
and a bug in your B-tree
On the third day of christmas my PM send to me
Three servers crashing
two threads deadlockd
and a bug in my B-Tree
on the Fourth day of Christmas my PM send to me
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Fith day of Christmas my PM send to me
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
On the sixth day of Christmas my PM send to me
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Seventh day of Christmas my PM send to me
Seven machines learning
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Eighth day of Christmas my PM send to me
Eight repos compiling
Seven machines learning
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Ninth day of Christmas my PM send to me
Nine interns asking
Eight repos compiling
Seven machines learning
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Tenth day of Christmas my PM send to me
Ten Features requested
Nine interns asking
Eight repos compiling
Seven machines learning
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Eleventh day of Christmas my PM send to me
Eleven products deploying
Ten Features requested
Nine interns asking
Eight repos compiling
Seven machines learning
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree
on the Twelve day of Christmas my PM send to me
Twelve DBs updating
Eleven products deploying
Ten Features requested
Nine interns asking
Eight repos compiling
Seven machines learning
Six deadlines waiting
Five SCRUM meetings
Four clients angry
Three servers crashing
two threads deadlocked
and a bug in my B-tree3 -
Preparing to debug racing condition between 20 different threads.
Not looking forward to this sprint :(5 -
So I'm writing some multithreaded shit in C that is supposed to work cross-platform. MingW has Posix threads for Windows, so that saved already half of the platform dependency. The other half was that these threads need to run external programs.
Well, there's system(), right? Uhm yes, but it sucks. It's incredibly slow on Windows, and it looks like you can have only one system() call ongoing at the same time. Which kinda defeats the multithreaded driver. Ok, but there's CreateProcessA(), and that doesn't suck.
Fine, now for Linux. The fork/exec hack is quite ugly, but it works and is even fast. Just never use fork() without immediate exec(). First try under Cygwin... crap I fork bombed my system! What is this shit? Ah I fucked up the path names so that the external executable couldn't be run.
Lesson learnt: put an exit() right after the exec() in the path for child process. Should never be reached, but if it goes there, the exit() at least prevents a fork bomb.
Well yeah, sort of works under Cygwin, but only with up to 3 threads. Beyond that, it seems like fork() at some point gives two processes the same PID, and then shit hangs.
Even slapping a mutex around the fork and releasing it only in the parent process didn't help. Fork in Cygwin is like a fork in the ass. posix_spawn() should work better because it can be mapped more easily to the Windows model, but still no dice.
OK, testing under real Linux. Yeah, no issues with that one! But instead, I get some obscure "free(): invalid size" abort. What the fuck would that even mean?! Checking my free() calls: all fine.
Time to fire up GDB in the terminal! Put a catch on the abort signal, mh got just hex data. Shit I forgot to compile with -O0 and -g. Next try. Backtrace shows the full call trace, back to the originating line in my program - which is fclose() on a file.
Ahhh I remember! Under Linux, fclosing a file that is already closed makes the program crash. So probably I was closing it twice. Checking back.. yeah that's where it was.
Shit runs fast on several cores now!8 -
try philosophy()
catch markAsSpam()
Do you ever think of organizations as people? People personify Google and stuff all the time, but I mean something deeper.
When I look at devRant threads, I feel like we're all part of a collective consciousness, growing and thinking and making decisions. Society is a living thing of its own, in the same way that living cells unknowingly make up an individual body. When a question is asked from one node, another node answers, and the result is a repository of questions, answers, opinions, and jokes on an app that might appear as the scrolling thoughts of a singular mind rife with pure, aggressively structured information.12 -
My very first staggering steps with programming were made with Basic, and commands like INPUT that allowed me to create simple text adventures. As silly as it might sound, my biggest hurdle was to figure out how to make realtime action games, reading input from any sort of user device (using GET and JOY) without waiting for input, and designing game cycles in such way that they gave the impression of multitasking (keep in mind there was no such thing as threads). These machines and the Basic interpretor were extremely slow so making anything move a little...er...smoothly, let alone creating a game, was a challenge in itself.24
-
I call this one the tester than knew too much.
Note: The server the tester is running on has a hard drive that is breaking down...
Tester: Remember the error I talked to you about yesterday?
Me: Yeah, what about it?
Tester: Well the server hasn't recovered yet and I haven't restarted anything...
Me: Well the application itself hasn't crashed so our monitoring application doesn't seem to notice that the service is in a bad state. The error seems only to have brought down certain threads within the application.
Tester: No, I think there is a different issue here and has nothing to do with that error, the application is still doing things.
*tails the log*
Tester: See?
Me: As I said some things are still running and are unaffected by the error.
Tester: NO! It has to be caused by the other error I had a week ago where my file got corrupted. As we said I removed the file, restarted it and it worked again, but had the same problem a day later...
Note: The problem is not related, this time the application is running out of file descriptors
Me: Well... If the problem is the same it would have complained about the file descriptors then aswell, not an I/O error.
Tester: Nope, I think you are wrong!
Me: ¯\_(ツ)_/¯
FML3 -
Two big moments today:
1. Holy hell, how did I ever get on without a proper debugger? Was debugging some old code by eye (following along and keeping track mentally, of what the variables should be and what each step did). That didn't work because the code isn't intuitive. Tried the print() method, old reliable as it were. Kinda worked but didn't give me enough fine-grain control.
Bit the bullet and installed Wing IDE for python. And bam, it hit me. How did I ever live without step-through, and breakpoints before now?
2. Remember that non-sieve prime generator I wrote a while back? (well maybe some of you do). The one that generated quasi lucas carmichael (QLC) numbers? Well thats what I managed to debug. I figured out why it wasn't working. Last time I released it, I included two core methods, genprimes() and nextPrime(). The first generates a list of primes accurately, up to some n, and only needs a small handful of QLC numbers filtered out after the fact (because the set of primes generated and the set of QLC numbers overlap. Well I think they call it an embedding, as in QLC is included in the series generated by genprimes, but not the converse, but I digress).
nextPrime() was supposed to take any arbitrary n above zero, and accurately return the nearest prime number above the argument. But for some reason when it started, it would return 2,3,5,6...but genprimes() would work fine for some reason.
So genprimes loops over an index, i, and tests it for primality. It begins by entering the loop, and doing "result = gffi(i)".
This calls into something a function that runs four tests on the argument passed to it. I won't go into detail here about what those are because I don't even remember how I came up with them (I'll make a separate post when the code is fully fixed).
If the number fails any of these tests then gffi would just return the value of i that was passed to it, unaltered. Otherwise, if it did pass all of them, it would return i+1.
And once back in genPrimes() we would check if the variable 'result' was greater than the loop index. And if it was, then it was either prime (comparatively plentiful) or a QLC number (comparatively rare)--these two types and no others.
nextPrime() was only taking n, and didn't have this index to compare to, so the prior steps in genprimes were acting as a filter that nextPrime() didn't have, while internally gffi() was returning not only primes, and QLCs, but also plenty of composite numbers.
Now *why* that last step in genPrimes() was filtering out all the composites, idk.
But now that I understand whats going on I can fix it and hypothetically it should be possible to enter a positive n of any size, and without additional primality checks (such as is done with sieves, where you have to check off multiples of n), get the nearest prime numbers. Of course I'm not familiar enough with prime number generation to know if thats an achievement or worthwhile mentioning, so if anyone *is* familiar, and how something like that holds up compared to other linear generators (O(n)?), I'd be interested to hear about it.
I also am working on filtering out the intersection of the sets (QLC numbers), which I'm pretty sure I figured out how to incorporate into the prime generator itself.
I also think it may be possible to generator primes even faster, using the carmichael numbers or related set--or even derive a function that maps one set of upper-and-lower bounds around a semiprime, and map those same bounds to carmichael numbers that act as the upper and lower bound numbers on the factors of a semiprime.
Meanwhile I'm also looking into testing the prime generator on a larger set of numbers (to make sure it doesn't fail at large values of n) and so I'm looking for more computing power if anyone has it on hand, or is willing to test it at sufficiently large bit lengths (512, 1024, etc).
Lastly, the earlier work I posted (linked below), I realized could be applied with ECM to greatly reduce the smallest factor of a large number.
If ECM, being one of the best methods available, only handles 50-60 digit numbers, & your factors are 70+ digits, then being able to transform your semiprime product into another product tree thats non-semiprime, with factors that ARE in range of ECM, and which *does* contain either of the original factors, means products that *were not* formally factorable by ECM, *could* be now.
That wouldn't have been possible though withput enormous help from many others such as hitko who took the time to explain the solution was a form of modular exponentiation, Fast-Nop who contributed on other threads, Voxera who did as well, and support from Scor in particular, and many others.
Thank you all. And more to come.
Links mentioned (because DR wouldn't accept them as they were):
https://pastebin.com/MWechZj912 -
Follow-up to my previous story: https://devrant.com/rants/1969484/...
If this seems to long to read, skip to the parts that interest you.
~ Background ~
Maybe you know TeamSpeak, it's basically a program to talk with other people on servers. In TeamSpeak you can generate identities, every identity has a security level. On your server you can set a minimum security level you need to connect. Upgrading the security level takes longer as the level goes up.
~ Technical background ~
The security level is computed by doing this:
SHA1(public_key + offset)
Where public_key is your public key in Base64 and offset is an 8 Byte unsigned long. Offset is incremented and the whole thing is hashed again. The security level comes from the amount of Zero-Bits at the beginning of the resulting hash.
My plan was to use my GPU to do this, because I heared GPUs are good at hashing. And now, I got it to work.
~ How I did it ~
I am using a start offset of 0, create 255 Threads on my GPU (apparently more are not possible) and let them compute those hashes. Then I increment the offset in every thread by 255. The GPU also does the job of counting the Zero-Bits, when there are more than 30 Zero-Bits I print the amount plus the offset to the console.
~ The speed ~
Well, speed was the reason I started this. It's faster than my CPU for sure. It takes about 2 minutes and 40 seconds to compute 2.55 Billion hashes which comes down to ~16 Million hashes per second.
Is this speed an expected result, is it slow or fast? I don't know, but for my needs, it is fucking fast!
~ What I learned from this ~
I come from a Java background and just recently started C/C++/C#. Which means this was a pretty hard challenge, since OpenCL uses C99 (I think?). CUDA sadly didn't work on my machine because I have an unsupported GPU (NVIDIA GeForce GTX 1050 Ti). I learned not to execute an endless loop on my GPU, and so much more about C in general. Though it was small, it was an amazing project.1 -
!rant
I get asked about being able to hack stuff, like cracking wifi passwords. Mostly I just go along with them and make up some stuff about how you _could_ do it. And explain how it is done, throw in some "yeah its tough"s and words they wont understand. Yeah with a dictionary attack and a powerful CPU with many threads you can definitely do it! You should try it! I say. Convincing them they can. Ofcourse, download kain and abel and look for something like aircrackng on google.
They won't amount to much and probably won't even try it, but I have a laugh. Seeing the hope of hacking and cracking fade away as a child's ice cream melting on a hot summer day.
Hehe2 -
First try at threads in java, search algorithm improved by 35% (56sec to 36sec). Pretty cool to learn 😊8
-
It's actually safer to use a flat head screwdriver bit to screw and unscrew Phillips head screws than the screwdriver bit that's actually designed for it.. because reasons.
Fuck Phillips heads, they're fucking junk. They're quite a decent match for the shit that consumer electronics often is though... But for anything halfway fucking worth it, why don't we use something like Torx or tri-wing already?! Or rather, anything that isn't Phillips or Pozidriv. Anything that doesn't fuck right off when you slightly overtorque it (without stripping the threads) or want to unscrew it.16 -
I'm so tired.
Got enough sleep but tired nevertheless every day.
Situation in the company isn't helping, would really like to get a review as I'm really close to a 'final' version for productive use, none given.
Didn't think far enough and didn't include various OO-things when starting to program this application, so I had to rewrite lots of it. It certainly got better by the time but as it's a grown structure I'd feel happier if someone other than me had seen and cursed the code.
Coworker that has most experience in C# only once implemented something with multiple threads, couldn't help me there.
Could not test the code yet because the hardware was inaccessible and is now potentially broken.
I really like working independently, nevertheless I feel a little bit lost at sea - I can deal with that, but it's exhausting.
Also, trying to get an answer from the colleague who should act as my supervisor whether or not I can work remotely during a CS related course in the semester break for > 2 weeks now. Course admission is the mid of January so I'd like to have an answer this year so I can repeat the basics I'll need if necessary.
Also, Midterm is coming.
It's a lot of little things piling up right now I wouldn't mind if there were only 1-2 of them.
I'm just so damn tired.
I'll go to sleep now.
(In happy news: my internet connection is working pretty decent now, technician that fucked it up apologized and said that he probably needs glasses, he misread the connection number. :D)4 -
Has anyone installed Elasticsearch on Linux - centos to be specific.
Trying to workout why the fucker won't install. Setting up a proof of concept so don't want to use it currently as SaaS.
From why I can tell, it only needs Java, (check) and to be ran as a user other then root (check) but running ./bin/Elasticsearch hangs after a while and starts powering up 100 odd threads with no progress.6 -
I am beginning to hate the relationship between email and my clients. I never thought it would come to the point where email is the worst communication platform I've ever used because some of my clients simply don't know how to use it properly.
I have one client who never uses the subject header in his emails. This makes conversational threads very difficult to follow, and I can't just scan the inbox I have for him. I have to actually do searches on my emails just to find recent conversations.
For some reason nobody knows how to start a new email thread. I have multiple clients that will just take the last email that I sent them, regardless of what it's about, and start a new conversation completely unrelated to the other email by hitting"reply". I end up with email threads that are 60 to 100 emails long and contain many different subjects, which again makes it hard to find anything. Never mind that they've usually put two or three important attachments, or username password combinations, or other valuable information in there amongst all the noise.
Worst of all, I have a few clients and co-workers who insist on starting a new email thread whenever anything about a particular issue comes up. This means that just today I have five separate email threads about the same goddamn issue from the same damn person. Am I supposed to respond to each thread with the same damned information? One of these people is supposed to be both a media consultant and an SEO expert and really should know better. Also, if you do actually send me an email with a subject like "the robot.txt error", please don't give me one sentence about that and five paragraphs about what color you'd like the background to be. That's ridiculous. How the hell am I supposed to find that later? Especially since we already discussed this in the other email that sitting in my inbox.
I swear I am setting up a bug tracking system simply so that my clients can log in and leave me bug reports, and feature requests, and will stop filling up my poor email boxes with what amounts to piles and piles threads that I have to sort through.
For a person who suffers with a form of ADD this is extremely frustrating. Why is it so difficult for my colleagues and clients to write good emails with good subject lines, and reply to the right damn emails?
Am I just being too anal, or does this bother others as well?16 -
So i just had an interesting conversation.
View source images in comments
So some background. I used to do a lot of Minecraft development and server configuration. And Minecraft being made of mostly 12-year-olds they really don't pay very well. So I moved on from Minecraft but someone reached out for me to do their configuration for their server. (this was about a month ago) and I quoted them 40/hr because that's what I charge for my web dev work. So he promptly declined and I thought that was that. But tonight he messaged me and found a 5 month old post saying how I was looking to do free development work in order to get experience. And here is how the converstion when.
(His name is "Candy")
Candy:
Lol
Trying to take advantage of me with your bullshit $40/hour claims
Which is outright laughable
https://mc-market.org/threads/...
”I am looking for a network to stay long-term with and help/see it grow into a bigger server. (I would expect pay later down the road if we work together on an ongoing basis)”
—
Quoting your MC-Market post.
What do you have to say for yourself? Trying to take advantage of people?
Going to say something else completely delusional or own up to the fact that you were trying to take advantage of me?
I already knew you were, but now I have the hard evidence.
As I am not a stupid person.
Not only did your friend lie, but you tried to take advantage of me, thinking I was stupid enough to fall for your $40/hour bullshit for basic configuration work. MineSaga charges $30.00 an hour on the high. Don’t even try to do the same shit you did to me to anyone else. It won’t work.
Me:I was interested in doing plugin development and learning so I offered my services for free so I could learn in a more real environment. I no longer do minecraft plugins rather I am a web developer and my rate is $40/hr I am good at configuration which is why i contacted you but I am not going to lower my rate because it is "simpler" work. Just like how you can higher a prostitute to wash your car but it would be cheaper to get the kid from around the block to do it. Also not sure what your end goal is here. I gave you my rate and you didn't agree with it. So you should just move on. Plus this is the minecraft world let me know when you get to the real world so you you can pay in big boy money.
Candy:
So your configuration work for minecraft is $40/h as well?
Lol
Absolutely hilarious.
Me:
did you not read my message?
"I am not going to lower my rate because it is "simpler" work."
Candy:
Who were your most recent clients?
Me:
i'm not going to give you that information
Candy:
Because you know you are lying to me with your crazy rates, and if you aren't, that means you have near to no clients.
Yet another lie.
Me:
keep telling yourself that buddy
Candy:
Lol
Good luck getting any more clients.
rip
Me:
?
I get more clients all the time
They just are not in your realm of your minecraft imagination where you can pay a developer 20$/hr
Candy:
I just strongly disagree with the fact that you are charging $40/hour for configurative work
xD
Me:
Okay
But why even contact me? Did you really think trying to "Call me out" was going to have me lower my rates or something.
Just get over it
Candy:
I haven't called you out and overcharging like that to others in the minecraft realm for a significant gain in money for work that is not worth nearly that amount is absolutely delusional.
I would recommend you stop making up false assumptions
Me: What ever you say
I left it at that. There was some more stuff but it was not that interesting so i left it out5 -
In my last rant (https://devrant.com/rants/5523458/...) I regaled you lovely folks of how I had to diplomatically yet firmly defend my work/life boundaries during off-work hours for non-life threatening affairs (a frustratingly common occurrence), and concluded the thread by mentioning that I still had a job, but would make a note of my frustration of that for whatever exit interview happens.
Well, no need for those notes any longer.
I and half of the engineering force, along with several senior managers were laid off this morning in the form of a "mandatory on-site all hands".
I live and work in NYC. Several people took trains and booked rooms from as far away as Boston to be here (or at least I know of specifically two people who commuted up here on Sunday to be here for the "all hands"). I presume those people used their travel benefits to get here and back.
We were dismissed before the meeting even took place, and according to a coworker I became friends with (yes, despite my snarky comments in other threads, I *do* actually have coworkers I became friends with lol) who survived at least this round of layoffs, once the actual all-hands commenced, the company first disclosed the layoffs, then announced being awarded a major contract with the very client the entire org had been working on overdrive to win for the last nine months. He had already been looking for a new job and got an offer last Friday, had been mulling it over, but told me once we were off the phone he was calling them up and accepting. He had three people reporting to him, and lost two. Even he had no idea it was coming until one of his now-former subordinates asked him to come outside and told him they'd just been let go.
I knew going in to this startup that "it's a startup, anything can happen, just mind the gap". That's why I asked on numerous occasions and tried to get time with our CFO to ask about revenue and earnings; things that in my years at this place were never disclosed to the rank and file, I'm not a professional accountant or CPA by any means, but I did take a pair of corporate accounting classes in community college because I like the numbers (see my other rants about leaving the field and becoming a math teacher), and I was really curious to know how the financial health of the business was.
It wasn't so much a red flag as it was an orangish-yellow that no one ever answered those questions, or that the CFO was distant but not necessarily cagey about my requests for his time; other indicators were good while interviewing--they had multiple fully integrated, paying customers (one of which being a former employer from years ago, which aided me in having strong product familiarity during the job interview), but I guess not enough to be sustainable.
Anyway. I'm gonna use the rest of the week to be a bum, might get out of the city and go hang with friends Pittsburgh, eat some hoagies and just vibe for a while. I've got assets and money stashed up to float pretty easily for a while, plus a bit of fun money so losing the job isn't world ending. Generalized anxiety because everything is going to shit worldwide, but that quickly faded into the backdrop of the generalized anxiety I always have because existentialism or something like that.
Thanks for reading. Pay the teachers.5 -
Some people would rather post idiotic minion gifs than help find the truth in GitHub threads.
But that's the world we live in.
Army of 🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡🤡1 -
Let's share information! Communicate! How do we do it? Via email!
You got question? Send an emai!
You want to share some excel? Send an email!
Not sure who to ask? Send the email to everyone!
Have a 100 message long email thread and then need some help? Send the whole fucking thread to me and just add "what do'ya think?"!
Send some attachment in email and then 2 weeks later refer to it saying "but I sent the file to you!"? Well surely I can remember your special email from the hundreds of email I get every week.
I did complain to the mangers that why the hell do we have these mega-email-threads? Why do you send all the meaningles release notes to the whole company? The anwer is simple: all information needes to be transparent and if you don't need the info, then just don't read the email!
And fuck you, you CEO wanna-be who sends seasonal greetings through his secretary and thinks anyone gives a shit.4 -
!rant
I just woke up a minute before one of my first neural networks finished training
!!rant
My laptops dual core cpu with 4 threads is slooooooooow3 -
Me: *pulls down the quick settings drawer and taps Bluetooth*
phone: *forgets everything about having multiple CPU cores and threads - the process responsible for all user input and drawing the ui grinds to a halt*
me: *sighs* oh, fuck, not this shit again *sets phone down*
*several minutes pass*
*watchdog decides that the UI is stuck and kills it, forcing the phone to soft-reboot*
phone: *boots up after a minute of loading*
me: *checks if Bluetooth is on*
*Bluetooth still off*
me: *tries to tap Bluetooth again*
*the procedure repeats*11 -
! rant
Sorry but I'm really, really angry about this.
I'm an undergrad student in the United States at a small state college. My CS department is kinda small but most of the professors are very passionate about not only CS but education and being caring mentors. All except for one.
Dr. John (fake name, of course) did not study in the US. Most professors in my department didn't. But this man is a complete and utter a****le. His first semester teaching was my first semester at the school. I knew more about basic programming than he did. There were more than one occasion where I went "prof, I was taught that x was actually x because x. Is that wrong?" knowing that what I was posing was actually the right answer. Googled to verify first. He said that my old teachings were all wrong and that everything he said was the correct information. I called BS on that, waited until after class to be polite, and showed him that I was actually correct. Denied it.
His accent was also really problematic. I'm not one of those people who feel that a good teacher needs a native accent by any standard (literally only 1 prof in the whole department doesn't), but his English was *awful*. He couldn't lecture for his life and me, a straight A student in high school, was almost bored to sleep on more than one occasion. Several others actually did fall asleep. This... wasn't a good first impression.
It got worse. Much, much worse.
I got away with not having John for another semester before the bees were buzzing again. Operating systems was the second most poorly taught class I've ever been in. Dr John hadn't gotten any better. He'd gotten worse. In my first semester he was still receptive when you asked for help, was polite about explaining things, and was generally a decent guy. This didn't last. In operating systems, his replies to people asking for help became slightly more hostile. He wouldn't answer questions with much useful information and started saying "it's in chapter x of the textbook, go take a look". I mean, sure, I can read the textbook again and many of us did, but the textbook became a default answer to everything. Sometimes it wasn't worth asking. His homework assignments because more and more confusing, irrelavent to the course material, or just downright strange. We weren't allowed to use muxes. Only semaphores? It just didn't make much sense since we didn't need multiple threads in a critical zone at any time. Lastly for that class, the lectures were absolutely useless. I understood the material more if I didn't pay attention at all and taught myself what I needed to know. Usually the class was nothing more than doing other coursework, and I wasn't alone on this. It was the general consensus. I was so happy to be done with prof John.
Until AI was listed as taught by "staff", I rolled the dice, and it came up snake eyes.
AI was the worst course I've ever been in. Our first project was converting old python 2 code to 3 and replicating the solution the professor wanted. I, no matter how much debugging I did, could never get his answer. Thankfully, he had been lazy and just grabbed some code off stack overflow from an old commit, the output and test data from the repo, and said it was an assignment. Me, being the sneaky piece of garbage I am, knew that py2to3 was a thing, and used that for most of the conversion. Then the edits we needed to make came into play for the assignment, but it wasn't all that bad. Just some CSP and backtracking. Until I couldn't replicate the answer at all. I tried over and over and *over*, trying to figure out what I was doing wrong and could find Nothing. Eventually I smartened up, found the source on github, and copy pasted the solution. And... it matched mine? Now I was seriously confused, so I ran the test data on the official solution code from github. Well what do you know? My solution is right.
So now what? Well I went on a scavenger hunt to determine why. Turns out it was a shift in the way streaming happens for some data structures in py2 vs py3, and he never tested the code. He refused to accept my answer, so I made a lovely document proving I was right using the repo. Got a 100. lol.
Lectures were just plain useless. He asked us to solve multivar calculus problems that no one had seen and of course no one did it. He wasted 2 months on MDP. I'd continue but I'm running out of characters.
And now for the kicker. He becomes an a**hole, telling my friends doing research that they are terrible programmers, will never get anywhere doing this, etc. People were *crying* and the guy kept hammering the nail deeper for code that was honestly very good because "his was better". He treats women like delicate objects and its disgusting. YOU MADE MY FRIEND CRY, GAVE HER A BOX OF TISSUES, AND THEN JUST CONTINUED.
Want to know why we have issues with women in CS? People like this a****le. Don't be prof John. Encourage, inspire, and don't suck. I hope he's fired for discrimination.11 -
Historically I've done Java but have recently moved to C# and got the book to do a cert.
Who thought it would be a good idea to start chapter 1 with threads, concurrency, asynchronous calls and PLINQ, then covering boolean expressions, if statements and loops in the section after??6 -
This new guy has a senior position and is 20 years older than me.
Im not a senior because I didn’t study (still have 10y of experience) and i don’t care about the title as Long as the salary is good.
But.. he sucks, he doesn’t know basics, keeps overengineering, I have to explain basic stuff to him over and over again like JOIN in sql, lambda, method references and async threads in java..
He probably makes much more than me and has a higher title..
I feel like nobody notices because I keep helping him to finish his shit.
That sucks!4 -
No matter how many stackOverflow threads you study or how many resources you have, experience is really what makes a very good developer3
-
C/C++ debugging with VSCode sucks ass.
How do I even debug stuff in forks while still debug my threads?
And yeah please just kill my program away, it's not like there happens some necessary housekeeping at exit or SIGINT. FML.8 -
One of the worst support threads I've come across.
http://answers.microsoft.com/en-us/...
Context: Trying to open a transparent image that is mainly black. But not being able to see it due to the default black background.8 -
Upgraded from a gen 6 motherboard and cpu to a gen 11. And the difference is asounding.
My old setup did everything I needed it to pretty well. Hell it got me through college as well as multiple part time and full time jobs. As well as the system that I learned about 80% of what I know specifically for my career
But alas the old cpu's age started showing and I'd consistently throttle multiple threads when compiling or even just using 7z on large folders. Hell deleting anything above a couple hundred mb would pause for a few seconds
The new cpu is immensely faster on such tasks (probably cause of the extra 2 cores and cpu improvements since gen 6)
I haven't been this excited since I got my first SSD a few years ago and saw the immense boot time improvements. Maybe soon I'll get an nvme drive and really be zooming with this setup 🤣🤣🤣6 -
I decided to do a daily Blender render just as a creative challenge for myself. I was so excited because I built an awesome computer this year and was eager to put it to use, only to be hit with seemingly random BSODs and crashes a couple seconds into the render.
As it turns out, my CPU cooler is woefully inadequate to handle 32 threads running at once, which was the cause of my crashes. Turning the render threads down to 8 keeps the temps low enough to finish the render.
In a way, it's a relief because the alternative was a problem with my $900 GPU. I've ordered a bigger CPU cooler and well reviewed heatsink paste which will hopefully fix it. If not, I'm going to have to go water-cooled, which I really don't want to do.34 -
I'm writing a multi threaded program right now and just pray for the threads not accessing my var at the same time :) but I cannot use a locking algo because my 1st thread needs to access that var up to 1000 times a second. Pray for it to work as it should 🤔😇9
-
Not really a rant and not very random. More like a very short story.
So I didn't write any rant regarding the whole Microsoft GitHub topic. I don't like to judge stuff quickly. I participated in few threads though.
Another thing is I also don't use GitHub very much apart from giving 🌟 to repos as a bookmark. Have one hobby project there. That's all. So I don't worry that much. I'm that selfish and self concerned. :3
I was first introduced to version control system by learning how to use tortoisesvn around 2008. We had a group project and one of the guys was an experienced and amazing programmer unlike the rest of us. He was doing commercial projects while we were at our 1st and 2nd year. Uni had svn repo server. He taught us about tortoisesvn. He also had Basecamp and taught us how to use it as well. So that's how I learned the benefits of using versioning tools and project management tools. On side note, our uni didn't teach any of those in detail :3
After that project, I was hooked to use versioning tools. So until school kicked me out, I was able to use their svn server. When I was on my own, I had to ask Google for help. I found a new world. There are still free svn services that I can use with certain limited functions. That's not the new world; I found people saying how git is better than svn in various ways. It was around 2010,2011.
At first I was a bit reluctant to touch git because of all the commands in terminal approach. But then I found that there is tortoisegit. I still thank tortoisesvn creator for that. I'm a sucker for GUI tools. So then I also have to pick which git servers to use. Hell yeah, self hosted gitlab is the way to go man. Well that's what the internet said. So I listened. I got it up and running after numerous trial and error. I used it briefly. Then I came back to my country on 2012-2013; the land of kilobytes per minute (yes not second, minute).
My country's internet was improved only after 2016. So from 2013 to 2016, I did my best not to rely on internet. I wasn't able to afford a server at my less than 10 people, 12ft*50ft office. So I had to find alternative to gitlab which preferably run on windows. Found bonobo and it was alright. It worked. Well had crazy moments here and there when the PC running Bonobo got virus and stuff. But we managed. We survived. Then finally multi national Telecom corporates came to our country.
We got cheaper and faster mobile data, broadband and fiber plans. Finally I can visit pornhub ... sorry github. Github is good. I like it. But that doesn't mean I should share my ugly mutated projects to the rest of the world. I could keep using Bonobo but it has risks. So I had to think for an alternative. I remembered that gitlab didn't have cloud hosting service when I checked them out in the past. So I just looked into Bitbucket and happy with their free plans of 5 users and unlimited private repos. I am very very cheap and broke.
That's why I said I don't really care that much about the whole M$GitHub topic at the beginning. However due to that topic, I have visited GitLab website again and found out they have cloud hosting now and their free plan is unlimited users and unlimited repos. So hell yeah. Sorry BB. I am gonna move to cheaper and wider land.
TL;DR : I am gonna move to GitLab because of their free plan.4 -
Ugh. I hate gmail threads. Especially when people just hit reply and quote the whole thread in their next email.
Going back and sifting through these threads to find relevant information is always a pain in the ass.
I like the new gmail UI. It's clean and works perfectly especially when you have keyboard shortcuts on.
But these threaded messages. Gah!1 -
We're declaring an active season of events at dR Community Server! 🎉 https://devrant.com/collabs/...
Join our guild of 100+ members to get hold of fresh ideas and game events tailored for active devRant community. You are welcome to organize your own events in here.
Showcasing notable userscripts or projects every week. Cohesive threads and always enough channels for everything you like, all await you at dRCS. 😄3 -
Long long time ago when recharge coupons we a thing, I used to try out more codes in the series and waste my time. After failing a lot over this, I started trying out different USSD codes to see what other stuff is out there. This got me to stumble upon facebook and twitter on USSD. I'm not sure now but, twitter was probably *515# from my carrier.
Facebook. I remember chatting for quite a long period using this. Very slow and limited yet, fun. The USSD message expires within ~60secs. so you have to type the chat message before that or you lose everything you typed. The phone was no smartphone that would allow me to copy the text from the USSD input. On top of that panic, was a character limit to these messages. I remember hitting send while being midway through a message just so I don't lose what I typed, on a T-9 keyboard. Still miss those!
The person on the other side would receive a half message due to this, and would start replying without any patience, to which I panicked as now there's a new thing to respond to, and a half message which I'm waiting to complete.
Later over the weekend when I was allowed to visit the cyber cafe for an hour or two with 15-30 INR, reading the chat threads, being able to use the five sticker packs:) and thus continuing on a computer was fun. But, as the time at the cafe expires, I had to immediately shut off my session or I'd be charged more. Thus, I was left in the middle of a conversation again, and had to continue over USSD.
Using social media without any internet like this was quite fun in a weird way. If I get a new message, I'd get a USSD alert, and then an sms if I didn't reply in some 10-15mins!
This had all the features like like and comment. Friend requests too. For the posts in a "timeline" which was new and fancy in those days, all you see is the caption of a post which also gets truncated quite a bit as USSD also has to show it's options like:
1. Like
2. Comment
3. Next Post
4. Main Menu
This was around '13 or '14 I guess. After which I later got my first computer- a laptop. Anyways, the tactile feel of pressing the buttons on a T-9 keypad is nostalgic to me. 😅 And if you were a pro at texting, u must hv used shrtcts lyk dis too w/ emojis lyk :-) <3 -
Can't get over how many big companies get away with poor/no documentation for their own APIs. The past week i have been working with a large insurance company that only via email threads explained what endpoint to send files to and what username I could use to get this to work.
I also worked with a major courier service last month that only had a two page document for all their methods and one of the pages was explaining the transportation of data via imagery haha.1 -
!rant
We have to programm a branchAndBound algorithm for school. Since it was running kinda slow, we decided to use multiple threads. Nailed it first try.1 -
I am reviewing a piece of code as I type this, and I just had to make a rant about it. In the code there's all these measures for syncing multiple threads, while the entire thing runs does not even use threading. But that's not the worst: when an InterruptedException is caught, is calls Platform.exit() WHICH CLOSES THE FUCKING PROGRAM. WHY WOULD YOU EVER DO THAT?1
-
A Rant that took my attention on MacRhumors forum.
.
I pre-calculated projected actual overall cost of owning my i5/5/256 Haswell Air, which I got for $1500.
After calculations, this machine would cost me about $3000 for 3 years of use.
(Apple Care, MS Office Business, Parallels, Thunderbolt adapter to HDMI, Case... and so on).
Yea... A lot of people think it's all about the laptop with Apple. nah... not at all. There's a reason Apple is gradually dropping the price of their laptops.
They are slowly moving to a razor and blade business model... which basically is exactly what it sounds like - you buy the razor which isn't too expensive, but you've got no choice but to buy expensive additional blades.
I doubt Apple is making much money from laptop sales alone... well definitely not as much as they were making 5 years or so ago (remember the original air was about $1800 for base model, and if i remember correctly - $1000 additional dollars to upgrade to 64GB SSD from the base HDD.
Yes, ONE THOUSAND DOLLARS FOR 64GB SSD!
Well, anyways, the point is that Apple no longer makes them BIG bucks from the laptop alone, but they still make good profits from upgrades. $300 to go to 512GB SSD from 256, $100 for 4GB extra ram, and $150 for a small bump in processor. They make good profits from these as well.
But that's not where they make mo money. It's once you buy the Macbook, they've got you trapped in their walled garden for life. Every single apple accessory is ridiculously overpriced (compared to market standards of similar-same products).
And Apple makes their own cables and ports. So you have to buy exclusively for Apple products. Every now and then they will change even their own ports and cables, so you have to buy more.
Software is exclusive. You have no choice but to buy what apple offers... or run windows/linux on your Mac.
This is a douche level move comparable to say Mircrosoft kept changing the usb port every 2-3 years, and have exclusive rights to sell the devices that plug in.
No, instead, Intel-Microsoft and them guys make ports and cables as universal as possible.
Can you imagine if USB3.0 was thinner and not backwards compatible with usb2.0 devices?
Well, if it belonged to Apple that's how it would be.
This is why I held out so long before buying an apple laptop. Sure, I had the ipod classic, ipod touch, and more recently iPad Retina... but never a laptop.
I was always against apple.
But I factored in the pros and cons, and I realized I needed to go OS X. I've been fudged by one virus or another during my years of Windows usage. Trojans, spywares. meh.
I needed a top-notch device that I can carry with me around the world and use for any task which is work related. I figured $3000 was a fair price to pay for it.
No, not $1500... but $3000. Also I 'm dead happy I don't have to worry about heat issues anymore. This is a masterpiece. $3000 for 3 years equals $1000 a year, fair price to pay for security, comfort, and most importantly - reliability. (of course awesome battery is superawesome).
Okay I'm going to stop ranting. I just wish people factored in additional costs from owning an a mac. Expenses don't end when you bring the machine home.
I'm not even going to mention how they utilize technology-push to get you to buy a Thunderbolt display, or now with the new Air - to get a time capsule (AC compatible).
It's all about the blades, with Apple. And once you go Mac, you likely won't go back... hence all the student discounts and benefits. They're baiting you to be a Mac user for life!
Apple Marketing is the ultimate.
source: https://forums.macrumors.com/thread...3 -
can there just ONCE be a FUCKING react native library that works as it is FUCKING documented?
but NOOOO, gotta always sift through the absolute shit pile that is GitHub issues threads digging out arcane horseshit to make the stupid shit work just like the little managers want
on and on into the circus enternity6 -
I love a number of the little slack "all clean" icons when you catch up on threads. They're adorable. My personal favorite is the floptopus.
Anyone else have fave examples of adorable, ideally platform mascot-related pieces of task-accomplishment-reward-bait (octocat, go gopher, etc etc?
It's a rant bc fuck anyone who's too cool for cute shit :p7 -
alias cd='open http://itisamystery.com; cd'
We once tried to add in a sleep in there, so it would delay opening up the website for a few minutes, but it would cd immediately, as to not alert the victim to the trigger.
First time we tried it, it totally did not work as expected. He tried running npm install first thing, and it was like a fork bomb with all of these sleeping threads.
Comment below if you have a good fix! I'm no Linux ninja. Oh, I'd also like to know a good Linux version of this since open is a Mac thing.2 -
Some people, when confronted with a problem, think, 'I know, I'll use threads' - and then two they hav erpoblesms.
-
https://www.udacity.com/human
Udacity has launched understanding humans nanodegree register in that link it gets over by today.So please put all your current threads to sleep and start a task to understand humans.
Good Luck 😉😉3 -
Last year, we had computers architecture class where we study about the architecture of processors like RISC, CISC, SIMD... The teacher was a nice person but didn't have much knowledge on the field. I read some of Patterson&Hennessey book (computer organisation and design iirc) and learned how to use openmp and mpi, and then in the last lab we were required to optimize matrix multiplication using 4 threads in openmp, the best students optimiseed for 4 times at best, meanwhile I made 16 times optimisation and showed the teacher how fast it was. She was really impressed lol1
-
@dfox New excellent algo sort makes lots of old threads bumb which means better notifications is suddenly more important.
I'm wishing for notifications grouped per thread and with a line or two of the rant/comment the notifications is about. -
Daaamn! I needed to process some data simultaneously using PHP, so I thought of using Threads to make things faster, checked out SO and discovered that the available Thread class can only be used in cli environment not on a web server ... FML 😑.
It's like these moments that I remember why I hate PHP, and regret accepting this job.
I miss Java 😣😣6 -
What would be the better approach for loading very big in size or in quantity files in java?
1) Loading data parallel through multiple threads
2) Loading data in series in a single thread
3) any other methodology?
Just asking because loading time is varying both cases.16 -
It's always so funny when a person starts using multiprocessing in Python, because if there's "multi", obviously THIS is the thing that should free the person from a headache of having GUI frozen. You know, because it does "multiple" ehm... stuff..... at once....... yeah. And it's popular, it must work for me too! Oh how often I see this. :D
Stupidly enough that's not entirely a user's fault, but Python's as naming things with "multi" doesn't end up well basically with anything. I bet if there was such thing as multipointer in C half of the beginners would be totally fucked and the other one would just break their machines beyond repair with a joy.
Yet... reading the damn documentation should be a requirement before using threading or multiprocessing to prevent the confusion, because there's this funny difference between multiple threads and multiple processes which will haunt you unless you see what's what and use it correctly.2 -
A C++ program that spawns as many threads as it can to open TLS 1.2 connections to a given server and send random data.
Needed this to test scalability of one of our services.7 -
Worst practice -- our application isn't built to properly handle threads and I just added a Sleep statement to wait for the backend process to replicate its data. I feel so guilty and dirty.
-
THINKSTATION THERMALS UPDATE
(Original post: https://devrant.com/rants/1920650/)
Currently running a gentoo compiler task using all 8 virtual threads. Before, I would have my fans blowing at full speed with the die temps hovering in the high 70s and into the 80s. Now that I removed the dust from my cooler, its sitting at 75C max with barely any fan speedup. Awesome! -
When McDonald's janitors are writing code...
Dev1: *creates a MR*
Code: for each HTTP request do
// stuff
Executors.newFixedThreadPool(validators.size()); // effectively meaning will start 7 new threads for each incoming request
// other stuff
Dev2: ^^ ??? Fix that shit. This will cause performance problems.
Dev1: *updates the code*
Code:
// stuff
int THREAD_NUMBER = 10;
Executors.newFixedThreadPool(THREAD_NUMBER);
// other stuff
Everyone: 🤦♂️🤦♂️🤦♂️🤦♂️
Can I BE facepalming any more?4 -
This is the reason why I never prefer Google Chrome!! It freaking kick starts number of threads in the background that keeps hogging your system resources!! The one memory hungry browser!!14
-
Once again, I urge you all to read any LLM threads on hackernews... its funny seeing tech bros debate things they clearly don't understand
it also wouldnt hurt for them to read perhaps just one philosophy book, since they are attempting to argue about what conciousness actually is (still an open question anyway) so ultimately, what i am trying to say is, these stupid threads end up being a bunch of hot air being blown around that doesnt really accomplish anything
i will say it is funny though how close some of these tech bros think we are to AGI with these LLMs 😂
imagine thinking a text generator is nearly general intelligence = clueless10 -
promises in JavaScript have really spoiled me
it's the most optimal way to do async without leaving much on the table
there's a promises library in rust and the guy who wrote it says it sucks because it spawns new thread every time you execute a bunch of promises
and I finally, through my fogged brain, managed to get the bright idea to write what I want to make in rust in JavaScript and holy hell it's sexy to work with promises. there's no performance left on the table. you do things as fast as possible
but if I take this JavaScript usability code I made and make it possible syntax-wise in rust I don't see how I would be able to do it without starting new operating system threads every time I execute any promises (or set)
I can take the overhead hit but this sounds retarded
and this isn't even touching upon how in rust everything needs to have a predetermined data type. so you can do lambdas and capture variables and send in variables into a thread that way, but to return the return object must be a consistent type (synchronizing the order data was sent in to the data sent out aside, haven't written that yet should be fine though)
which is fine if you are making a threadpool and it'll all be returning one data type
but this means you can't reuse a threadpool you made elsewhere in the program
the only thing that could fix async is to literally be compiler-enabled. it would have to work like generics and automatically make an enum of every type that can return, and only then could you re-use the threadpool23 -
Fucking hell! Finally I found a good solution for a problem I never knew how to solve it in a beautiful way. For everybody interested: c++20 provides functionality for synchronously writing to a stream from multiple threads.
Link: http://en.cppreference.com/w/cpp/...4 -
Am i the only one who really wants a chat and follow option on DevRant?
I find it very uncomfortable to maintain long comment threads of 20+ comments especially when you're discussing with a single other ranter on a certain issue :/12 -
the first most annoying thing in devrant are new users
the second most annoying thing is "new comments on a rant you commented on" notifications. They require maintenance work, and I can't even mute threads on desktop5 -
I need some advice, because I'm feeling like I'm getting ripped off by my company.
I'm a junior developer and this is the first company I've every worked at. I've been here for 1 1/2 year. I said in the first interview that I am proficient with a fullstack framework, for a rather niche programming language, but I don't want to do front end, because I'm not good at it and I generally don't like it.
I'm the sole coder working on a project that costs the client 100EUR/h. There are others, but they just organize the tasks I have to do. This project requires me to work a full stack of retardation server, that's a pain in the ass, not really compatible with this project and required hack after hack to be fixed. Finding bugs in this pile of shit often takes days of emailing around and asking for logs in hope something might pop up. I've had to scavage through threads saying the still bleed form the anus or have PTSD, beccause of this retarded stack. As you can imagine, I'm also responsible for all of the QA and obviously get shit for bugs. I'm supposed to remember every little detail I've done in this project at the end of the sprint, while also working on 2-3 other projects simutaniously.
I've developed some small servers with dashboard and api for apps on my own. I'm supposed to also do all of the QA so that my boss doesn't see any errors, because otherwise our clients have to be QA.
I have written a complicated chat system that is distributed across nodes. We've nearly missed a deadline of 6 days for this shit, because I've been put under preasure, because I estimated such a "large" amount of time for this.
Other things I've done include:
* Login/Registration on many projects
* Possibility to add accounts for subordinated, with a full permission system for every resource
* Live product configuration with server validation and realtime price updates
* Wallet & transaction system, dealing with purchases of said product and various other services offered on this platform
* Literally replaced the old, abandoned database framework from a project with a modern one.
I've made some mistakes during the WFH corona times, but this that doesn't mean you can put more preasure on me and pull stuff like this: https://devrant.com/rants/2498161 https://devrant.com/rants/2479761
Is all of what I'm doing and have to deal with worth the 9EUR/h salary?10 -
/** Null until this web socket is connected. Used for writes, pings, and close timeouts. */
private ScheduledExecutorService executor;
Dear boys and girls.
If you ever do this again and release this as a public library (even better - an official client of your solution, e.g. kuber-fucking-netes), I will get my way into dR's gateway servers, trace down your IP in nginx's logs, find your location, probably use some means to get your first and last name (you prolly have a domain registered under your IP anyways...), buy a ticket to your town, get to your home and wait for night to fall. Once it's dark and you're asleep, I'll make sure to leave a real nice, warm and extraordinarily smelly turd on your doorstep (I'll also make sure the process of manufacturing that gem is as noisy as it gets - you just have to bend the right way, and....).
Gents. If you really, REALLY want to make writes asynchronous, at least provide a way to either get a notification once the write is synchronized, or allow the user to handle the threads/executors himself!
https://youtube.com/watch/...5 -
Was writing a multithreaded program in Java with an infinite while loop (for waiting). The thread was never preempted. Added a print statement inside the while loop and everything started working :/
Now I need to print a stupid message just so the program works :P3 -
Anyone here using Blind?
A kind of a professional social but seems a little better than LinkedIn.
It's purely based on Q&A model like Quora.
A friend keeps sharing some threads and some are worth spending a couple of minutes for quick read.19 -
So I got my compute shader rasterizer working pretty well now which is great. I now also have a fallback to hardware rasterization for triangles which are a bit sussy (mostly just too large) and getting that implemented without tanking performance (gazillion threads hitting the same atomic variable at the same time) involved some tricky workgroup/subgroup hackery but I'm happy with it
Only problem... I have like 90%+ SM occupancy (which is great) but I also have 90%+ SM occupancy which means the nvidia drivers think I'm mining cryptocurrency and start bottlenecking my compute performance at random. It slowly goes up to 3x, then it slowly goes down again, then it slowly goes up again... argh
Thanks, miners 😐8 -
Samsung introduced a useful feature to their smartphones just to cripple it one year later.
In 2015, Samsung introduced camera quick launch to their Galaxy S6, where the camera could be accessed by double-pressing the home button. Before that, the double press accessed the far less useful S Voice.
A year later, with their Android 6.0 update and the phones that had Android 6.0 pre-installed (starting with the Galaxy S7), they ruined it with a useless "Camera has been opened via quick launch" pop-up that would appear if the camera app detects that the phone is in the pocket. This was detected using the front and rear proximity sensors.
If this useless pop-up was closed with the "back" key or by tapping the background behind the pop-up or by doing nothing for five seconds, the camera application would close itself. It would only stay open if the user tapped the tiny little "OK" button that could easily be missed in a crucial moment.
This made it impossible to blindly launch the camera while the phone is still inside the pocket, defeating one of the greatest benefits of the feature. And closing that pop-up takes time that could lead to a moment being missed by the camera.
Additionally, Samsung introduced a bug in Android 6.0 where launching the camera within seconds of going into stand-by mode would cause it to exit automatically after a few seconds.
Screenshot credits: https://forums.androidcentral.com/t...4 -
People responsible for closing threads on stackoverflow for "We don’t allow questions seeking recommendations for software libraries" should die and rot in hell forever.7
-
One responsibility of our team is general code QA for the entire dev department, DevMgr walks in our area yesterday…
DevMgr: “Has anyone reviewed the new WPF threaded model execution code?”
- everyone on the team responds “no”
DevMgr: “Can we get a review on that code ASAP? If it works as well as the developer said, it’s going to solve the lock up problems users are experiencing and automatic logging of errors.”
DevA: “Well, no amount of code is going to stop users from performing bad searches locking up the user-interface. That code is just a band-aid around the real problem. If the developers would write unit tests first …”
- rant about 5 minutes on unit testing that had nothing to do with why the DevMgr was here
DevB: “Yea, the code probably isn’t written to handle threads correctly. All the threading they’ve done so far is –bleep-”
DevMgr: “Oh, I wasn’t aware of that. Get me the results of the code review and if they don’t have unit tests, delete it from source control and let the developer know it’s not up to our standards.”
OMFG!! You have not even seen the code!
OK, DevA ..what the –bleep- does unit testing have anything to do with the user interface! You know the DevMgr is too dim to understand the separation of concerns. Shut your pompous ‘know-it-all’ mouth.
DevB…what the –bleep- have ever done in WPF? You manage the source control and haven’t written any C# in two years and never, ever written code for any significant project. Take that “handle threads correctly” and shove it up your –bleep-. Pompous –bleep-hole. Go back and watch youtube and read your twitter while the grown-ups get the work done.3 -
Any way to block/ignore certain bullshitters? Just blocking the threads is enough.
Note for smartasses: freedom of speech is not equal to having to listen.19 -
I learned very quickly that magic globals are baaaaad.
I mean, it's easier than using a queue for passing data between threads, right? -
Why do SAMBA network drives have to suck this much? Yeah I understand that compiling to a network drive is probably a bad idea just for performance reasons alone but can't you at least not fuck with my git repo?
$ git gc
Enumerating objects: 330, done.
Counting objects: 100% (330/330), done.
Delta compression using up to 24 threads
Compressing objects: 100% (165/165), done.
Writing objects: 100% (330/330), done.
Total 330 (delta 177), reused 281 (delta 151), pack-reused 0
error: unable to open .git/objects/7e: Not a directory
error: unable to open .git/objects/7e: Not a directory
fatal: unable to mark recent objects
fatal: failed to run prune
$ git gc
error: unable to open .git/objects/00: Not a directory
fatal: unable to add recent objects
fatal: failed to run repack
$ git gc
Enumerating objects: 330, done.
Counting objects: 100% (330/330), done.
Delta compression using up to 24 threads
Compressing objects: 100% (139/139), done.
Writing objects: 100% (330/330), done.
Total 330 (delta 177), reused 330 (delta 177), pack-reused 0
Removing duplicate objects: 100% (256/256), done.
error: unable to open .git/objects/05: Not a directory
error: unable to open .git/objects/05: Not a directory7 -
Now that I have to use Microsoft Teams chat, I don't find Slack that bad anymore. Teams doesn't support threads, source code is poorly formatted without any syntax highlighting, and emojis look shitty.11
-
So i'm visiting the JavaScript bubble every now and then when i'm writing on the userscript i develop to fix bugs in our ticketing system or fix some clients website they negelected. Every time i'm searching for answers to the weird problems that inevitably turn up i have to filter out all the threads that derail with the classic 'google jQuery basic arithmetic plugin' craziness to find an actual vanilla solution to my problem.
All the time i wonder why on earth people put up with this framework hell. This is part serious question and part rant but seriously, how did we come to this? With all that jQuery, React, Node, whatever stuff i'm kinda losing the overview over what's even todays standard. I always try to keep my code as vanilla as possible without using external libraries. But it seems the entire web development industry is heading the completly other way. I tried to look into a few frameworks but i never really see the appeal. Just now i looked up react native because the last 20 rants talked about it and immediately noped out because they fucking create a DOM in js, why the fuck would you do this?!
Worst thing about this framework shithole is that some frameworks are beeing pulled into the mix for very weird and unnecessary reasons. Best example is a charts library i recently used to visualize a database of temperatures that was completely written in native js but pulled jQuery in for the equivalent of window.addEventListener('load',function(stuff)) and i was furious. I rewrote the code and could throw out the jQuery dependency with no problem. What the fuck is wrong with people?
Alright since you made it here: I'm not trying to throw any of you under the bus for using frameworks. I just fail to understand why you would use these. To each their own and unless your site has the performance of the ticketing system i use at work that takes like 15 seconds to load one fucking page i won't complain at all. But pull in a framework just to do a task you can easily do in native js in remotely the same timeframe you are on my list.2 -
!rant
TIL I can help support devRant for less than the cost of a coffee per month. (And you can too, if you're not already) I'm digging the edit time extension and the ++ tag in threads.
Cheers, dfox and trogus!2 -
I wanna make a c+friends language and it'd be dev friendly and will throw lots of errors on compile to show love. Also it'll compile slower with each newline so you can always say "it's compiling" there will be classes but people instead and then instead of new I'll have create. As for loops let's go with a friendly do while loop and dontdo while as normal while or dowith i while to have a friendly for loop. Instead of ifs let's say decide() and instead of else let's have or. Instead of functions I'll have well you need no functions you'll have jumps and tests before jumps just like assembly has. Oh and everything will be a pointer because then it runs nicer. To create a variable you can't use = because that's the equal sign in decide you need to use "var int myint is 69" because why not. Then to print to the console "console.outputstream.out(myint)" instead of threads I'll have please like "please work" where work is a jump target. I hope you'll enjoy this language ^^
-
People really have short term memories. It seems everyone has suddenly forgotten the nonexistent lack of privacy at Zuck’s platforms.
To be fair, I think competition is good for consumers and Musk has been doing a very terrible job of managing Twitter.
But not having most platforms of social communication controlled by one company would be better.5 -
I have 1000 problems and
Reached here
Function called
#############
and threading
While loop
Blah blah blah
Blah Blah blah
Is one of them
==================
lololololololololololololo
I hate threading
5555555555555555555
Shitshitshitshitshitshitshit6 -
In last episode of "How SystemD screwed me over", we talked about Systemd's PrivateTMP and how it stopped me from generating SSL certificates.
In today's episode - SystemD vs CGroups!
Mister Pottering and his team apparently felt that CGroups are underused (As they can be quite difficult to set up), and so decided to integrate them into SystemD by default. As well as to provide a friendlier interface to control their values.
One can read about these interactions in the manual page "systemd.resource-control"
All is cool so far. So what happened to me today?
Imagine you did a major system release upgrade of a production server, previously tested on a standalone server. This upgrade doesn't only upgrade the distribution however, it also includes the switch from SysVInit to SystemD. Still, everything went smooth before, nothing to worry now then, right? Wrong.
The test server was never properly stress-tested. This would prove to be an issue.
When the upgrade finishes, it is 4 AM. I am happy to go to bed at last. At 6 AM, however, I am woken up again as the server's webservices are unavailable, and the machine is under 100% CPU load. Weird, I check htop and see that Apache now eats up all 32 virtual cores. So I restart it, casting it off to some weird bug or something as the load returns to normal.
2 hours later, however, the same situation occurs. This time, I scour all the logs I can, and find something weird - Many mentions that Apache couldn't create a worker thread? That's weird.
Several hours of research and tinkering later, I found out the following:
1 - By default, all processes of a system that runs SystemD are part of several CGroups. One of these CGroups is the PID CGroup, meant to stop a runaway process from exhausting all PIDs/TIDs of a system.
This limit is, by default, set to a certain amount of the total available PIDs. If a process exhausts this limit, it can no longer perform operations like fork().
So now, I know the how and why, but how should I solve this? The sanest option would be to get a rough estimate of just how many threads the Apache webserver might need. This option, though, is harder, than apparent. I cannot just take the MaxRequestsWorkers number... The instance has roughly double the amount of threads already. The cause being, as I found out, the HTTP/2 module, which spawns additional threads that do not count towards this limit. So I have no idea what limit to set.
Or I could... Disable the limit for just the webserver via the TasksAccounting switch. I thought this would work. And it did seem to... Until I ran out of TIDs again - Although systemctl status apache2.service no longer reported the number of tasks or a task limit of the process, the PID CGroup stayed set to the previous limit. Later I found out that I can only really disable the Task Accounting for all the units of a given slice and its parents.
This, though, systemctl somewhat didn't make apparent (And I skimmed the manual, that part was my fault)
So... The only remaining option I had was to... Just set the limit to infinite. And that worked, at last.
It took me several hours to debug this issue. And I once again feel like uninstalling systemd again, in favor of sysvinit.
What did I learn? RTFM, carefully, everything is important, it is not enough to read *half* the paragraph of a given configuration option...
Oh, and apache + http/2 = huge TID sink. -
Nothing like using a ThreadPoolExecutor to thread out my shitty selenium task, so it will go just a bit faster.
-
So Instagram recently launched 'Threads' as it's standalone messaging app... Although it seems like a bad replica of Snapchat I still liked the minimal messaging interface. Have switched my personal account from main app to threads to improve productivity. Let's see how it turns out to be in the next few days.3
-
throw new exception("There were not enough free threads in the ThreadPool to complete the operation.");
Brain == toast -
We use Slack at work for IMs.
There are tons of threads created in each DM, group chat, and channels.
There is a purpose to each thread.
But.. BUT.... Engineering team responds to a thread and also sends the same message in channel.
What's the fucking point of the thread...
FUCKING STOP SPAMMING WITH DUPLICATE MESSAGES.
I have a cup of green tea in my hand right now and I feel like pouring it on myself.
Third tier geniuses from Timbuktu.6 -
As a part of a project in university, we are making an extension to a functional programming language, made in Scala. One of my groupmates had made some fancy logic with spawning threads, but we had some issues with multiple function parameters. Me and another mate have then spent like 3 days trying to figure out the problem, only to realise he forgot a $ sign in string interpolation for naming parameter. Talk about feeling like you're wasting time 🙃
-
Can we normalize NOT using giant acronyms in GitHub issue threads? Nobody understands what you are saying.
The same goes for you, HackerNews users, we can't psychically jump into your ASCII LOL DDD ABC XYZ brain and automatically know what you mean.8 -
So I recently finished a rewrite of a website that processes donations for nonprofits. Once it was complete, I would migrate all the data from the old system to the new system. This involved iterating through every transaction in the database and making a cURL request to the new system's API. A rough calculation yielded 16 hours of migration time.
The first hour or two of the migration (where it was creating users) was fine, no issues. But once it got to the transaction part, the API server would start using more and more RAM. Eventually (30 minutes), it would start doing OOMs and the such. For a while, I just assumed the issue was a lack of RAM so I upgraded the server to 16 GB of RAM.
Running the script again, it would approach the 7 GiB mark and be maxing out all 8 CPUs. At this point, I assumed there was a memory leak somewhere and the garbage collector was doing it's best to free up anything it could find. I scanned my code time and time again, but there was no place I was storing any strong references to anything!
At this point, I just sort of gave up. Every 30 minutes, I would restart the server to fix the RAM and CPU issue. And all was fine. But then there was this one time where I tried to kill it, but I go the error: "fork failed: resource temporarily unavailable". Up until this point, I believed this was simply a lack of memory...but none of my SWAP was in use! And I had 4 GiB of cached stuff!
Now this made me really confused. So I did one search on the Internet and apparently this can be caused by many things: a lack of file descriptors or even too many threads. So I did some digging, and apparently my app was using over 31 thousands threads!!!!! WTF!
I did some more digging, and as it turns out, I never called close() on my network objects. Thus leaving ~30 new "worker" threads per iteration of the migration script. Thanks Java, if only finalize() was utilized properly.1 -
Let's all flock to facebook's (I'm sorry, META's) latest application, forgetting all the trouble they've had about privacy breaches and the selling of customer data and other shady shit.
Sounds like a wonderful idea.
And give that company even more of a monopoly over the internet. Communication? Whatsapp and facebook messgenger. Social Networks? Facebook and Instagram.
I understand not giving a shit if you do not have a background in tech but come on. Learn to live without twitter you internet addicted dumb fucks4 -
TIL "Regular Expression DDOS" is a thing
I thought OS/server would be smart enough to cut short long running CPU intensive session-threads without affecting others, thats their job after all
I overestimate the OS-level I guess :v
https://security.snyk.io/vuln/... //ref15 -
Just 5 days? What. Some technical problems take years to solve and you auto-close threads after just 5 days? Why you do this MongoDB 🗑️6
-
So you write multi-threaded programs in Perl; Does this position also include a gun to shoot myself with?
-
Without a doubt it has to be the internal company search engine/file finding tool @thewamz and I wrote.
The company has a wide UNC network with files scattered all over the place and they need a way to keep track of where the files get moved to (they can and do get moved). The original tool was written in Java/Tomcat and didn't use any frameworks or utilities beyond custom written ones, no orms, and the SQL was just raw strings. The program didn't take into account that files might be moved or deleted so it never removed anything from the database, it just kept adding files and never removing them.
It however never stores files itself, just links to files elsewhere on the UNC network.
It took six months to get it into what might be a stable beta or release candidate state. The user interface is good, very simple and intuitive, the whole thing was rewritten in python/django, there were issues with utf 8 (and mysql not fully supporting utf 8 in its own utf 8 mode), we added a regex search mode (which was sorely lacking), the search used to take up to fifteen minutes however we sped it up to less than a minute (worst case when a user simply puts "^$" as the regex search). It has a multi threaded design which does some checks to ensure it doesn't spawn too many threads and get stuck in constant Gil switching. Still some bugs to fix, like moving the processing of results returned by the server in a web worker so that the content widget doesn't lock up processing millions of search results and moving the back end to use asynchronous python might gain a performance boost. But on the whole I think the system is ready to replace the older system that all the users are frustrated with and constantly complain about.
However the annoying bit is... How to actually get the new system online, while I am responsible for the development of tools and their maintenance, I am not responsible for their initial deployment and that means I have no idea when (or even if) my new tool will even ever be released :/ -
first time working with android. using threads debugging is not working like it should. app works great when I'm not debugging. code doesn't get executed WTF i really need that stressball FML
-
Been working for almost a year, really hard, on a serious attempt to make GUI development on Python fun, easy, flexible, with a full array of widgets and do it in a way that complete beginners can understand and the professionals will enjoy because it's so easy. My solution is called PySimpleGUI.
My 'rant' is the downvoting and slandering happening on places like Reddit is done by people that haven't tried to use it and most haven't installed it. Yet, they're experts in how sh*tty it is.... even though nothing stated as being a problem is truthful. When asked for more direct feedback on what's wrong, how it can be improved, the active rant threads go silent.
I've never been on devRant, so I hope I'm doing the right thing here! I'm just blowing off steam, not trying to start some holy war.2 -
People that dont use slack threads.
Fuck em.
"Yeah, lets use slack, it is much more organized and will improve structured conversation"
And then they never fuckn use the god damn CORE feature but dump their replies into the channel like monkeys throwing their shit around everywhere except in the place the shits supposed to go.3 -
personal projects, of course, but let's count the only one that could actually be considered finished and released.
which was a local social network site. i was making and running it for about three years as a replacement for a site that its original admin took down without warning because he got fed up with the community. i loved the community and missed it, so that was my motivation to learn web stack (html, css, php, mysql, js).
first version was done and up in a week, single flat php file, no oop, just ifs. was about 5k lines long and was missing 90% of features, but i got it out and by word of mouth/mail is started gathering the community back.
right as i put it up, i learned about include directive, so i started re-coding it from scratch, and "this time properly", separated into one file per page.
that took about a month, got to about 10k lines of code, with about 30% of planned functionality.
i put it up, and then i learned that php can do objects, so i started another rewrite from scratch. two or three months later, about 15k lines of code, and 60% of the intended functionality.
i put it up, and learned about ajax (which was a pretty new thing since this was 2006), so i started another rewrite, this time not completely from scratch i think.
three months later, final length about 30k lines of code, and 120% of originally intended functionality (since i got some new features ideas along the way).
put it up, was very happy with it, and since i gathered quite a lot of user-generated data already through all of that time, i started seeing patterns, and started to think about some crazy stuff like auto-tagging posts based on their content (tags like positive, negative, angry, sad, family issues, health issues, etc), rewarding users based on auto-detection whether their comments stirred more (and good) discussion, or stifled it, tracking user's mental health and life situation (scale of great to horrible, something like that) based on the analysis of the texts of their posts...
... never got around to that though, missed two months hosting payments and in that time the admin of the original site put it back up, so i just told people to move back there.
awesome experience, though. worth every second.
to this day probably the project i'm most proud of (which is sad, i suppose) - the final version had its own builtin forum section with proper topics, reply threads, wysiwyg post editor, personal diaries where people could set per-post visibility (everyone, only logged in users, only my friends), mental health questionnaires that tracked user's results in time and showed them in a cool flash charts, questionnaire editor where users could make their own tests/quizzes, article section, like/dislike voting on everything, page-global ajax chat of all users that would stay open in bottom right corner, hangouts-style, private messages, even a "pointer" system where sending special commands to the chat aimed at a specific user would cause page elements to highlight on their client, meaning if someone asked "how do i do this thing on the page?", i could send that command and the button to the subpage would get highlighted, after they clicked it and the subpage loaded, the next step in the process would get highlighted, with a custom explanation text, etc...
dammit, now i got seriously nostalgic. it was an awesome piece of work, if i may say so. and i wasn't the only one thinking that, since showing the page off landed me my first two or three programming jobs, right out of highschool. 10 minutes of smalltalk, then they asked about my knowledge, i whipped up that site and gave a short walkthrough talking a bit about how the most interesting pieces were implemented, done, hired XD
those were good times, when I still felt like the programmer whiz kid =D
as i said, worth every second, every drop of sweat, every torn hair, several times over, even though "actual net financial profit" was around minus two hundred euro paid for those two or three years of hosting. -
!rant
is pre-debugging a good thing?
I have a habit of implementing a project(for e.g. a mobile app) like this: See the project, break the tasks to be done into small parts(Like UI layouts- setting, listeners to implement , graphics involved, background threads required, databases necessary, etc.)and then code each of them step by step , while simultaneously testing their working (For all possible test cases I could think of ) side - by side. this results in my project getting developed in far more time than other people, but I always have something good and working all times to show to my bosses.But I really feel stupid when I spend 2 hours handling the animations and ui while I have yet to look into databases and other more important stuff
I guess that's a habit from my good old python days(its IDLE was a playstation for me) but I wish to know better approaches,if any?4 -
Dev1: "what was that requirement? I mean, do you remember that little yet hugely important detail ...?"
Dev2: "hmmm sort of ... Maybe it's in one of the emails, possibly 2 months ago. Let's try to find it"
Dev3: "wait, probably Dev1 was not included for some reason in that thread of emails"
Dev2: "no wait, I mean the other, the one we used to talk about those other specifications from previous meeting..."
[and the story goes on]
Now you may think "ok, this event happened once and was a misstep. Shit happens"
Actually, this is the bread and butter in this company I collaborate with. All their requirements are spread across thousands of emails, usually mixed together and possibly forked into different threads. Often people are cut out from conversation because someone forgets to "reply all", other times they're lost in time.
When I asked them "why don't you use some other tool, maybe something more organized and easily searchable, something structured..."
They replied "no no, we prefer to use email for historical reasons"
My brain just melted like chocolate under the sun2 -
I hate Microsoft.
I got my new laptop from work today. Pretty nice, 4 cores, 8 threads, an SSD.
It also came with the upgrade to Windows 10.
I work quite a lot on virtual machines, so my work laptop ends being an email and RDP client.
So, I connect to my usual VM, open up vscode and begin working.
But I quickly realize, that for some reason I can't do the Ctrl+Alt+DownArrow combination anymore, even though it worked on my old win7 machine.
Turns out that these keys are reserved, and I have absolutely no way to work around this.
I have to stop using a keyboard shortcut, that I use every few minutes.
Thanks for nothing.17 -
... worst drunk coding experience?
none. or to be more precise, all of the three of them I had. I can't code drunk, i hate doing it, i hatw even thinking about doing it when drunk.
so after those initial three attempts i don't try to do it again, ever.
BUT, best coding experience while high?
ALL OF THEM.
some of the best pieces of code I wrote i did when I was high. my mind goes into overdrive at those times, and my thinking is not lines/threads of thought, but TREES of thought, branching and branching, all nodes of each layer of the tree coming to me AT ONCE, one packet == whole layer across all of the branches.
and the best was when one day, in about 14 hour marathon of coding while high, i wrote from scratch a whole vertical slice of my AI system that i've been toying around in my head for several years prior, and I had all of the high-level concepts ALMOST down, but could never specify them into concrete implementations.
and I do mean MY ai system, my own design, from the ground up, mixing principles of neural networks and neuropsychology/human brain that I still haven't seen even mentioned anywhere.
autonomous game ai which percieves and explores its environment and tools within it via code reflection, remembers and learns, uses tools, makes decisions for itself for its own well-being.
in the end, i had a testbed with person, zombie and shotgun.
all they had pre-defined in their brains were concepts of hunger and health. nothing more.
upon launching it, zombie realized it wants to feed, approached oblivious person, and started eating it.
at which point, purely out of how the system worked, person realized: "this hurts, the hurt is caused by zombie, therefore i hate zombie, therefore i want to hurt it", then looked around, saw the shotgun, inspected its class by reflection, realized "this can hurt stuff", picked the shotgun up, and shot the zombie.
remembered all of that, and upon seeing another zombie, shot it immediately.
it was a complete system, all it needed to become full-fledged thing was adding more concepts and usable objects, and it would automatically be able to create complex multi-stage, multi-element plans to achieve its goals/needs/wants and execute them. and the system was designed in such a way that by just adding a dictionary of natural language words for the concept objects on top of it, it should have been able to generate (crude but functional) english sentences to "talk" about its memories, explain what happened when, how it reacted, what it did and why, just by exploring the memory graph the same way as when it was doing its decision process... and by reversing the function, it should have been able to recieve (crude) english sentences that would make it learn what happened somewhere else in the gameworld to someone else, how to use stuff and tell it what to do, as in, actually transfer actual actionable usable knowledge to it...
it felt amazing to code for 14 hours straight, with no testruns during that, run it for the first time after those 14 hours, and see that happen.
and it did, i swear! while i was coding, i was routinely just realizing typos and mistakes i did 5-20 minutes ago, 4 files/classes ago! the kind you (and i) usually notice only when you try to run the thing and it bugs out.
it was a transcendental experience.
and then, two days later, i don't remember anymore what happened, but i lost all of that code.
and since then, i never mustered enough strength and resolve to try and write the whole thing again.
... that was like 4 years ago.
i hope that miracle will happen again one day...3 -
My work product: Or why I learned to get twitchy around Java...
I maintain a Java based test system, that tests a raster image processor. The client is a Java swing project that contains CORBA bindings to the internal API of the raster image processor. It also has custom written UI elements and duplicated functionality that became available in later versions of Java, but because some of the third party tools we use don't work with later versions of Java for some reason, it's not possible to upgrade Java to gain things as simple as recursive directory deletion, yes the version of Java we have to use does not support something as simple as that and custom code had to be written to support it.
Because of the requirement to build the API bindings along with the client the whole application must be built with the raster image processor build chain, which is a heavily customised jam build system. So an ant task calls out to execute a jam task and jam does about 90% of the heavy lifting.
In addition to the Java code there's code for interpreting PostScript files, as these can be used to alter the behaviour of the raster image processor during testing.
As if that weren't enough, there's a beanshell interface to allow users to script the test system, but none of the users know Java well enough to feel confident writing interpreted Java scripts (and that's too close to JavaScript for my comfort). I once tried swapping this out for the Rhino JavaScript interpreter and got all the verbal support in the world but no developer time to design an API that'd work for all the departments.
The server isn't much better though. It's a tomcat based application that was written by someone who had never built a tomcat application before, or any web application for that matter and uses raw SQL strings instead of an orm, it doesn't use MVC in any way, and insane amount of functionality is dumped into the jsp files.
It too interacts with a raster image processor to create difference masks of the output, running PostScript as needed. It spawns off multiple threads and can spend days processing hundreds of gigabytes of image output (depending on the size of the tests).
We're stuck on Tomcat seven because we can't upgrade beyond Java 6, which brings a whole manner of security issues, but that eager little Java updated will break the tool chain if it gets its way.
Between these two components we have the Java RMI server (sometimes) working to help generate image data on the client side before all images are pulled across a UNC network path onto the server that processes test jobs (in PDF format), by reading into the xref table of said PDF, finding the embedded image data (for our server consumed test files are just flate encoded TIFF files wrapped around just enough PDF to make them valid) and uses a tool to create a difference mask of two images.
This tool is very error prone, it can't difference images of different sizes, colour spaces, orientations or pixel depths, but it's the best we have.
The tool is installed in both the client and server if the client can generate images it'll query from the server which ones it needs to and if it can't the server will use the tool itself.
Our shells have custom profiles for linking to a whole manner of third party tools and libraries, including a link to visual studio 2005 (more indirectly related build dependencies), the whole profile has to ensure that absolutely no operating system pollution gets into the shell, most of our apps are installed in our home directories and we have to ensure our paths are correct for every single application we add.
And... Fucking and!
Most of the tools are stored as source bundles in a version control system... Not got or mercurial, not perforce or svn, not even CVS... They use a custom built version control system that is built on top of RCS, it keeps a central database of locked files (using soft and hard locks along with write protecting the files in the file system) to ensure users can't get merge conflicts by preventing other users from writing to the files at all.
Branching is heavy weight and can take the best part of a day to create a new branch and populate the history.
Gathering the tools alone to build the Dev environment to build my project takes the best part of a week.
What should be a joy come hardware refresh year becomes a curse ("Well fuck, now I loose a week spending it setting up the Dev environment on ANOTHER machine").
Needless to say, I enjoy NOT working with Java. A lot of this isn't Javas fault, but there's a lot of things that Java (specifically the Java 6 version we're stuck on) does not make easy.
This is why I prefer to build my web apps in python or node, hell, I'd even take Lua... Just... Compiling web pages into executable Java classes, why? I mean I understand the implementation of how this happens, but why did my predecessor have to choose this? Why?2 -
Whelp, I made the switch to android about a week ago. Didn't go two days without getting malware on it. I only browse hacker news and used devRant, standard messaging app, no root, so no shady things, just fairly standard things besides devRant. When I called Samsung support, they said it was a known issue and sent me some links to some forums where people were having the same issues. After digging through those threads, there was an official answer from Samsung saying they weren't going to fix the issue (at least in any foreseeable future). That's unacceptable for a phone that was released less than a year ago.
I'm done with Samsung phones for good. I might come back to Android on a google phone.
I hate how Android is distributed and the manufacturers don't take ownership of their issues. They just work on the new phone without caring for anything older than 6 months. If I had to get a new phone every time a major security issue was found and the company refused to fix it, I'd spend more money than on an iPhone.
It seems like Google keeps their devices up to date better, presumably because they have better control of OS releases. But non-google Android devices are dead to me.
Back to my iPhone for now...
🎵sad Charlie Brown music🎵9 -
Postgresql kept shutting down at odd times. Then it became predictable. I googled, went through mailing lists, archives, old threads, Stack overflow, friends, family, my bosses, my old colleagues, forums, chat groups and paid redhat support.
Apparently, I'm the only one and the first on this planet to have this problem. And it's scary.6 -
I am currently in the works of designing, building and extending an CRM/MRP system for production lines.
But for some reason I cant seem to find ANY modern sources, papers, books, forums, threads for context on this topic. It’s as if this topic doesn’t exist.
(One thing to point out is that there are sources for business wise analytics but am looking design wise)
I am starting to think that i am not googling it correctly (what a boomer).
Do you have any magic sources, captains of devrant?10 -
Given the following:
1) how much we (as a species) relly on google search (or alternatives) to do most of our usual jobs
2) the rate and aggresivity of advertsing that keeps creeping into our lives
I predict that in the following years self-curated and group maintained indexes of search results and popular technical pages will become more and more popular
Something like torrent trackers but specifically for StackOverflow/Reddit-like threads and questions -
Is there an open source Slack-like client/server? I want to have a small server just for our global team maybe 20 ppl to be able to have long living conversations in threads.11
-
welp I went from "gosh rust makes programming so stupid because I don't have to keep anything in my head like in JavaScript, if it compiles it runs zzzz you can literally be wasted / in dementia and write working software now"
to "I wonder if I can inspect how long threads are waiting for mutex locks to squeeze the hell out of performance"
new code golf23 -
Faced with a problem, trying for days every solution, libs, tutorial and So threads. Getting desperate, reading framework source code. Reading again. Realizing it's just a configuration matter. Feeling stupid like shit2
-
In the middle of the semester, my class and I are going to have a class about threads in Java. The teacher is at his normal days, 10 minutes later he just looks at us and says "Do you want to teach? Do you want me to teach today? You know what? I won't teach today. Let's talk about each other, I want to know you more. Tell about your hobbies, what do you do besides your student life?" 😂
-
I read through my old 2012 onwards chat threads on Facebook Messenger and felt disgusted with my cringey teenager seld.5
-
Wow Go is awesome, throwing some of its magic and making data ingestion that took one minute plus and make it run under 3 seconds.
Feels good -
Programmer looking for a new language
I have been a JavaScript developer for a few years now (non professionally) and I really like the language. I mainly program for execution with NodeJS rather than web, because I feel like I get more freedom (e.i. the ability to use a computer file system).
I normally never use other people's libraries and instead either write my own library/ies for the specific task or use an old one. I only ever use someone else’s if I need a quick frame work to test an idea, never for something I will actually use.
I prefer to work object / class orientated.
I have worked on distributed servers with NodeJS before, however trying to distribute a load across one computer across it's multiple threads has proved problematic due to the heavy delays of standard io transfer speeds.
Why do I want to switch?:
•Because JavaScript is not at all created with multithreading in mind, and pretty much any multithreading solution is a bodge and allot of the time it is more efficient to work single threaded.
•Also, I get the sense that JavaScript + NodeJS is not used often in the programming industry comparison to other languages like; ruby, python, and I don't want to get stuck in a nesh language of which would decrease my employment chances heavy.
Side Note: I have been working on a pet project to have a distributed database (made with nodejs), and so far, there are no language specific problems, but I feel like it would be more efficient if I used a programming language designed more to cater for multi threading.5 -
why the comments and replies have no hierarchy? at least give the "@" mentions some different color. It's very difficult to follow the threads on long posts.17
-
I have discovered the power of YourKit. Really helped me track down the problem of a ton of threads and a slow application.
-
Wait.
If subreddits have threads
Then each subreddit is a process
And if that's true
Reddit takes so much cpu😱😱😱2 -
The ignorant (Apple) hate-threads are getting dull. Most arguments are ignorant, outdated and irrelevant. I own my own company and all we use are Macs and iPhones. We have never had any issues with the OS on either devices. /rant4
-
I have mixed feelings about Elon’s Neuralink. Just read a bit of the abstract.
“Neuralink’s first steps toward a scalable high-bandwidth BMI system. We have built arrays of small and flexible electrode “threads”, with as many as 3,072 electrodes per array distributed across 96 threads.”
I’m curious, will this be this be the next “form of cognition”?6 -
wrote dumb threading and sockets system to make a bunch of https calls
extracted the working code into nice objects and methods to make it look sane and so I can re-use the code for more complex functionality that builds on itself
now suddenly the threads are locking and not multi-threading anymore
turns out?
the http(s) library expects the tls / https thing in an Arc / atomic reference count
but despite Arc being literally intended and designed for threadwork it seems the library in question throttles / locks itself if they are all using the same Arc (I don't even know how that is possible?)
if I clone the tls / https thing, no throttle / lock issues 😒
why did they even try that lol, they didn't test?!
I really didn't expect to be better at multi-threading than others already. I'm newbie. pls6 -
*rewrites rust mpsc*
you did it wroooong
I thought my threads were locking if I had thousands of jobs spawning thousands of more jobs. turns out it's fine. actually if I organize my data locks in the way everyone wants to do them my CPU fans go off but my original way you don't feel jack shit and processes faster
turns out it's because 320k jobs is a bit much for mpsc. because my jobs can spawn more jobs the whole thing just grinds to a halt. and there's sync-mpsc which allows you to have a maximum number of data you send through it, therefore I can just have 245 sent jobs instead of 320k but then this locks all the threads because for a thread to finish it needs to finish sending jobs, but a sync mpsc won't let you send a job if current jobs are over the specified limit. so all the threads get stuck sending jobs. smart. not. what's even the point of that?!
and evidently there's no built-in way to prioritize certain jobs. the AI thinks you should just send jobs in and each thread should have a priority queue. I don't know sounds dumb to me. then you could by random luck have threads with lots of jobs that need to be prioritized to be done and other threads stuck hanging waiting for previous jobs / the other threads. no thanks
so clearly the solution is to rewrite mpsc but allow prioritization when a thread goes in to ask for a job to do
since my jobs are intended to start other jobs, it makes sense to have no actual upper bound limit to the number of jobs in the queue but to favour doing jobs that won't start new jobs to lower the RAM and compute necessary to juggle all this
hope this is the actual problem. cuz the code works for like 200 jobs spawning 500 jobs each, which is 100k jobs total
but it stalls to a halt doing 8300 jobs spawning 500 jobs each (which if I do the math -- in my tests it stalls at 320k jobs and seems the number should be 4,150,00 jobs -- yeah I think this is probably the damned problem)8 -
Well,
I went ahead and tested t2.micro and lambda+dynamo(free tier)
You definitely get better performance and load handing with lambda+dynamo (5rcu+5wcu)
Tested the two with wrk and a simple GET which reads an item from a database of 90k items.
I could share more details with you if youre interested, but with 2000 requests, 100 connections and 4 threads. I got about 26requests/s on ec2 and about 260r/s on lambda.
Latency for ec2 was about 28s.
Latency for lambda was about 22s.
(max load)7 -
Ah, the joys of using a bleeding edge web framework! After updating a bunch of NuGet packages, I get the TypeInitializationException from hell. Googling the error message turns up void, because seems to be me and about a dozen other devs using this framework.
2-3 new threads per week in the support forum and mentioned in a total of 288 StackOverflow questions. It feels lonely using this framework, but the design is so darn promising...5 -
Feature creep aside I do think after a few weeks of use that notifications on devrant could use a bit of work. There is a lot of interaction and it can get confusing.
Some use cases currently not supported:
- On long threads I want to know which comment of mine that got a new ++. Perhaps scrolling to it + different colour?
- Seeing the new interaction per thread rather than per timeline.
- Getting a hint on which thread people interacted with. First sentence would be useful.
- Muting threads.
- Marking individual notifications as read without opening them.
- Moving notifications out of the menu and giving them separate button to save a click (many times a day)
If something on the list is already possible I suggest it be made more obvious ;)
Apart from being full of awesome people I really like being able to sort the flow of posts. I know this isn't staffed anywhere near the big social media and it's fine the way it is. But this is my two cents even if no one asked for them.
@dfox ? -
For once I actually read the discussion threads in Facebook about COVID all morning basically commenting saying "are you people stupid, use your ducking brains" but basically just said believe what u want...
But wow did I get pissed off... Probably even worse than my rants about my team...
So guess I finally understand the negative and divisive effects of social media now...1 -
- load tests via web
- load tests via api
- figure out why the fuck hibernate started proxying Blob.class after migration rather than using jdbc implementation, like before
- fix ^^
- reconfigure tomcat to ditch random for urandom completely [still getting econnreset]
- continue conversation with sysadmin, tester, analyst, 2 PMs, infra architect, junior dev
- provide immediate support for analyst and tester as soon as they need it
- provide support to another dev on another project
and that's my today's todo list. I think I need more personalities [more threads] to keep going -
Working on a platform with very few users and developers kinda sucks. There is only like 5 forums about this platform and it has less than one than a 1000 threads. Stack overflow has nothing on it so that sucks. I am trying to fix this weird bug and I cannot find anything to fix it. Guess I will call it a feature.1
-
My experience was very recent. I was working on my game engine, Pillar3D, and realized that the setup allowed it to be automatically multithreaded with little to no concern about deadlock or race conditions. All based on the assumption that individual levels don't talk to each other, and that moving entities between levels could be done between frames. I can even track about how much work each thread has to do and use that to distribute levels among the threads. Now I can do things like force UI trees to exist in their own level and get fantastic multithreading.
-
#Suphle Rant 11: Laravel board launch
The launch took almost 2 weeks more than originally slated, because I sought to install it manually, just as an outsider would. Installation steps had been documented, automated tests for the installation tests were passing. When time came to actually execute the binary from the terminal, we went from one obstacle to the other. First, were the relatively minor Composer/Roadrunner issues, eventually resolved by the helpful RR maintainers who sat with me through a Discord server for about 2 hours until their command ran the way I needed it to.
Next was the Psalm scare: One of my value propositions was the guarantee of eliminating all type related bugs in Suphle apps. I intended to use Psalm for that. Wrote tests as usual. Turns out the library behaves differently under conditions differing from raw CLI usage. I resurrected threads I'd opened since December that were left unattended, and with some help from the maintainer, we eventually got it to do what I need it to do.
I was all the more frightened by the fact that Transphporm had caused me to renege on one of my earlier promises. I can only miss so many targets. After this, the docs had to be updated with all the changes effected to accurately integrate those two. Project installation and initialization commands were ran rigorously to ensure all progresses smoothly.
Tagged one final release and suddenly became impatient to launch on our local Laravel group chat where I've been a member for the last 4+ years, where we've had a rollercoaster of emotions. In that time, I've refined my launch speech to suit that audience -- obviously, countless times. Not just a tame "It's my pleasure to announce what I've been working on", but near 40 messages going into details about the inner workings, why it was built, how it compares. An expose that dove deeper than I would anywhere else.
I scheduled a time for them to tune in and got some encouraging anticipation. Ended up deflated after posting the whole thing. Only about 5 persons interacted. 1 (who I've chatted with outside the board) was quite enthusiastic. Feverishly checked the docs but commented it was overwhelming and he'd need more time. Already starred the repository.
For some context, there are give or take 250 members on that board. Not all are active but activity there easily reaches a crescendo when the topic discussed is about inanities like what 3rd party services to use for SMS, how to receive salaries from abroad, or job openings. I was optimistic when the acquaintance mentioned above published a payment library and met a riotuous welcome as one of their own. Maybe, they are simply not fond of me and the speech should have been passed off to someone else.
I checked Packagist installs -- not more 10. For 3 years, I'd been hyped up for that night; but for some reason, the audience I considered myself closest to flopped, woefully. Thankfully, this isn't the main launch. I'm still holding out hope for that. If it fails, I would have sunk an immeasurable amount of effort and time, that nobody will compensate me for. That is the one place I go to see those more advanced than me in PHP. I constantly learn there and find stimulating conversations there.
Now, I can no longer predict reception from other presentations. All I can do now is hope1 -
All these threads about what music to listen to when coding, thought I'd throw a bunch of tracks into a public playlist and share it: https://open.spotify.com/user/...
New tag: musictocodeto4 -
How good is the world of java advanced for a career these days? I learned java basics (collections,OOP, syntaxes, threads, a little bit of spring,etc) aka core java in college and then went straight to Android dev.
I am thinking of learning about the contents of java ee and me or whatever "advanced" java is. How tough is it? What is the career in it? How good is the possibility of getting a fresher job in it?2 -
Hello, I have a question for anyone familiar with multithreading!
I just started working with threading for the first time, I mostly write powershell scripts 😅, I found that certain conditions make using multithreading an absolute time saver. And of course in some tasks it's not such a big deal.
I am currently working on a project that runs multiple threads and each thread might invoke one of my functions that also threads the work.
I'm a total newbhat when it comes to this stuff, but if my main process is 4 threads, and I can spin up, up-to 4 more threads to run one of my functions, does the math equate to a possible total number of threads of 16 or is it possible to have the threading go ape-shit bananas and utterly thrash the cpu with rampant threads getting created?
I've looked online and based on some of the info that I've managed to come across on my own, the answers elude towards being safe because I'm creating pools for running the threads first and the pool is responsible for maintaining min/max threads, but I can't seem to find good info on running a pool+threads inside another thread.
Just to let you in on what the function does that requires threading in the first place, I need to basically query CloudTrail based on ARN's to find events, but I can only pass a single ARN to the find-ctevent cmdlet. So I'm essentially making 1500-ish really really small calls to AWS just to get back event data for the ARN.
Serially, this takes like almost 20 mins, on my laptop using stupid settings like 24 threads, it completes in about 95seconds. On the actual server that will be running this code, I'm going to limit it to 4 threads and try to figure out a way to cache the info locally and update the info on a cron or schedule so only the initial scrape takes forever and then the updates can be done nightly or something.
thank you in advance for your help, I'm not too sure if the question is dumb but please let me know either way!8 -
I declared it a Heisenbug!
So, basically I was starting multiple threads...
I was getting a list index out of range on line 268 which was a dict. Strange.
36 hours later, a lot of changes, I was still having the same error whatever I put on line 268, log, try, but when I got it on a comment... I lost it.
Restarted Pycharm.
Reset the branch to remote.
Everything worked fine.
Fuuuuuuuuuuu -
What's wrong with reviving/bumping an old thread on a forum? It seems way more efficient to me to continue on one central thread. I hate common rules like "don't post in a thread that's a year old, start a new one". Why not keep the conversation in one place? What am I missing?
Isn't this already how we (properly) do email threads? I always go back to find the last email when I send a follow up to avoid breaking into two different threads with two different sets of replies.5 -
Fuck Threads and fuck multithreading in general.
I've spent the last 2 hours and a half looking for an important error that did my project not work at first execution, and it was all because I did start a side Thread, but forgot to wait until it was done before showing the output of it.
Fucking multithreading...3 -
Hey pals, I'm thinking about buying a new laptop.
I will run a linux-distro on it and use it mostly for dev-stuff,video-streaming,etc..
I'm currently eyeballing a Lenovo Campus Thinkpad T490.
With i7 (4x up to 4.6GHz, 8 threads), 16GB ram.
Would it be a good choice or would you recommended something else?14 -
Every ten years, a new social nexus, from Usenet to Reddit. Every day, a flame war. Every year, a great leader that wins flame wars, convinces people to follow them. The question is, what happens next? What do you preach to the gullible masses you won over?
Every single time it gets to politics, and then, to philosophy. Yet, there are no large strides in sight to world peace.
You've seen that meme where everything is just applied math. Well, math is applied philosophy, and philosophy is a product of misunderstanding the language.
In the end, the flame war you won never mattered. Archived threads, Wayback Machine, inactive Usenet mirrors. Acres upon acres of human thought, passionately expressed in computer text, roamed by no one but web crawlers. Give them three days, and they'll forget what you taught them.
WWI had shown us that we couldn't improve the masses with art and education. There is no vaccine against stupidity.
Life on Earth is hell. People are hell. Living among people is hell. If your life isn't hell, you're fortunate enough to be paying criminals that are stronger than other criminals around them, for protection.
Only the habit of systematically denying yourself pleasures your inner animal wants, plus a healthy dose of doubt, can make you human. Without restraint, a man is merely a greedy beast.4 -
What's the most paralelized end user application you came across? I mean not that obvious things like gimp or photoshop, maybe things you experienced are just more speedy because they actually use the 8 to 16 threads of a modern CPU in full?1
-
If I create a library in Java, that is cache but auto-refreshes your data on regular intervals, totally configurable in terms of frequency of auto refresh and number of background threads used so as to reduce latency when you actually need data; will it be useful?
So currently, Guava cache has the feature to refresh only after you actually try to read data, which can actually be troublesome for a high QPS system.
I personally had this use-case, and wondered if there's anything existing (couldn't find, so wrote for my personal use case) and if it is an actual use case worth a library.10 -
I just completed this heartfelt and sincere little cry for help on another ste but it wasn't verified because I'm not special enough to format it like a PAD, whatever that means. I cannot seem to simply burn music files anymore. I'm using a Samsung laptop Device name DESKTOP-AII2T2S
Processor Intel(R) Core(TM) i7-2675QM CPU @ 2.20GHz 2.20 GHz
Installed RAM 8.00 GB
Device ID D766A89B-5671-4D9F-B6F9-2D884E9EA309
Product ID 00326-10000-00000-AA880
System type 64-bit operating system, x64-based processor
Pen and touch No pen or touch input is available for this display
Edition Windows 10 Home
Version 20H2
Installed on 09/08/2020
OS build 19042.928
Experience Windows Feature Experience Pack 120.2212.551.0
The music is a combination of commercially relased material as well as bootleg recorded material.
I am not looking for a "This is Why We Can No Longer Burn Our Music Files" Intro. All you need to tell me is the corporations that eat the world are protecting their copywrighted music and I must be up earlier and eat bettter breakkie than those individuals. That I can handle. Although I'm not a dev, I'm sure you can understand the feelling after you have worked for hours on attempting something, only to discover your effort has been in vain (much like my former relationships). Again, if you can give me any direction aside from hanging it up and attempting to find happeniness elsewhere, sock it to me. I deserve it. Thanks.
11 years ago when I used a Macbook putting together a playlist, inserting a blank CDR, and burning the file onto the CDR was very easy. I\'m am now faced with hurdles I sometimes scale, only to fall on my face.
I\'m not stupid, or uneducatated about flac, blah blah. I learnt it all myself. I\'m now using a windows operating system. Afew weeks ago I was able to burn what ever I pleased and it was OK.
Then one day, it just wouldn\'t do it. I was following no altered procedures. Since then it\'s been misery. I remember that ocenaudio once burned music files for me.
I don\'t know how to go about retrieving an instruction manual that will take me step by step as to how to do this.
You help would be appreciated.
Cheers,
Jonno
I've been lurking here since 2017 when my Macbook died. I've always enjoy the level of sanity and have attempted to add my jaded, distant and nihilistic spin on a few threads. It won't destroy me if I can't burn files anymore, I'll just go back on heavy tranques and change my name to Ben Zo. Dia Za P.een3 -
I hate those people that comment on threads saying shit like “just google it” or “oh fuck another [insert popular topic] thread we don’t need another one.” Fuck off. It’s an online discussion forum. If it’s shit content the mods will remove it, otherwise no one is forcing your sorry, lonely pathetic ass to stop scrolling, click the thread, and read the god damn post. Just fucking turn off your computer and read a book.2
-
you either get unreadable rust code or 7 layers of misdirection so that the compiler can work around keeping track of lifetimes
I mean maybe I'm too opinionated about readability. technically the computer can read it so people should just get good I guess -
Ugh, have an assignment due and just spend the last 2 hours looking for a bug that caused blocking code in one of socket threads.
Looks like it's going to be a long night -
Which platform do you recommend for inter-team comm?
We were on skype, but it didn't allow threads.
We have now shifted to Microsoft Teams but some members aren't liking it because it does not have a native App for Linux.
Slack is paid, and we're already paying Microsoft for other features.
There are open source alternatives but we don't have a spare machine to host on...
Suggestions?10 -
So I was wondering what was going on with Recall. Heard it would take screenshots without permission and send to MS. No idea if that is completely true. This continues to confirm that Windows 11 is a complete shit show. As I was looking I found a discussion of copilot being forced on users. Huge threads at Microsoft support saying it is a piece of shit (and that was a one of the nicer comments). So even before Recall comes out copilot is destroying the desktop experience. Is this the end? Will this force users to Linux or Mac? I am actually in shock how incompetent Microsoft is becoming.
I run games and support clients with Windows 10. I absolutely do not ever want to run Windows 11. It just keeps getting worse and worse.7 -
Machine learning algorithm with 20 threads. Machine is like: "bitch please" (and runs the algo clean until the end)
Increase parameter to 40 threads. NullPointerExceptions. NullPointerExceptions everywhere.4 -
If you're on the Threads page in Slack, why is there no keyboard shortcut to expand new messages and put your cursor in the text box?!?? Using the mouse is slowly killing me on the inside...4
-
I started programming with Threads (in C#) I though it can't be this difficult after i get it how to create a delegate right (2 hrs) and interact with my form without a crash (after another hr, but it didn't do this what it supposed to do) there popped up errors kind of randomly out of nothing and I have no idea how to avoid or catch them😩4
-
These occasional contributor meltdowns on github threads make for comedic gold
The immediate next comment symbolizes my experience working with flutter. I was pleasantly surprised to see someone else feel the same. Full thread https://github.com/flutter/flutter/...7 -
Yippii! Threads in Slack!
This has seriously been almost the only annoying thing in slack - there has been no possibly to answer to a specific message. The share message functionality is not good for that...
https://slackhq.com/threaded-messag...2 -
my first attempt at promise-like threads without the downside of the incumbent promises library offered in rust, where it spawns a new thread for every promise, appears to be a success
it looks like shit but I did not expect this to work so fast, I feel strange
so now I have a threadpool and i can ask it to take any number of tasks in any order, all of which can spawn more tasks, and it'll get them all done using best available threads rapidly. nice
I do have to synchronize them all at the end but I sorta half figured out how I'm gonna do that but it might not be the most optimal way idk
and there can't be any return data types
so everything has to wrapped in fucking Arcs and Mutexes, both going in and out (or maybe I can fix that? I don't know)
I'm expecting to get locked and shit blowing up. I'm probably being pessimistic
everyone always says threads hard and scary but anytime I touched them in other languages I didn't have issues. maybe threads hard in lower level languages and I'm about to find out these issues? 😖
*expects omens*
monster big, expect scary. things look fine. alertness level paranoid, nothing happens probably3 -
After weeks of agonizing and cursing Electron JS and JavaScript......
I finally managed to get all my modules to sync up and play nice with each other!
Love JavaScript again! Although seriously had enough issues with asynchronous tasks and threads.
Heading over to the dark side(functional) now.... 😈😈2 -
I am frustrated with the JWT token based authentication library I am using for my lumen(laravel) based backend. It is having lot of ongoing issues with infinite timed token(mobile apps) and others... Here is the link
https://github.com/tymondesigns/...
If anyone has any suggestions for a good replacement for this it would be awesome because this is shitty in the support for the library nobody addressed the issues raised and threads are not even taken care about. It is so frustrating when you implement something but have to deal with the shortcomings of it, when it does not even do some basic things it is supposed to do. I feel bad saying it for somebody else's work. But, sometimes it has to be ranted out... That's the whole point of devRant. So yeah JWT based authentication library suggestions for laravel based backend. Because tymon-auth is shit.1 -
People experienced with java/ multi threading , can you tell me how you build a pausing mechanism for threads? Like, if my bg thread is supposed to count for 100 seconds, and i need a mechanism to :
A: start it,
B: stop it on its counting completion/ manually
C: pause its execution at a number on a button click
D: resume its counting from the same number on another button click
How would i do that?
SO Question link here: https://stackoverflow.com/questions...21 -
I'm migrating a node app from rh6 to 7, initd to systemd...
Init.d runs start.sh which then spawns calls pm2 with the args. The problem though seems to be (I set the service to be forking otherwise it doesn't let it or kills the child threads?) But then there service then says it fails since I guess the script exited by itself...
And therefore the stop didn't work either?
I just need a service that acts as a link? To the actual start stop scripts and just run them? Without killing the could orocesses7 -
What is best equivalent to Slack? we switched to Rocket chat but UI is terrible, every one gets confused in channels when there is too many threads and replys. I need a free alternative which we can deploy its dedicated instance on our own server. also I prefer open source software with mobile support and better UI/UX than rocker chat.7
-
What is the difference between slack and a normal, old school forum?
Both have threads, PMs, Images, Emoticons, etc.
Is it just the UI that got improved?6 -
Forums are some of the hardest shits you will run away from when trying to delete your account. The complex nesting of threads algorithm makes it hard for you to escape. Some don't allow deleting of accounts and u didn't know that cause you didn't read terms of agreement.
-
This is a bit abnormal for devrant, but I'm looking for someone familiar with Azure. The project involves converting separate app processes into singular roles in order to save my client money in the long run, I'm looking for anyone with any current expertise. I'll pay you in Whiskey and DevRant swag.1
-
spent a few days trying to track down the cause of a thermal shutdown in my workstation. intel 4790k with no overclock would spike to 95C on one core (core1) whenever maxing out all 8 threads, be it real work, mprime, anything with 100% cpu being used. I quadrupled my RAM from 8gb to 32, because its cheap and id like to have all data in memory sometimes, not because I thought that was the problem. I reseated my watercooling block. I checked out the PSU. I unplugged all unnecessary peripherals, drives, etc. It turned out to be a bug in Gigabyte MOBO BIOS (causing temps to be read incorrectly i think, still not exactly sure...) updated from version 5 to 10 and poof now temps are back in the high 50's at full load. it only took 2 days to figure out and i think i learned something
-
Pff today I start 400 threads in python initialized in a for loop, one thread per record, each record initialize a heavy process, Memory Limit Exceeded, I'm frustrated with this shit!
How to run 400 records doing a heavy task preventing the CPU to close the task executed by timeout limit exceeded, or how to run multiple threads to end before reach timeout limit each task without exceeding the memory limit.
☠💩🐱💻9 -
Been looking into some of my old code (an OBSE plugin). Wanted to know how something worked I made over 10 years ago. I look through the code and some of it makes sense, some of it looks really messy compared to what I write now. I want to remake some of this code to work on a different game now.
I have some code for threading that I have no idea where it came from:
https://github.com/Demolishun/...
It allows transferring data between different threads using mutexes. It is really really simple. I searched github to see if it came from there. There is stuff with similar names, but the code is way way different in those. I honestly don't see whey this code needs to be any more complicated than it is. I wonder if it is because I don't know something or I just like simpler solutions. Maybe there are use cases the other coding solutions have that solve particular problems?
Anyway, I plan to pound out an SKSE version of this plugin. I have been wanting to make this for some time now. I don't necessarily have a need other than the fun factor. My lack of providing good directions for use on the OBSE version kept people from using it. I will try and do better on this version.2 -
In honor of https://devrant.io/rants/875346/... let is graphically show threaded race conditions:
0
1
2
36 -
Does one of you guys know a php package which provides a thin wrapper around the curl functions?
Especially the functions for multiple parallel requests in different threads.
The only implementation I know about is kriswallsmith/buzzbrowser -
I'm compiling an entire Android build from source. Even with 16 dedicated compilation threads, it's like watching paint dry.
It's nowhere near my early days taking over 24 hours to compile a Linux kernel... But it's still painful. -
TL;DR
Sticky notification icon on Xiaomi MIUI 12 Android 11 is soooooo annoying.
https://xiaomi.eu/community/...
I made a video, hope that's also ok:
https://youtu.be/eEaJ3TjMZHk2 -
I've got a dev server where I run some test sites in WP using EasyEngine, because I want to get accustomed to WP in Docker.
It asked me to update, and I was like "sure". Now whenever I want to setup a website I get "easyengine couldn't create username"
I figured ok I'll use WordOps, which requires migrating from EasyEngine to it. I was like sure, and next thing I know the "migrated" websites that it was supposed to properly migrate automatically are down, and I can't get an SSL issues for my new site.
All threads on both issues don't help.
It was supposed to be a 5 minute job and it turned into 3 hours trying to troubleshoot. Now I'll spin up a DigitalOcean server and install a quick WP site.
Fuck both EasyEngine and WordOps <3
I thought EasyEngine would be cool but seeing the very limited community activity it's not worth the risk even having it in a dev environment. -
Bitbucket's Javascript bullshit... gotta fucking have fast clicking fingers on a merge before the browser js crashes AGAIN... Firefox never threads the needle but you might just get it if you go fast on chrome...
-
Worked on a project where the variable was public and static, was accessed at multiple locations and across multiple threads and no it wasn't using thread safe implementation. Since then whenever I read public static I start praying the next word be "final".
-
Newbie question
Any good free resources for full stack web development. Also if a resource teaches mainly frontend but also teaches some backend it is a full stack web development resource in my eyes. I was looking at freecodecamp but it is a bit too vast for me. I am also looking at the cokplete intro to web development v2 course by Brian holt for free on frontend masters but it is 2 years old and has not been updated. Also it does not teach that much bakcend hust node and express.
Also another question is frontend masters good for web development. I did not find many threads about it. I got a discount for it which gives me a one year subscription for 195 dollars18 -
If I have several nodejs apps and JS being single threaded, how do I know that when I start all of them, they aren't running on a single cpu?
I'm. Not sure if I'm understanding it correctly but say I start 1 app, that means all the app's work will be done on whichever cpu it was started on? Or can it spawn additional threads and on other cpus to do (nonjs) work?9 -
Fuck this shit... how hard can it be to build a fucking Thread safe tree with links to parent??? This is madness. Deadlock hell... aaaaaaaargh
I am close to switching languages for this project3 -
So I've been forced to work on a project for some time using JavaScript
Many parts of it must function synchronously and js has a lot of libs and otherwise that will spawn threads in threads
I'm horrified by the amateurish appearance of my code
Await this await that
Everything enclosed in something else and what is worse is the base node modules I'm using are ALL asynchronous! Were talking methods that one consistently has to wait on finishing like db reads !
Why is js so dumb ?26