Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Get a devDuck
Rubber duck debugging has never been so cute! Get your favorite coding language devDuckBuy Now
Search - "let's code all night"
When I opened my digital agency it was me and my wife as developers, I had no savings and I needed to get long contracts ASAP which luckily I did straight away.
Lovely client, had worked for them before as a consultant so i thought it would be a breeze. Let's just say the project should've been named "Naivete, Scope Creep and Anger: The revenge".
What happened is that when this project was poised to end I naively thought I would be able to close the job, so I started looking for a new full time consultancy gig and found one where I could work from home, and agreed a starting date.
Well, the previous job didn't end because of flaws in my contract the client exploited, leaving me locked in and working full time, for free, for basically as long as he wanted (I learned a lot the hard way at that time) and I had already started the new agreed job. This meant I was now working 2 full time shifts, 16 hours per day.
Then, two support contracts of 2 hours per day were activated, bringing my work load to 20 hours/day.
I did this for 4 months.
The first job was supposed to last one month, and I was locked into it, all others had no end in sight which is a good thing as a freelancer, but not when you are locked into a full time one already. I could've easily done one 8 hours shift and two 2 hours jobs per day, but adding another 8 hours on top of it was insanity.
So I was working 10 hours, and sleeping 2. I had no weekends, didn't know if it was day or night anymore, I was locked in my room, coding like a mad man, making the best out of a terrible situation, but I was mentally destroyed.
I was waking up at 10am, working until 8pm, sleeping 2 hours until 10pm, working until 8am, sleeping 2 hours until 10am, and so on. Kudos to my wife for dealing with account and project management and administration responsibilities while also helping me with small pieces of code along the way, couldn't have survived without the massive amount of understanding she offered.
In the end:
- I forcefully closed the messed up contract job and sent all the work done to another digital agency I met along the way, very competent people, as I still cared about the project.
- I missed a deadline on my other full time contract by 2 days, meaning they missed a presentation for Adobe, of all people, and I lost the job
- The other two support contracts were finished successfully, but as my replies were taking too long they decided not to work with us anymore.
So I lost 4 important clients in the span of 4 months. After that I took a break of one month, slept my troubles away, and looked for a single consultancy full time contract, finding it soon after, and decided I wouldn't have my own clients for a good while.
3 years since then, I still don't have the willpower or the resources to deal with clients of my own and I'm happily trudging along as a consultant, while still having middle of the night nightmare flashbacks to that time.2
My dad has an acquaintance - let's call him Tom. Tom is an gynecologist, one of the best in Poznań, where I live. He's a great guy but absolutely can not into tech of any kind besides his iPhone and basic PC usage. For about a year now I've been doing small jobs for him - build a new PC for his office, fix printer, fix wifi, etc. He has made a big mistake few years ago by trusting a guy, let's call him Shitface, with crating him software for work. It's supposed to be pretty simple piece of code in which you can create and modify patient file, create prescription from drugs database and such things. This program is probably one of the worst pierces of code I've ever seen and Shitface should burn for that. Worse, this guy is pretentious asshole lacking even basic IT knowledge. His code is garbage and it's taking him few months to make small changes like text wrapping. But wait, there's more. Everything is hardcoded so every PC using this software must have installed user controls for which he doesn't have license and static IP address on network card.
Tom asked me to build him a new PC that will be acting like a server for Shitface's program. He needs it in Kalisz (around 150 km from my place). I Agred (pun intended) and after Tom brought me his old computer I've bought parts and built a new one. I have also copied everything of value and everything took me around three hours.
Everything was ready but Shitface's program. I didn't know much about it's configuration so when I've noticed that it's not working even on the old PC I got a bit worried. Nevertheless I started breaking everything I know about it and after next three hours I've got it somewhat working. Seeing that there's still some problems with database connection (from Windows' Event Viewer) I wrote quick SMS to Shitface asking what can be wrong. He replied that he won't be able to help me any way until Monday (day after deadline). I got pissed and very courteously asked him for source code because some of libraries used in this project has license that requires either purchase of commercial license or making code open source. He replied within few minutes that he'll be able to connect remotely within next 10 minutes. He was trying to make it work for the next hour but he succeeded. It was night before deadline so I wrapped everything up and went to bed thinking that it won't take me more than an hour to get this new PC up and running in the office. Boy was I wrong.
Also, curious about his code, I've checked source and he is using beautiful ponglish (mixed Polish and English) with mistakes he couldn't even bother to fix. For people from Poland, here's an example:
So I drove to Kalisz and started working on making everything work. Almost everything was ready so after half an hour I was done. But I wanted to check twice if it's all good because driving so far second time would be a pain. So I started up Shitface's program, logged in, tried to open ANYTHING and... KABUM. UNHANDLED EXCEPTION. WTF. I checked trace and for fuck sake something was missing. Keep in mind that then I didn't know he's using some third party control for Windows Forms that needs to be installed on client PC. After next fifteen minutes of googling I've found a solution. I just had to install this third party software and everything will work. But... It had to be exactly this version and it was old. Very old. So old that producent already removed all traces of its existence from their web page and I couldn't find it anywhere. I tried installing never version and copying files from old PC but it didn't work. After few hours of searching for a solution I called Mr Shitface asking him for this control installation file. He told me that he has it but will be able to send it my way in the evening. Resigned I asked for this new PC to be left turned on and drove home. When he sent me necessary files I remotely installed them and everything started working correctly.
So, to sum it up. Searching for parts and building new PC, installing OS and all necessary software, updating everything and configuring it for Tom taste took me around what, 1/3 of time I spent on installing Mr Shitface's stupid program which Tom is not even happy with. Gotta say it was one of worst experiences I had in recent months. Hope I won't have to see this shit again.
Fortunately everything seems to work correctly. Tom hasn't called me yet with any problems. Mission accomplished. I wanna kill very specific someone. With. A. Spoon.1
I'm finally writing unit tests consistently thanks to a simple file organization decision.
I'm not doing pure TDD, but at least I'm writing the tests immediately after writing a module, and I make sure they run ok.
What I'm doing is Instead of putting the test files in a "tests" dir at the root of the project, I have the tests right next to the source code.
So if I have a dog.x file, I also have a dog.test.x file next to it.
I'm not inventing gunpowder here. I've seen several people do this.
But it's something that is not generally made a default or advised to do.
Like I said; test frameworks in general go with the classic "tests" dir.
But for me this is day and night in whether I write the tests or not.
Which makes sense. Imagine the classic scenario of the "tests" dir, and you just created a file deep into a hierarchy, let's say src/lib/console/windows/dog.x
This means that if you want to write tests for that, you need to make sure the hierarchy tests/lib/console/windows/dog.test.x exists
If the test file already exists, but you want to access both files, you need to traverse deep for each.
Also, it's actually harder to keep track which files have unit tests and which do not.
Meanwhile, if the test files are next to the source, all these problems disappear.
That doesn't mean there are no other challenges with testing, like testing untestable things, like system calls or http requests, but there are ways to deal with that.
I don't know why people here dislike php
It's been 3 years since I was introduced to php and I never find it unworthy to be used in my project at all
Last night it was my first freelancing project and the guy asked me to scrap a table from a stock market website in vba script and append the table values to the excel sheet. That looked easy, I kid you not, from the image he sent me that looked too easy.
There was no way to implement shit that in vba under my current knowledge.
Let's fuck this shit and jump to php, I inspected the site and found a cookie was enabling the site to load another part of the site through GET request.
Once I knew what was holding that GET request url, curl came to rescue. I attached cookies and sent the request header and parsed the ajax script url and fetched the response (table data).
Parsed the fetched data using explode and Voila! I made the fucking working script in php
As for the vba script, I wrote code to get this csv, append it to the file and delete the csv9
A day in the life of @C0D4
Yay it's Tuesday.....
So morning goes something like coffee, yea no coffee no @C0D4, get to the office, get busy with normal morning routine - run the almost automated scripts I have to run - delete the 100+ emails I don't actually need from last night, read the 2 I do care about - yea 2 freakin emails out of 117 🤦♂️
But what ever that's what outlook rules are for... except I actually have to glimpse over them all just in case something of mine broke.
Go get another coffee,
Start working through the days tickets - ok cool nothing major to worry about, let's get back to writing tests from yesterday.
Well fuck that was a bad decision, no matter what I do this little fucker won't pass, yet doing this process step by step, detail for detail, it works - no issues, but automate this fucker and it screams its head off.
So fine, I give up and go to lunch,
Come back... spend next 3 hours on this 1 problem... 1 FREAKING problem 🤦♂️🥴🤦♂️🥴🤦♂️
This thing has beaten me, and for no apparent reason - it just doesn't like running under a test scenario.
Would have given up hours ago, except its a vital piece of code I'm trying to cover 😑 of course it is.
Well somewhere in there I managed to do a deployment for another project and change a few things in there.
This week is starting to look like hell,
Yay hump day tomorrow!!!!!
That's something, the week is coming to an end.... right? Please.... right!!!7
TL;DR (it is indeed a text wall) => read the tags, it should be enough for you.
Context : my sister works as an "everything"-manager for a small non-profit company dispensing classes in some crafting art. Her boss (let's call him Nic) is also a friend of her, and he's more of a "thousand ideas a second" type of guy than a "more monies for me", so he speaks very friendly, directly, and doesn't always think about the management and costs of his decisions.
His website, on which users can book for classes, is a Wordpress (you already know it's gonna be bad). I already talked to him about getting a custom and fine-tuned website. Having seen my sister use it for administrative tasks, it's a real pain and really not suited for their particular needs. Also, getting a custom website would permit some manual tasks automated (so less work for her). But he won't accept because "SEO is better on Wordpress".
Yesterday, 23:30 (11:30pm) she called me on Messenger, asking if I could dispense some advice to her boss because he struggled migrating the companys website to another server. Looking at the time, I said she could put me though so he could tell me quickly his problem, but I wouldn't do anything until at least tomorrow. Things went a bit like this (on Messenger) :
Nic : Yo. What's up ?
Me : I'm fine, thanks, and you ?
N : Fine, but not the server... It's so slow and I can't seem to get the perfs up. It's pissing me off. I switch from /Offer 1 from hosting provider/ to /Offer 2 from hosting provider (SSD included !)/, I thought it'd be better but the TTFB is still struggling at min 5 seconds. You know what I mean ?
Me : Yes...
N : Anyway, here is the speed test for the original server, and here is the speed test for the VPS one. [me to myself : oh, it's a VPS, ok...]
You see, it's worse on the VPS. Of course, without any plugin everything is perfect, but I just need them.
Me : AFAIK, but I'm no expert on the subject, a VPS will already be slower, because it's virtualized. But I may be wrong here. Anyway, the problem is clearly Wordpress : your plugins are adding a shitload of operations on your server, so SSD or not, if the CPU is overwhelmed, having better I/O won't change anything. They aren't always written by developpers with speed and optmization in mind, so you may be using a rocket-launcher just to kill a fly.
N : I already told you that a custom website means shitty SEO. Having a clean and quick code may be nice, but if nobody uses it, you're screwed. If Wordpress represents 1 out of 3 websites worldwide it's for a reason. Aren't you stubborn ? Anyway, can you work on that or not ?
Me : I didn't say you NEEDED a custom website. I just said that, just as you admitted earlier, the problem is clearly caused by the plugins. You told me about your matter, I tried to find an explication. Unfortunately I'm really not able to do anything about this side of things. It may not be the best explaination, nor the only one, but it's 23:40 now and I'm not experienced on Wordpress and server optmization.
Anyway, Wordpress' SEO may be excellent, but it doesn't mean it's crap on other websites. You "only" have to be cautious with it. [it's not as if you hadn't to be cautious with WP SEO too, anyway...]
But I won't insist, rest assured. Who's the most stubborn out of you and me, by the way ?
I can try to find some info, but won't promise you to do anything. Maybe send me a list of your plugins, so I can try to find some info on them tomorrow when I come home? [I was expecting to find out if one of them was known to slow down the system, so we could potentially narrow down his problem]
... wait for his answer ...
N : There are 62 of them. It'll be simpler if I just send you the passwords so you can look at it by yourself.
Me: [Wait wut] Ok.
... By the way, having people click on your website is good, but having them to stay on it (when you know that most users leave if the page isn't loaded in 2 seconds) is better. You have to find a good balance between speed and SEO. Or have big monies to get a server on steroïds. GAFA has all 3, the rest of the world finds compromises.
N : Here's the solution ! I put a 500 Mbps on my i7 7700 !
... A night passes, I don't answer ...
N : You good at configuring servers ? Especially for CDN ? If I put one in /location A/ and one in /location B/ (for security and SEO)... I have a i7 8350 8Go, it should be enough, and I could later add another in /location C/...
I haven't answered yet. Because I never configured a server, and also because I still can't do anything about his website because a) it's Wordpress and b) he didn't even send me the access codes. I'm just trying to stay calm for the moment.
Shit, I lost the rant again. Well let's begin from the top.
This is little bit personal but I'm not keeping any of this as a secret. I'm a hyperactive thinker at nights (ADHD). I must write this down, although it's well over middle-night at this point.
I just discovered that I might be better writer whilst I'm sleepy, hungry, out of affection of the meds or all of the above.
And may I remind you that I'm not a native English speaker or writer.
* Saved to clipboard, so I won't lose this again *
I've written now 2 long rants, 8 issue reports (devRant) and a loong collab posting in this one sitting, or rather laying. It feels like I'm writing perfectly without missing a beat. I know that's not right, it's the main symptom in ADHD; My brain is actually running slower than an average, much slower. That's a reasonable explanation for the “fast” innovation.
I'm running without restrictions of a normal human, I don't "overthink" every single word and rather go with the flow. That's what spell checkers are for.
* Save *
You can probably see what's happening. It's certainly also true when writing code. I left out the normal cleaning up (except for the grammar, found 10 errors).
It's pretty much the same thing as I'd imagine being drunk or even high.
I must not be the only one.
* Writing tags... *
* Update error count *
* Recover one part from memory *10
My sister (12 years my senior) was the first to get a PC that I got access to. Played a lot of Transport Tycoon in it. I still remember the commands to start the game from dos. She showed me Windows 95 one time but I never liked it. Why would anyone need a GUI if the CLI is available?
My love for code started back then I would say.
A year later I got a PC at home. I would be up all night browsing the local BBS until my mother for the first bill... Let's say we were among the first family in our town that got ISDN and a bit later DSL.
Never got a single virus. Partially because I never could understand how people would click the random button and partially because I setup the account for my mother without admin permissions. She was happy with that arrangement until I moved out