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 - "line count"
-
Confessions of a Programmer
#1
If a client is an unbearable asshole during the initial communication, I look for every excuse to pad on the hours for the estimate to get paid more. If a client goes above and beyond in their douchbaggery, I tack on an additional $40/hour.
#2
Sometimes I will present an elaborate solution to a client, but really I'm just reading off the features of a plugin or library I'm going to download or buy after the call. Not because I can't build it myself, but because I'd rather spend more time on other/my own projects.
#3
Clients assume because I know one language, I know them all. Rather than turning down the work, I take a crash course to work in that language, or outsource the work and clean it up afterwards, whichever is more practical at the time.
#4
I use cPanel on a dedicated to manage our client websites. I'm not paid enough to bother with setting up everything manually.
#5
Certain projects I build have a 3-day backdoor built into it. If the client doesn't pay upon completion, a unique hash triggered as a GET variable deletes a core file in my work, rendering the work useless. If it wasn't triggered by the 4th day, the file allowing me to trigger this backdoor is removed. This is only used for clients where the project must be launched on their servers, or if there has been a previous issue collecting payment.
#6
I slip in the initial contract that all preceeding phone calls will be monitored and recorded, and that they acknowledge the recordings are admissable in court. This has saved me from losing money twice now.
#7
I have never used an IDE. (I know, I know, it's really inefficient and dumb, but I'm just more comfortable with Sublime. Plus I often find myself mobile and without my computer, so I have to program from my phone.)
#8
Each day resembles a betting spectacle of which work will be late, which will be rushed out and which will never see the light of day.
#9
I have used "sick" and "family emergency" as an excuse to just sleep in far more than I can count.
#10
When a client from hell crosses over the line in their conduct (such as getting very nasty and personal, or sending threats), I anonymously report them to the BBB and on RipOffReport.21 -
So I own a webshop together with a guy I met at one of my previous contract jobs. He said he had a great idea to sell product X because he can get them very cheap from another European country. Actually it is a great idea so we decided to work together on this: I do everything tech related, he does the non tech stuff.
Now we are more than 1 year in business. I setup a VPS, completely configured it, installed and setup the complete webshop, built 2 custom PrestaShop modules, built many customizations, built a completely new order proces (both front and back end), advertised quite some products, did some link building, ensured everything is in place to do proper SEO, wrote some content pages, did administration and tax declarations, rewrote a part of a PrestaShop component because it was so damn inefficient and horribly slow, and then some more. Much more.
He did customer relation management, supplier management and some ad words campaigns. Promised me many times to write the content for our product pages. This guy has an education in marketing but literally said: I'm not gonna invest in creating some marketing plan. I have no ambition in online marketing.
What?! You have the marketing knowledge and skills but refuse to use it to market our webshop and business? What the fuck is wrong with you?!
Today he says to me: 'Hey man, this is becoming an expensive hobby as we don't sell much and have lots of costs. I don't understand why I should be the one to write these content pages. Everything you did in the past 8 months can be done in less than 20 hours! You are a joke and just made it a big deal by spreading your work over so many months. I know for sure because I currently work at a company where I'm surrounded by front end devs! Are you fucking crazy?! You're a liar.'
He talks like this to me every 2 months or so while he can't even deliver the content for 1 single product in 6 fuckin' months! We even had to refund a few of our customers because Mr. client relations manager didn't respond to their e-mails within 1 fucking week!! So I asked him how could that have happened as you do the client relations and support. Well, he replied to me: 'Why didn't YOU respond to our clients? You don't log on in our back office at least once a day?!'.
Of course I do asshole. But YOU don't. He replied that I was lying just like I was lying about what I did for our business.
So, asshole, let's have a look at PrestaShops logs to see who's logging in daily. Well, you can probably guess who's IP was there in most of the entries. It wasn't his.
So, what the fuck have you been doing then?! You can't even manage to respond quickly to a client?!! We have maybe 50 clients and if we get 1 question a month by email it is already a lot. But you keep bitching, complaining and insulting me instead?!!!
Last time he literally admitted on a WhatsApp conversation that he had and still has the hope that he could just sit back and relax and watch me do ALL the work.
Well, guess what you fucking moron. That's not what we agreed upon. You fuckin' retard think you're so smart but you say EVERYTHING on WhatsApp! Including your promises to me. Thank you you fuckin' piece of dog shit because now I have hard evidence and will hand it over to my lawyer to make you pay every god damn cent for all the hours I've spent working on our business. Oh, and I'll take over the webshop and make it a success on my own because I know damn well how to get relevant traffic and thus customers.
You just go get yourself fucked in the ass without lubricant you fuckin' asshole. I have told you you shouldn't fuck with me because I take business very seriously. I even warned you when you were crossing a line again. Well, if you don't listen... You will pay for the consequences. I will be so damn happy to tell you 'I told you so' with a very very big smile on my face. That momemt WILL come, 'partner'.
Fuck you. You will be fucked. Count on that. Fucking asshole.8 -
What happens when you change the service call center to 100% AI
AI: Hello, this is the After Service center. How may I help you?
Angry customer: Hey! Do you count this as a product? Do you sell this to use it? F*** shit?! Bring the manager now!
AI: Thank you for your response. We will connect you to the Development team.
Angry customer: Uhhhhhh
AI: Hello, this is the development team. Please state your problems.
A bit relaxed customer: Umm, so this product you guys are selling stops working sometimes, so...
AI: We are sorry, but for the product misfunctions, please contact the After Service. We will connect you to After Service.
F***ed out customer: Wait, I just came from the After Service!
AI: Hello, this is the After Service center. How may I help you?
Angry customer who is ready to throw the phone: I said that the product is not working, and I asked to bring the freaking manager in the line!
AI: Thank you for your response. We will connect you to the Development team.
Customer throwing the phone and shouting: F*********************************************************************************************!7 -
Minimum wage employers and restaurants asking "and why should we hire you?".
You have 40 vacancies in your area for just your company alone.
You're paying $13.25 an hour when only a year ago you were paying $9.75.
Why should we hire you?
F*ck you, pay me, that's why.
You're not f*cking NASA
You're a God damn chain restaurant with a 40% turnover rate, who's employees probably shoot up in the bathroom on the rare occasion they even get a break.
I looked at the guy with all the annoyance I could muster, stared him down for a good five seconds and said. "You pay a few dollars over minimum. You're job is not important enough to even ask that question. Have a nice day." And got up and left.
Dude followed me and stuttered " hold up. I was just..."
But I was already out the door.
You were just what mark? Asking a dumbfuck question as if you had any leverage at all?
Your competitor *across the street* is offering 50 cents *more* per hour, and has guaranteed breaks.
What, did you forget 2008 and how you treated millions of people as disposable? The little part where you and most american industries demanded passion, without pay raises? Promotions without benefits? The jobs that if you worked hard, rather than a promotion or a pay raise, your reward was more work and less hours to finish?
You assholes thought we forgot about that? How you shipped millions of jobs overseas, blamed it on "automation" (chinese and indian slave labor), and then pointed the finger at millions of impoverished people as "lazy" in places like Detroit and Pittsburgh and told them "you just got to work harder and smarter!" Or "just get a small loan and create the next google!" from the comfort of your yachts? I'm looking at you bane corp.
No, now the shoes on the other foot motherf*ckers. Hows it feel needing all *us* commoners? "Why should we hire you?"
No, why should *I* WORK FOR YOU?
Cuz I saw THREE dirty tables coming in. A line of people that could be being served. A line that could have been optimized with the proper table count and some simple changes. A menu that doesnt even incentivize your biggest sellers and a dozen other things your store is doing wrong.
Think mark, think!
This is one of those braindead questions employers paying sub $18 an hour ask, because they suffered so much brain drain from years of payola profits from too-big-to-fail wallstreet bailouts, that they forgot they are not king midas, unless they are the king midas of shit, because increasingly everything corporate America touches turns into shit.
And while were on the subject, stopping bringing in outside management to stores. It destroys team cohesion, staff morale, pisses off people *on site* who *actually know* the team, the stores daily activities and processes, and who are better fit for that role. You bring in disinterested outside management, and it's one of the biggest red flags I've ever seen: these smarmy selfcongratulating f*cks who know nothing about the particular store, have no connection to the staff, go on firing sprees or alienation-sprees to hire in friends, fuck up the schedules because again they know nothing about the employees, and then move on after a few years to greener pastures, leaving a barren radioactive wasteland of chain smokers and burnt out staff in their wake.
Dear corporate America, your free ride on the public's good will is over. It's over.
Now you're in the bitch seat. Come sit at my desk and explain to me, EXPLAIN TO ME, why I should sweat and labor to save your shitty company hemorrhaging money like a bleeding crack-addicted hobo dying with a sucking chest wound from a chicago skidrow friday-night drive-by?
You dont deserve it. Your management and company culture is worse than incompetent. It's full of smiley guys expounding about their passion for customer service while giving each other sloppy BJs in broom closets, a veritable cornucopia of cult-like corporate dick suckers *and* dickheads, proclaiming, no...PROFESSING (hence "professional") their undying allegiance and dedication to their corporate family with the intensity of cujo, foaming at the mouth, or Mitt Romney preparing for a photoshoot, plastic smiles and feigned laughs.
Dont forget to wipe your chin, asshole. It's not Ronald McDonald your blowing, but it's definitely not Gordon f*cking Ramsey either.
Would you like fries with that?88 -
One step through the door my wife whips around, a look so disgusted she barely seems human. "What's that smell?" she cries. "It's you! You smell like...like bad code!"
Indeed, I am covered with the scent of the forbidden love child of a man who read half a chapter on if-then statements and then pushed out into the world, earthworm-like, a mangled misshapened gelatinous mass that my employer gave the title of line-of-business application purely out of pity.
For more days than I'd like to count I have been porting a ColdFusion 5 application to .NET. Initially written in 2000 and last touched in 2006, it has a data architecture comparable to Dresden after the second world war. It features a table solely comprised of seven columns of IDs so that joins can be made between other tables lacking a common key. Columns that should be contained within a single table spread out among multiple tables. Single columns containing data that should be multiple columns (with handy flags to separate the subsets). A view with 14 joins that playfully displays unintended results. And so much more spread out over almost 200 stored procedures, views, triggers, and tables on the SQL server, and dozens of additional ADO-like SQL statements within the ColdFusion itself. Fortunately, the application overcomes these issues by having absolutely no data validation while allowing nulls pretty much everywhere.
When I am done this will be a very nice ASP.NET MVC app with at least 150 less stored procs, views, and tables. Auto-generated duplicate entries will be a thing of the past. Pop-up windows that inexplicably refresh the underlying screen to display a different part of the program than the one the user wants will be eliminated. And a UI based on the colors of a Rubik's Cube with usability that Mr. Rubik would find challenging will disappear with only the trauma of using it left behind.
Sadly, this is not my worse legacy code experience. Just the most recent. Just the most recent stench added to a lifetime of bathing in code rot.3 -
Story #1: So I took a month of parental leave. And was planning to extend it a little longer to deal with my final exams. I was planning to spend lots of quality time with my wife and newborn son. Little did I know... It turns out that out of 5 OoO weeks I was looking forward I actually had 3 at most. The rest I've spent working remotely as I was insisted to deploy a brand new and poorly tested feature to PROD 2 days before my paternity leave. So I spent 2 weeks debugging things in PROD. Remotely. Needless to say that did suck.
Story #2: After story #1 I've learnt my lesson. This summer I took 3 weeks annual leave to renovate my apartment. I asked to not to be disturbed unless there's an emergency. And an emergency it was. One of our app users had a planned hi-load batch job lasting for 2-3 months. Hundreds of thousands of items had to be created and processed. It turns out the _processing_ algo had some flaws and was acting out. I was called out and asked to assist. I knew this sort of debugging is going to take a lot of my time so this time I put my conditions on the table: I will assist but I'll extend my leave by 1.5 the time I spend working now. They took the deal. Instead of 3 weeks I had 5 weeks of vacation!
I don't care that much about my salary. I prefer to exchange it for my time off hence I didn't ask for compensations.
Bottom line: NEVER EVER underestimate or undersell your time and effort. You are a valuable asset and if the team/client needs you on your day off -- make it count. Your time off is YOUR time. Never forget it.3 -
This whole corporate numbers game is killing me. I know I'm getting paid to do what I'm asked, I know. But the metrics are so one dimensional
You fixed the data of 20 tests? Doesn't count because you didn't code
You implemented a function to reduce recurrent failures in the future? Doesn't count because those already pass with time consuming workarounds
You spent half a day communicating and coordinating across teams to fix an issue? That's 1 test, this other person changed 1 line in 5 files, you're 4 tests behind4 -
Took a class on computer systems, was supposed to be taught instruction sets, interrupts, pointers, basic gate level digital logic, etc. Professor spent the whole semester going line by line in the Visual Studio disassembler for some arbitrary C code, explaining in painfully dull detail, what each assembly line did. They did this for every class session, including the first, with no introduction to assembly. I lost count of how many times I fell asleep in class.
-
Everyone and their dog is making a game, so why can't I?
1. open world (check)
2. taking inspiration from metro and fallout (check)
3. on a map roughly the size of the u.s. (check)
So I thought what I'd do is pretend to be one of those deaf mutes. While also pretending to be a programmer. Sometimes you make believe
so hard that it comes true apparently.
For the main map I thought I'd automate laying down the base map before hand tweaking it. It's been a bit of a slog. Roughly 1 pixel per mile. (okay, 1973 by 1067). The u.s. is 3.1 million miles, this would work out to 2.1 million miles instead. Eh.
Wrote the script to filter out all the ocean pixels, based on the elevation map, and output the difference. Still had to edit around the shoreline but it sped things up a lot. Just attached the elevation map, because the actual one is an ugly cluster of death magenta to represent the ocean.
Consequence of filtering is, the shoreline is messy and not entirely representative of the u.s.
The preprocessing step also added a lot of in-land 'lakes' that don't exist in some areas, like death valley. Already expected that.
But the plus side is I now have map layers for both elevation and ecology biomes. Aligning them close enough so that the heightmap wasn't displaced, and didn't cut off the shoreline in the ecology layer (at export), was a royal pain, and as super finicky. But thankfully thats done.
Next step is to go through the ecology map, copy each key color, and write down the biome id, courtesy of the 2017 ecoregions project.
From there, I write down the primary landscape features (water, plants, trees, terrain roughness, etc), anything easy to convey.
Main thing I'm interested in is tree types, because those, as tiles, convey a lot more information about the hex terrain than anything else.
Once the biomes are marked, and the tree types are written, the next step is to assign a tile to each tree type, and each density level of mountains (flat, hills, mountains, snowcapped peaks, etc).
The reference ids, colors, and numbers on the map will simplify the process.
After that, I'll write an exporter with python, and dump to csv or another format.
Next steps are laying out the instances in the level editor, that'll act as the tiles in question.
Theres a few naive approaches:
Spawn all the relevant instances at startup, and load the corresponding tiles.
Or setup chunks of instances, enough to cover the camera, and a buffer surrounding the camera. As the camera moves, reconfigure the instances to match the streamed in tile data.
Instances here make sense, because if theres any simulation going on (and I'd like there to be), they can detect in event code, when they are in the invisible buffer around the camera but not yet visible, and be activated by the camera, or deactive themselves after leaving the camera and buffer's area.
The alternative is to let a global controller stream the data in, as a series of tile IDs, corresponding to the various tile sprites, and code global interaction like tile picking into a single event, which seems unwieldy and not at all manageable. I can see it turning into a giant switch case already.
So instances it is.
Actually, if I do 16^2 pixel chunks, it only works out to 124x68 chunks in all. A few thousand, mostly inactive chunks is pretty trivial, and simplifies spawning and serializing/deserializing.
All of this doesn't account for
* putting lakes back in that aren't present
* lots of islands and parts of shores that would typically have bays and parts that jut out, need reworked.
* great lakes need refinement and corrections
* elevation key map too blocky. Need a higher resolution one while reducing color count
This can be solved by introducing some noise into the elevations, varying say, within one standard div.
* mountains will still require refinement to individual state geography. Thats for later on
* shoreline is too smooth, and needs to be less straight-line and less blocky. less corners.
* rivers need added, not just large ones but smaller ones too
* available tree assets need to be matched, as best and fully as possible, to types of trees represented in biome data, so that even if I don't have an exact match, I can still place *something* thats native or looks close enough to what you would expect in a given biome.
Ponderosa pines vs white pines for example.
This also doesn't account for 1. major and minor roads, 2. artificial and natural attractions, 3. other major features people in any given state are familiar with. 4. named places, 5. infrastructure, 6. cities and buildings and towns.
Also I'm pretty sure I cut off part of florida.
Woops, sorry everglades.
Guess I'll just make it a death-zone from nuclear fallout.
Take that gators!5 -
After a year of college give everyone 2 hours to solve a programming problem in the language of their choice. Like implement a doubly linked list, or count the number of primes between two integers or something straightforward. Anyone who can’t do it gets kicked out of the major.
I’m sick of dealing with people who are 3 or 4 years into a CS degree, and can’t do 30-line programming assignments in two weeks. I might have to work with one of these clowns someday and I hope to God that my university doesn’t send them into the workforce with a degree.3 -
300 global variables.. THREE HUNDRED FUCKING GLOBAL VARIABLES?
Are you for real?
Now let me check the line numbers again..
hmm.. line 97 to .. yep line 410, just a few new lines to seperate some of them or.. group? Idk, I've given up on trying to understand those.
Now you may ask "But ThatPerlDeb, where did you see this and what was the intention?"
Low and behold, take a chair and I may explain this to you.
First of all: Fuck the dev that wrote this!
Second: Fuck all the devs that kept up with this practice or whatever you want to fucking call this!
Now, the application is our POS system that our customers can use for a monthly fee (That this piece of garbage even requires payment is disgusting) but anyway..
The global variables sometimes are declared for labels, sometimes for some frames, sometimes just for random values to be there.
We're using Perl for the POS system and Perl ain't the best at OOP, so in the dev's defense I can understand why you'd use a few global variables, but not fucking 300!! FUCK OFF WITH THIS BULLSHIT!!
So now I'm going through this torture slowly but surely deleting globals and putting them into some sort of scope and always MANUALLY test if something broke. Again, this company sucks ass and there's nothing that could even be considered a "unit test" or something like that, so fuck that, too.
After two hours I've brought down the count of global variables to about 260, so there's progress being made..
But then, there comes more!
"But how???" you may ask, and you're right, I've asked that myself.
Now to resolve the global stuff in each file some of the initial globals are used, we got about 20-30 files which do different stuff, all fair and square, at least there was an attempt at seperating functions but god this mess is so fucking fucked up. So in order to "safely" delete a global variable I have to check if any of the variables are used in another file, and if so, in which scope and how they are used.
Spaghetti would be a compliment for this fucking disgusting piece of utter bullshit.
Let alone the code quality of this "code"
Indendation? Dafuq is dat?
Scope? Nah, we got everything global anyway
Function size? Well, some are 5 lines, some are 900 lines, who cares anyways, right?
I'm so fucking glad once I leave this shithole, for real.6 -
Most awkward video meeting?
Can a conference call count? This happened several years ago.
Diving into international markets that could potentially make us millions of $$ (no pressure), while the phone was ringing the CEO's number (in Norway), my manager leans over and whispers
DevMgr: "This project will be managed using *proper* software development methodologies, none of this agile shit you want to use."
<CEO picks up>
I had already been in talks with their dev team to get a feel for their tech stack and we had discussed project milestones, potential release cycles (laying the ground work for using agile methodologies) before getting upper mgmt involved.
The partner dev team was listening and kept throwing out agile buzzwords and I could tell my manager was getting pissed. He would blurt out "Those specifications will need to be fully documented before PaperTrail writes one line of code!". No one said anything, but I could tell the other mgrs/VPs in the room were uncomfortable with the hostility towards discussing features.9 -
))| THE BEST AND WORST WAY|((
))| TO DELETE A LINE IN BASH |((
(Think you can do better? Vote
now on your phones!)
WORST: Hold backspace until satisfied
BEST: Using a pen or other pointing device capable of causing semi or permanent damage to your screen, count how many characters the line in question consists of. Write this down on a piece of paper (after all, your terminal is occupied) and using long division, or any other means, divide this number by two, rounding as you please. Press the "right arrow" key as many times as necessary to reach the end of the line. This might be 0 - if so, congratulations, you may skip this step! Once complete, refer to your piece of paper, and taking your newly calculated number, press the "left arrow" key exactly that many times. If you have a short attention span or are worried you will lose count, take a tally or use some other primitive count recording method. Once the key has been pressed the correct number of times, hold down either control key on your keyboard and take a deep breath - there's no going back now (!) - press the "k" key (you should still be holding a control key!) and take a sigh of relief. You're halfway there! If you need a break, take one. When you're ready to finish the task, hold a control key again and take another deep breath. When you are ready to complete the task (don't hold your breath too long!) press the "w" key. Congratulations!! Your line has been deleted!! Some may call you a fucking idiot for not just pressing ctrl-w at the start, but don't listen to those people! They probably delete stuff by accident all the time! Now, take a lie down, and give a moment's silence for the poor poor line you just brutally dissected and murdered.
Think you can do better? Vote now on your phones!9 -
Just spent 4 hours working on a somewhat complex restructuring of my current project that, when boiled down totals about 50 new or modified lines.
While I realize that line count != productivity, all the testing and reworking over that period has me feeling like there should be more to show for it.
But then, there's the fact that it's working properly as it's supposed to now, so I guess it's a win in the end.1 -
Ugh. That may have been a mistake.
I'm deep in a large effort to refactor my project. It's a one man deal and something I've been working on pretty much every day in some fashion for nearly 10 years (five years ago I started a scratch rewrite to move from a fully CGI server rendered application to a browser rendered asynchronous version built around JS) and that took me three years.
I started this refactor about 8 weeks ago. Turns out I've been tackling the largest modules and progress has been decent. So that's good.
But I got to wondering ... Just how much code is there?
So I whipped up a quick script to do some calculations. Read each file and get a line and word count, skipping empty lines.
In JS it turns out I have 83,973 lines and 467,683 words.
On the back end, 86,230 lines and 580,422 words.
Average publishing stats say the are about 250 words/printed page.
That means I'm confronting refactoring 1,870 pages of JS. That's the size of several decent sized novels. (I think I've done the equivalent of Maybe 400 at this point).
Makes me feel like the walls are creeping in to know how much is left to go ... -
Have some downtime today, so since I lucked out and found some old backups (from before I used Git) of a project I was planning on revisiting, I decided to fire it up and see what I can do to get that going again.
And discovering just how much my coding style has changed since then...
[Code is in PHP, for reference]
* Virtually no documentation (whereas my current style is near-obsessive with PHPdoc blocks)
* Where comments exist, they only use // and are a full tab after the end of the line
* All assignment operators are dutifully aligned on tabs
* Have to update the entire codebase because it relies on deprecated `mysql_*` calls
* Have to flip all of the quotes throughout the codebase because I used double-quotes as my primary at the time instead of single quotes.
* Also relied on magic quotes for injecting variable content into strings
* Associative array practices varied; sometimes the names are encased in double quotes, but I just hit a block where it's all leaving it to the compiler to interpret unquoted string literals
And perhaps the most egregious so far...
* Any time we get database results back the process for cycling through them is to do `$count = mysql_num_rows($result);` (or $count2, etc.), then do a `for ($i = 0; $i < $count; $i++)` (again, or $j, $k, etc.), instead of just a simple `while ($data = $result->fetch_assoc())`2 -
The main reason I moved from Linux to macOS was that I grew up. If we count not just Linux experiments but prolonged usage, I was an avid Crunchbang fan. After it died, I moved to elementaryos.
What I want to say is, Linux can be very fun and educational when you're still in the uni. You have all the energy in the world, and you can afford to diverge from your daily routine for an hour to debug GPU drivers.
Now, the backbone of my life is keeping a very tight sleep schedule, taking meds on time, avoid infohazards, avoid scrolling on the web, all to remain in a very fragile state of balance that keeps the bipolar disorder away. I'm in the middle of all this, earning derealization (yes, I'm also autistic) every time I design a data model. All I want from my computer is to be treated like a careless, regular user, not like someone with a CS degree.
I use Sublime Merge instead of command line Git. I use Postico to explore PostgreSQL databases, not psql from my terminal. By the way, my terminal is not iTerm, Alacritty or some other such thing, my terminal is whatever came with my Mac, with whatever default settings.
Linux is crawling into a non-street-legal racecar's cockpit and strapping yourself in, ready to blast off. MacOS is your chauffeur, holding your old shaking hand as he helps you into your Maybach's backseat. They're different, and that's okay.
Can Maybach race? Well, it has a 621 HP V12, so if _you_ can race, it probably can too, but we all know it's not a racecar.
Windows? Windows is an SS officer, wearing the all too familiar Windows logo for swastika, throwing you into a gaswagen.16 -
Life of an Oracle Developer ... Day {I've lost bloody count now}
Task: Optimise a 236 line cursor consisting of 7 SQL SELECTS and unions, 39 joins and nested sub queries galore.
"YAYYY" said no one ever ...3 -
This error, which took me a long time to find, demonstrates the importance of useful variable names.
Using the Wolfram Language:
pp = {};
For[i = 0, i <= Max[p], i++, If[Count[p, i] != 0, pp = Join[pp, {{i, Count[pp, i]}}], -1]];
pp
Outputs:
{{1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}, {10, 0}, {11, 0}, {12, 0}, {13, 0}, {14, 0}, {15, 0}, {16, 0}, {17, 0}, {18, 0}, {19, 0}, {20, 0}, {21, 0}, {22, 0}, {23, 0}, {24, 0}, {25, 0}, {26, 0}, {27, 0}, {28, 0}, {29, 0}, {30, 0}, {31, 0}, {32, 0}, {33, 0}, {34, 0}, {35, 0}, {36, 0}, {37, 0}, {38, 0}, {39, 0}, {40, 0}, {41, 0}, {42, 0}, {43, 0}, {44, 0}, {45, 0}, {46, 0}, {47, 0}, {48, 0}, {49, 0}, {50, 0}, {51, 0}, {52, 0}, {53, 0}, {54, 0}, {55, 0}, {56, 0}, {57, 0}, {58, 0}, {59, 0}, {60, 0}, {61, 0}, {62, 0}, {63, 0}, {64, 0}, {65, 0}, {66, 0}, {67, 0}, {68, 0}, {69, 0}, {70, 0}, {71, 0}, {72, 0}, {73, 0}, {74, 0}, {75, 0}, {76, 0}, {77, 0}, {78, 0}, {79, 0}, {80, 0}, {81, 0}, {82, 0}, {83, 0}, {84, 0}, {85, 0}, {86, 0}, {87, 0}, {88, 0}, {89, 0}, {90, 0}, {91, 0}, {92, 0}, {93, 0}, {94, 0}, {95, 0}, {96, 0}, {97, 0}, {98, 0}, {99, 0}, {100, 0}, {101, 0}, {103, 0}, {104, 0}, {105, 0}, {106, 0}, {107, 0}, {108, 0}, {111, 0}, {112, 0}, {116, 0}, {118, 0}, {122, 0}, {125, 0}, {136, 0}, {137, 0}}
As opposed to the expected output, which should have no 0s as the second values in any of the tuples.
I spent a large amount of time examining the code to generate p before realizing that the bug was in this line.3 -
I looked at an SQL server today from a customer, talked with one of their devs and he said that he's unable to understand why the server misbehaves... All (!) queries were optimized, but they have 'big data queries'... Migraine started, I had a very bad feeling. Monitoring? Nooooppeeee. Migraine kicks in. Connected to server. SHOW GLOBAL VARIABLES...
After a bit of scrolling I found a lot of misconfigured variables (e.g. extreme large join buffers, unrealistic buffer sizes), high slow query count (nearly 60 % of COM_SELECT) and a few variables that were unknown to me.
Then came the version line.
5.0.46
Yes. 5.0.46.
Big data? Well... 30 GB of usage data.
I called the company back... The dev told me sternly that this was the production server (I had hope...) and that I lie - neither the version, nor the variables could be the problem.
A coworker had to verify it and our manager had to do the communication... Worst, most traumatic working day I ever had. -
One of my colleague ask me to review other team's code. I saw the code. It's terrible. Importing data from text file based on line break count and 52 'if else's conditions in one function and overall 173 'if else' conditions in one controller class. Fuck after seeing that code, I realize people in my project is more better than others. Thank God.
-
Stack overflow is full of useless assholes, like I asked a specific question about a problem I am having that is similar to another problem that exists but it is not the same at all in terms of how to fix and instead of helping I’ve got 2 downvotes on it and a comment linking me to a completely unrelated stylistic based question based on something I SAID I HAD ALREADY TRIED CHANGING IN MY QUESTION!!! Here’s my question btw in case anyone can help here before I smash up my laptop 😑:
I have a piece of code in which I am trying to read in words which have been categorised using a number and then placed in a text file in the following format "word-number-" with a new line for each word. However, despite not mixing cin>> and getline and having tried a number of methods I still cannot get it working.
So far I have attempted using a cin.ignore() call to clear any '\n' char's from the buffer, as well as checking if the file is opening in the first place (it is), and using the >> operator instead throughout my code however I could not get that working either. When I place the get line call inside the condition of the while loop, the while loop doesn't run, however when I make the while loop condition a .eof() call it will run once however when I try to print the text that has been read from the getline call it just prints a blank line.
if(file.is_open()){
while(!file.eof()){
getline(file, text, '-');
count++;
cout<<count<<endl;
cout<<text<<endl;
if(count%2 == 1){
wordBuff = text;
}else if(count%2 == 0){
if(stoi(text) == wordClass){
wordList.push_back(wordBuff);
}
}
}
file.close();
}
While I recognise there are a lot of other questions on this out there I cannot seem to get any of their solutions to work and the vast number being related to people mixing the >> operator and getline doesn't help, so any tips or solutions will be of great help -
Folks
I need your input on the following
how important do you think having high core count in CPUs in your daily workflow?
I'm planning on buying a new ryzen 5000 processor, while I am going to game the hell out of it I'm also planning to run wsl2, a ton of chrome tabs, maybe have multiple IDEs for developing random stuff, maybe some virtual machines for some experimentations, some docker containers for some selfhosted software and lastly open demanding games while having everything else open.
Will a 6 core 5600x be enough? or do you think investing in a 5900x will be worth it down the line? (lets say for the next 7 years)
Assume that the GPU will handle the games im going to play and the RAM is going to be 32gb for now11 -
Newbie Linux User - Story about not working GUI
I am a proud Opensuse user for about a year, still struggling with some basic stuff, terminal, etc.
The story begins when a few days ago I try to login to the system. To my trusty Gnome. I get stuck on login loop;
successful login - > black screen for a second - > back to login screen.
Zero feedback, not a single error message
Stress level increases taking in count that I am at a climax at my university with tons of projects on my computer.
I assemble the Team A:
Me, Google, Stackoverflow, and for desperate times Russian Stackoverflow
Over 4 hours, found out that my user is affected by this, tried restoring default Gnome configuration, went through bunch of logs only to find out that every user gets the same errors, still only my not working. Even KDE denied to cooperate with the same result.
So what went wrong you may be thinking.
One line in file replaced by miniconda, that changed the PATH.
Linux is the best detective game that I've ever played.
Is it something that I should get used to?2 -
Maybe someone can help me out here...
I'm doing a small robotics project, where I'm building a line following robot.
That in itself is fine, and it works, however, the robot also needs to navigate through a maze.
The thing is, I only have access to two sensors, 1 light sensor, and 1 color sensor, meaning that I can't detect junctions.
Does anyone have any advice or ideas on how I could approach this with my restricted sensor count?2 -
Heres a truly vitrolic and unnecessary rant:
Package control for sublime is all well and good
through the command palette, but it's just
fucking retarded. How about you point me to a
FUCKING COMMAND to actually INSTALL A
MOTHERFUCKING PACKAGE YOU
FINGERPAINTING FUCKWITS?
Under babel plugin while browsing packages
on packagecontrol.io:
"Find it as Babel through Package Control."
FUCKING HOW?
What command?
What fucking command? How do I "Find" it?
The browse command just opens my
motherfucking browser. How do I fucking install
your fucking packages you assholes?
"Use autocomplete" except your god damn
autocomplete doesn't list "install package"
for some god damn reason because everything
web is a broken pile of utter shit, built
on a more shit, like a leaning garbage tower
of bullshit waiting for the smallest mistake to
take down the entire house of cards like
someone removing a leftpad on npm.
Maybe specify I have to enter
"install package" and THEN hit enter, and THEN
enter the GOD DAMN MOTHERFUCKING package name
on a separate god damn line for
some fucky reason.
Next time don't make a tool that breaks
motherfucking conventions. It's bad enough
every fucking look-at-me-im-smart cunt of a
dev and their dog has to invent a CLI and
then go and invent a new domain specific
language too motherfuckers.
Next tool that breaks convention around me is
gonna see the dev lit on fire.
fucking uppity cunts.
"Say thanks" the site say. I am not
feeling fucking thankful at the moment.
The least you can do if you're going to
contribute to open source, is not make things
actively fucking worse, least of all in the
fucking *documentation*.
FUCK count for this rant: 19 / 50,
RANK: RUSH HOUR TRAFFIC
0-5: GENTLE AS A LAMB
6-10: ANGRY GOAT
11-15: NUN WITH PMS
16-20: RUSH HOUR TRAFFIC
21-25: CANTANKEROUS VIETNAM VET
26-30: BREAKING SHIT
31-35: DOMESTIC DISTURBANCE
36-40: BIPOLAR EPISODE
41-45: DESPAIR EVENT HORIZON
46-50: BROKEN CAPSLOCK
50+ : MIDLIFE CRISIS / MASTER GRAND WIZARD
OF RANTS AND ANGRY-WORD MASTURBATION.
If you prefer to cheat, you may also include any
cursewords in general, but be warned, you'll
never know the sweet taste of victory when you
achieve the rank of master grand wizard.
Like when you were a kid, and you discovered
gameshark, and all your hopes of finishing that
one game became but a ruthlessly hollowed out
husk, somewhere where could-have-been childhood
memories and nostalgia go to die like the
graveyard of dreams
(the same place officer workers souls go).4 -
Nothin to get a rant simmering like reFuckingRanting! All good, I'll have another shooter while I wait to reinstall, reconfig, rebuild, rewipe, and reRefuse any and all Windows clammy hand of aid it forces down my soul. One of these days, when the whole realm understands we don't need this vast array of exactly the same shit but this one's dick is a little bigger so lets fucking make it, this and not that, and rebuild, push the update, need 4 more updates by noon next day. Nothing stays stable team green, NOTHING. Fuck anyone trying to actually ...make something..We got vulns and updates, backdates, and breaking changes on all 58 of our same shit production line shit shows. I can't count one time in this few year pain olympics that in a single 8 hour span of time the same shit that was working like a fucking wet glove in a horses ass at whiskey 1 was NOT fucking anywhere near coherent come whiskey not 1. Just sayin, is this a cock show boys? Or is is just a wild and rambunctious thought to maybe start compiling/combining some key role playing pieces of softwar? If not, I'll just prep for another round of fucks, and carry on. Sadly, this shit is addicting against many odds. Enjoy your lunches
-
A young new dev was working on his first ticket, about a bug during parsing of an uploaded excel file. Our issue was that if the file contained an empty line, all remaining rows were ignored. So the task included extending our tests to cover this case. After 2 weeks (!), his merge request comes in. His idea (without ever asking for help) was to parse the whole file (in some cases huge) in the production code a second time, just to count the rows (!!) and save the count in a public static int field, which was verified in his new test.2