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 - "wk19"
-
was at a hackathon, had to write an app that sent current location to emergency contact. hard coded the location of where the hackathon was taking place and one of the members phone numbers. we came second14
-
First time poster here. Please be nice :)
My biggest workaround is one that's being currently deployed to 40 truck drivers (trucking company here), preventing printers being out of usage while on the road. We also have to use HP ePrint to wirelessly print documents, but that's another story for another time I guess :)
CEO asked us to install wifi printers in our 40-ish trucks which has wifi on board. However he's always picking one of the cheapest options possible, so we got consumer grade printers (Laserjet 1002w). Those printers often disconnects without getting back on the truck wifi network EVER. I have to get physically in the truck, wire the printer via USB onto my laptop and reconfigure Wifi on it with the HP Windows tool. This means lots of printer downtime, which always happens when the drivers are three timezones away from our office
Then I thought: "What if I could sniff what HP sends via USB while I (re)configure the printer, and replay whats being sent later? Our trucks all have an Android tablet with a USB type-A connector with host capability, so I could write a small app that replays the config when plugged in by the user.
Three days of hacking around later, I have a working app. By chance, HP printers (or at least those models we have) uses HTTP POST via USB, so I could easily replay the request.
Edit: the end result is that truck drivers just plug the printer to their tablet, press "reconfigure" in a home made Android app, printer is reconnected to the truck and they're good to go. They don't have access to the network nor know enough to debug themselves anyways14 -
Like many others my favourote shameless hack is a cronjob to restart our app server at 2am, thus preventing out of memory exceptions5
-
I made a ridicously hilarious hack recently. My refrigerator it's broken, it has a huge leak of water, my hack was to let the water flow in a plastic box and make a circuit with two water level sensors, a relay and a PIC16F628A to activate a pump that sucks water away through a tube that I wedged intlside the gasket of the washbasin. This gave me the time to buy a newer and better one.15
-
Did this on my first programming exam.
int index = 0
int value = 0
try {
while true {
value += array[index]
index++
}
} catch NullPointerException {
System.out.print("Sum: " + value)
}
The task was to add together all numbers in an array.
I somehow aced the exam, but got called in to teachers office this is not the way to use exceptions.7 -
Probably the biggest one in my life.
TL:DR at the bottom
A client wanted to create an online retirement calculator, sounds easy enough , i said sure.
Few days later i get an email with an excel file saying the online version has to work exactly like this and they're on a tight deadline
Having a little experience with excel, i thought eh, what could possibly go wrong, if anything i can take off the calculations from the excel file
I WAS WRONG !!!
17 Sheets, Linking each other, Passing data to each sheet to make the calculation
( Sure they had lot of stuff to calculate, like age, gender, financial group etc etc )
First thing i said to my self was, WHAT THE FREAKING FUCK IS THIS ?, WHAT YEAR IS THIS ?
After messing with it for couple of hours just to get one calculation out of it, i gave up
Thought about making a mysql database with the cell data and making the calculations, but NOOOO.
Whoever made it decided to put each cell a excel calculation ( so even if i manage to get it into a database and recode all the calculations it would be wayyy pass the deadline )
Then i had an epiphany
"What if i could just parse the excel file and get the data ?"
Did a bit of research sure enough there's a php project
( But i think it was outdated and takes about 15-25 seconds to parse, and makes a copy of the original file )
But this seemed like the best option at the time.
So downloaded the library, finished the whole thing, wrote a cron job to delete temporary files, and added a loading spinner for that delay, so people know something is happening
( and had few days to spare )
Sent the demo link to client, they were very happy with it, cause it worked same as their cute little excel file and gave the same result,
It's been live on their website for almost a year now, lot of submissions, no complains
I was feeling bit guilty just after finishing it, cause i could've done better, but not anymore
Sorry for making it so long, to understand the whole thing, you need to know the full story
TL:DR - Replicated the functionality of a 17 sheet excel calculator in php hack-ishly.8 -
Back in 2011 when I was 14, I created a cmd shortcut on all pc in my school's computer lab. Replaced the icon and renamed it to Internet Explorer. Deleted the original IE shortcut and a week later the lab got closed because they all the computers got infected with a "virus"
i know im lame kill me7 -
Broke my glasses in half.
Not being able to see shit i took my 3D glasses apart and ziplocked my glasses lenses on the 3d glasses frame. Been using this version of my glasses for a good one and a half year. Yeap13 -
iPhone app riddled with memory leaks from a team of interns. Big series of demos coming up. Managements solution?
Send instructions to the person giving the demo to kill the app every 20 mins or so.1 -
This is my river baby, a laptop that was broken by its previous owner. It came to me with many dents (I covered those with stickers) and in a not booting state for about $300 after the guy dropped it in a river in South America.
- There is river sediment inside the screen, as well as the motherboard.
- If I put two sticks of RAM in it, the display artifacts all over the place and the computer crashes randomly. One slot must be empty.
- The ODD was filled with literal garbage. There is now a hard drive in its place.
- Running Windows through a VM would cause the WiFi to fail in a confusing manner. No one had ever seen that type of error before. I had to reseat the AirPort card.
- At one point, the power button stopped working, so I removed the keyboard and would start the computer by shorting two pads on the motherboard with a screwdriver.
- I’ve had all sorts of strange issues with it because of the water damage.
- I colored the keyboard with cellophane... 😅
After taking it apart for the 100th time, it’s now completely stable. I’ve had it for about 4 years, but it’s getting slow. I’m not sure what will come after the beloved river baby...17 -
Boss:(pastes a bunch of Python code in Slack)
Boss: Need to convert a long list of ints to a comma separated string. Can you finish it for me? Need it now, I'm in a hurry!!
Me : (Delete all boss's code)
Me : input=[1,2,3,4,5,6,....] output=",".join(str(e) for e in input)
Boss: Damn you! Thanks. Brunch on me today.5 -
My first hack... Back at the days when phones had disks to dial a number. I was a kid of cause, I'm not that old. I used to like to call my grans. Once, when I supposed to go to sleep already, I've found out that there is phone socket in my room (the one connected to the copper wire, that is where the word "phone line" came from).
It took me about a half of an hour to detach handset from the toy phone and about two ours to reverse engineer dialing protocol (you just need to disconnect the line sequentially corresponding number if times).
And after that I've heard my granny's voice. I was literally overwhelmed that it worked.6 -
Sorry, but the app had to stay running. It was just a minor exception anyway.
try {
executeMainLoop();
}
catch (Exception ex) {
executeMainLoop();
}4 -
So I found an old laptop in the garbage, it had a better fan so I dremeled out my old fan and glued in the salvaged fan. It fits like a glove. All wired in and ready to go.1
-
The server for an internal application was acting up, but everything was working fine locally. After an 18 hour day, I just rerouted the traffic to my dev machine and left it on overnight so I could go home.
A piece of me hates myself and also loves myself for that one.2 -
In a programming contest, I forgot how to round numbers in Java, an I needed a 3 number rounding, so I multiplied the number by 1000, then sum 0.5 and convert it to integer so the decimal part would be gone, finally, just print the number except the 3 last digits as a string, put a period and print the other 3 digits.
I must say I'm not proud of that.5 -
All my code is hacked together and barely works and is nowhere near shameless. But I'm pretty proud of my hardware hacks. Like the sticker that holds the casing on my laptop together.2
-
I was building a controller for an autonomous RC car at a racing competition. We were having issues with line detection leading to poor performance in the steering module. For the drag race we pioneered an innovative new steering strategy: never steer. Won the event.6
-
Client called that the application is printing 5 copies instead of 10. I told the store rep to print 20, and it worked! 😂
-
Had to program a microprocessor to count a pendulum swing, turns out that the only sensor I had for this wasn't working, implemented a function that simulated the swing and presented the projecto in less than 5 minutes so the teacher wouldn't notice5
-
I took a course in app programming and one of the assignments was to create an "instagram-like" photo app with some simple filters. One of them was pixelate.
Instead of changing the RGB value of each individual pixel, i just saved the image in a lower resolution.
The result wasnt perfect, but good enough to pass.
And the teacher never even looked at the code..5 -
This is one of the biggest hack in my life:
We had a database project in our 2nd year of university where we had to create some complex database and input a lot of random data like postcode, names, weathers, age etc etc.
While everyone was struggling to copy paste random datas in the sql file to generate the data, I used an API from a website using Java to generate all the data.
People came to me and took me as a very brilliant person who does his project on time. I never told that to anyone5 -
mysql server crashes every 18 days, no oom, no crash logs, no sigkill being sent (used auditd). so I figure it's a unknown corner case bug in mysql. now I use a cron job to restart the damn thing every week at 3am, not a problem anymore8
-
Was making a text based console game last year. Had to know natural human responses. Got too tired of it and make it print "Uhh, I've never had a lot of education, please use easy words."
-
We were participating in a competition once where our project was an accident detection sensor (it was a business competition). We took a broken mp3 player without cover and used it as the device while our laptop played sensor sounds.
We were the runner ups3 -
Hack-intosh your old shitty HP. No shame at all! Just joy and fun. 😂 This laptop enjoyed its latest days of life.8
-
A coworkers shameless hack. Our services have a bug being investigated that cause the server eventually to fail.
The hack? Reset the connections of every user every 6 hours and restart the servers.
-_-3 -
Hi.
Programming language types are only two:
- Assembly
- All the rest
I'm destroyed, my brain is melted.
Assembly is hate and love at the same time.2 -
About a year ago I found this old desktop in my storage room. I plugged it into a monitor, started it, opened a game, and the game was running at about 5 fps. Unplugged it, opened the cover, saw loads of dust, got rid of all the dust, started it again. Fps increased 1000%.
Moral of the story is, CLEAN YOUR FRICKIN COMPUTER.3 -
In a programming exam, we had to write a program in 60 minutes, part of which was sorting some strings by length (strings the same length had to be in the same line)... I had like 3 minutes left, so i wrote this beauty:
boolean b = false;
for(int i = 0; i <= 999999; i++){
for(int j = 0; j <= strings.length; j++){
if(i == strings[j].length()){
System.out.print(s + " ");
b = true;
}
}
if(b){
System.out.println();
b = false;
}
}6 -
we had a very persistent FOUC
So what I quickly did was on page load, hide the DOM
sleep for around 1.5s and show DOM
people never noticed, the page load was always delayed by 1.5s :D3 -
This was the best hack when I was 11. My computer had a too small fan that was always on max speed, and thus really loud. To overcome this issue I wrapped a thick blanket around the entire computer case. A week later it broke down due to the obvious heating problem, and when it came back from service the repair technician just looked at me saying "Someone has had this computer fucked up intentionally, everything is melted from within. What have you done to it?!" Me being the piece of shit that I was just denied and got a brand new PC for free, nobody ever knew..
-
About to demo my OS project for a systems programming class. Weird artifacting happening on the right edge of the screen (garbage characters, wrong color, etc.). VGA graphics are too arcane an art for me to figure out in time, so I draw a 1 block thick border around the whole screen and pretend I meant to do it. I updated that bitch every single frame to make sure nothing would ever be drawn on the edges. I got bonus points for making it look nicer.1
-
My first C++ app for a client was leaking so much memory that Windows kept crashing too.
So I had to press Ctrl-Alt-Del every few runs.
But the laptop running the app was enclosed in a box, so the keyboard was inaccessible.
My hack was to set up an Arduino, a push button outside the box and a wire. Asked the steward to push the button every three people trying the system. So the Arduino sends Ctrl-Alt-Del and the app was running again.
The client was happy :) -
Best hack... Think it was in high school when I figured out the eurobate free sms api was exposed and with my own php script could send as many free sms as I wanted and sms nuke friends.
Sms cost quite a lot pr message back then. -
While studying business information technology (useless btw), we had to take these exams with Microsoft Office programs.
When it was time for Excel exam, we were given this sheet of instructions on what to do, and it even listed the exact functions you had to use.
The fun started when I realized that my Windows installation was in English, so my Excel installation was also in English. The instruction sheet and the functions listed in it were in my native language.
Because Excel is probably the shittiest thing ever made, this is the part where you know you are fucked. The functions listed in the instructions don't even exist in the English version (same goes vice versa btw), so what can you do?
You implement the fucking functions. Never used VB before that day, and never will again.
But I got a perfect score.2 -
Since my first post was a success, here's another shameless hack-- in this case, ripping a "closed" database I don't usually have access to and making a copy in MySQL for productivity purposes. That was at a former job as an IT guy at a hardware store, think Lowes/Rona.
We had an old SCO Unix server hosting Informix SQL (curious, anyone here touched iSQL?), which has terminal only forms for the users to handle data, and has keybindings that are strangely vi based (ESC does commit changes. Mindfsck for the users!). To add new price changes to our products, this results to a lengthy procedure inside a terminal form (with ascii borders!) with a few required fields, which makes this rather long. Sadly, only I and a colleague had access to price changes.
Introducing a manager who asks a price change for a brand- not a single product, but the whole product line of a brand we sell. Oh and, those price changes ends later after the weekend (twice the work, back at regular price!)
The usual process is that they send me a price change request Excel document with all the item codes along with the new prices. However, being non technical, those managers write EVERYTHING at hand, cell by cell (code, product name, cost, new price, etc), sometimes just copy pasted from a terminal window
So when the manager asked me to change all those prices, I thought "That's the last time I manually enter all of this sh!t- and so does he". Since I already have a MySQL copy of the items & actual (live) price tables, I wrote a PHP backend to provide a basic API to be consumed to a now VBA enhanced Excel sheet.
This VBA Excel sheet had additional options like calculating a new price based on user provided choices ("Lower price by x $ or x %, but stay above cost by x $ or x %"), so the user could simply write back to back every item codes and the VBA Excel sheet will fetch & display automatically all relevant infos, and calculate a new price if it's a 20% price cut for example.
So when the managers started using that VBA sheet, I had also hidden a button which simply generate all SQL inserts for the prices written in the form, including a "back to regular price" if the user specified an end date, etc.
No more manual form entry for me, no more keyboard pecking for the managers with new prices calculated for them. It was a win/win :)1 -
For robotics I decided to write a program that would automatically tune a PID loop (a loop with three magic constants that tells you how much power to give the motors).
Being a high school student who hasn't been taught anything about the theory of PID loops or the right way to tune them, I had no clue what I was doing. So instead of actually learning the calculus to do it, I just made an evolutionary tuner that keeps guessing slight variations of the last-best three constants.
Basically, you press start and the robot spins in circles until you come back in 15 minutes.3 -
Had to demo i18n working to client with 45m notice..
Google translate the whole page server side and pray CSS behaves. -
I was once asked to create a fully secure chat system prototype (the ui didn't matter) in 2 days. We ended up building a client in python (which I wrote) and it kinda worked and a c# backend that didn't really work.
1 hour before we had to present the project to some high up management we decided that we couldn't fix the bugs in the system.
So I came up with a cool idea. Why not use ssh?
So I set up a bash script that writes to a file and tail -f that reads from the file. That way you could chat securely with another person.
I made it 15 minutes before the presentation with no Internet working :) they said it was hacky but a cool solution they saw that day :p I felt happy and that I had to thank Linux for being there for me2 -
In my second year of A levels in secondary school (college) we had to make a quiz game using Microsoft Visual Basic. Was my first time using the software, got annoyed within a few weeks and downloaded a template off the internet. The whole IT department thought I was some form of genius until I crashed the servers (in over 200 schools) trying to hack them 6 weeks later.
Sir if you're reading this, I'm sorry.1 -
Best shameless hack: installing a Windows Service to restart Apache Tomcat every night at 2am on a clients' server coz the jsp application kept leaking memory and crashing tomcat. So bad, yet such a timesaver.1
-
I had a list that was built off a for loop.
One day the list was off by 1, and continued to be for a solid week...
Instead of solving the problem.. Added +1 to the incrementer variable.
Hasn't happened since (3 years)1 -
this.callThisFunction = this.callThisFunction.bind(this);
👆 is the stupidest thing I have ever seen.6 -
We make a small server product with a web based admin system, as we were going to have limited customers who will use this (usually just the engineers) and this was not on the www. We dropped all support for all browsers other then chrome/firefox. No more IE/safari bugs for us XD2
-
Worked with a team of interns learning Swift. They had a really tight deadline, so they decided if they were not sure what the app should do if a nil showed up, they would just force unwrap and let it crash.
-
*[style*="width:"],*[width] {max-width:100% !important;}img[width] {height:auto !important;}
* !important feels so hacky but it works!
Old site with ancient code and multiple people not versed in css or even newer html. Decided, ah F it, just workaround that and * all the things!1 -
Not my hack but one I've seen hundreds of times:
Thread.sleep() because you don't know how to handle async calls -
developing Android application for reporting Road events....
I was late to submit an update consisting of the Users Report History with options to view, delete and Re-report(which didn't make sense since it's reported already).....
I had to put a Toast to thank user for reporting but literally nothing is sent to server -
Not entirely dev related, but definitely shameless. In high-school we had to study CS, but it was more about knowing to use Office. We had class tests, which mean that we all had the same task and we had to finish it until the end of the class. Obviously no one wanted to do it, so whoever finished first would email it to everyone. Most people, however, were stupid enough to leave the meta data untouched, so it was obvious who was the original author. To not appear suspicious, I removed the original metadata and put my own in, and deliberately made errors in the sheet and corrected others that I noticed. I never got caught, because my work would always have "unique" mistakes.1
-
Wk19 is the week I become a real programmer because of you guys ...
Shameless bastards , I am one of you now -
Well, this one was very satisfying.
When I resigned from my previous job, there was this one last task I had to finish. The task was to implement an identity and access management system that would work across three different platforms they had. I used to work on one of them which had nothing of the sort but the other two had something of their own. Here lies the kicker, it had to work with existing authorization system in other two platforms. After explaining multiple times why that is a bad idea, I gave up. I created an interface, no implementation, documented how the interface was meant to be used and got the hell out of there. -
Not my hack but when I was in university, for one test we had to find all 3 digits number that satisfied current set of criteria. Friend of mine knew from earlier that solution is one number and written program that just prints that number. TA give him 0 points and he get in fight claiming that not only his solution was good but also most optimal one.4
-
Company website had some video playlists that weren't working, because the javascript required to run them was interacting with some of squarespace's scripts, so I dropped the video players in iframes and haven't looked back
-
Wanna know about hacks? I'll tell you. There is a peace of software called SugarCRM. It has OAuth2 provider implementation. I was assigned to write OAuth2 consumer for it.
It turned out they just failed to make it right.
The list of hacks:
* Hack on standard Authentication header. They use custom.
* Hack on "scope". They send null which is standard violation. So it is replaced to empty string before response processing starts.
* This is my favorite. Refresh token simply doesn't work. So we need to store user's credentials in memory to be able to reauthenticate user transparently.2 -
So we were building this thing with a raspberry pi, a few sensors and a few motors but for some reason we could not interface a sensor with the pi (this is supposed to be trivial) so we interfaced it with an Arduino and had connected a pin on the Arduino to the Raspberry pi to alert the pi when the sensor reads something!
Not something we were proud of but we had time constraints and couldn't figure out how to make it work. Also, the thing we were building was just for a one time use so we thought it would be okay -
I HATE it when client does not know what he wants. Removed a functionality only to be added back again with all the ripples going through the code¡¡¡¡¡
ARGH¡¡¡¡¡¡ FUCK ME
Where's my exclamation mark u shitty SwiftKey keyboard¿¿¿¿1 -
I wanted that Makefile to avoid stripping binaries after building them, but there was no clear option for that. I only found this:
STRIP = strip
That tells where to find the executable that does the stripping. I changed it to a no-op executable, like "true".
So now I have
STRIP = true
to disable stripping.11 -
This hack is totally shameless. I quit smoking a couple years ago just to start vaping. And I always was allowed to vape at my office desk.
No stressballs Jedi this needs. -
One more before I go to bed,
Once I spent hours setting up shit on one of my ubuntu server via SSH and realised I'm on the wrong server later on.1 -
Who in their right mind would do this / think of this....
Salesforce has the option use their API. Either via SOAP or Rest. At my work we currently use SOAP and I wanted to rewrite that to Rest. Fine, you would say.
Their Rest API uses oAuth, nothing fancy you would think. But those motherfuckers, per default have the option enabled that the refresh tokens you get via the necessary API calls are being marked expired the moment the API gives them to you... Then why the hell give them in the first place.
It took me 2 hours of my life to figure out, why in godsname all my refresh tokens were marked as expired. Fuck you Salesforce, I want those 2 hours back! God fucking damn it... I really fed up with this type of bullshit!! -
Instead of looping through your entire project, just recursively calling main() to restart every time it would otherwise end
-
Function works() {
Try {
HorriblyDyingCode();
Return true;
} catch (Exception e) {
Return false;
}
} -
We once had to make another wordpress multilanguage site on a different domain but it should use the whole footer from previous site full with its images and sitemaps. The client said "just make it look like a copy of a footer". This would require us to copy the whole footer for 4 different languages every time somebody makes a change in the original site.
So the workaround we did in the end was to make a specific page in original wordpress site which only returns the footer.
In the new wordpress site we made a code which scrapes that whole page and puts its contents on the footer of the new wordpress site.
It worked perfectly and we never needed to copy the whole footer again because it was "dynamic". -
In this game I'm making for class my player was moving opposite of the control pressed... So I multiplied the movement values by negative 12
-
When I first started down the path to becoming a developer, I was a "business analyst" where I managed our departments reports and ended up migrating all the reports from daily query run in MS Access with Task manager and emailed out to all the managers including the VP of the entire business unit, I created
Views in the database and sent out the same spreadsheet with the view in excel daily since management didn't want "change". Granted this was at a large health care company in the US and didn't want to invest in a real dashboard for their reports. The only thing that was changed in the email and file was the file name with the current date. I left the company a while ago and recently applied for a similar position for the shits and gigs. Interviewed with the It manager and they're still using the same excel macro I wrote 3 years later.2 -
Project manager: "we need someone who isn't busy to work on the database for a few weeks"
*Fullscreen picture of Windows blue screen of death*
Me: "what the fuck bug after bug"
Project manager: "ouch you better work on that ASAP we are behind"
Coworker: -_-
Me: ¯\_(ツ)_/¯ -
Was in a university group project and had to make an angular momentum measurement device. An hour before demo voltage on one of the pins was still a bit too high. Friend drove to Chinatown not too far away from campus and bought a pack of the cheapest batteries. Plugged the cheap batteries in, the voltage was just spot on. How awesome was that!
-
A group of friends and I when we were 15 competed in a UK-wide competition to build a robot with sonar and touch sensors to navigate through a field of obstacles. The winner was the fastest average. Our robot only travelled in bent lines, and turned when it detected an obstacle infront of it. We had our three tries, the first two taking perhaps 30 seconds. The third time we twisted it slightly on its start position, and without stopping it followed a curve through the whole course, in about 3 seconds. Unfortunately we weren't even mentioned in the runners up :L1
-
Back in the days of DOS/Win3.x I was jerking around in school sending messages to my friends in other classes by changing autoexec.bat on the workstations I used.
Somehow someone mistook my messages as a virus, and the IT department closed down the workstations for weeks.2 -
Legitimately lost an old very terrible project. But I didn't have to deal with it anymore so it was ok. Just called it no longer maintainable. I was so convinced it was gone that when I found it 6 years later I finally realized "losing" the project was my mind just protecting itself from insanity.
-
Trying to make android system rw on a rooted phone, but it doesn't allow me. FML. Hiw am I going to block YouTube ads now?8
-
💻 Four months ago. 💻
The Systems & Networks's professor said "You've to do a program that simulate the ARP table, in C."
...
After one week I had done the program!😎 (About 400 code lines)
And the rest of the class?
... One week... Two week... Three week.
Somebody had done the program, somebody else no.
Have an "informatics-stupid class" is funny and makes you look smarter. 😂🔝 -
Every semester at my university I must grade my teachers with a poll of about 30 questions and 5 choices each with 1 question beign a negative one.
So I looked at the HTML and made a small JS script to fill out the poll with semi-random choices and adding the exception for that one particular question.7 -
Back in the early noughties I had an interview for the new job. A couple days before the interview I've visited that company's website. There was search input. Of cause I've entered some hacky things into it. And after several attempts I hacked it. The site was down in an infinite loop.
Two days later I told interviewer about the bug and what I did to reproduce it. He was surprised and checked the website. It was still down the same way.
I was totally ashamed. I was supposed to report that problem somehow.
BTW I got the job:) -
Created a script to replace the contents of a file each morning before the users get into the office. This file is a QuickBooks .Nd network file that for some reason gets written with a bad config causing it to break QuickBooks on the network for the whole firm...
QuickBooks had no comment, and after weeks of trying to find out why it's doing it. I just created that script to replace it with the good config. -
@dfox devRant search seems a tad iffy - if I search for "wk19" I see results for pretty much every weekly rant, not just wk19 ones.3
-
My most recent workaround occurred last week.
We have a demo very soon and I had to change our iOS app to use a new Web API endpoint for uploading content.
Long story short: The existing code is so awful and rigid and dependant on Core Data that I ended up having to completely bypass the service layer of the app and implement the new endpoint as a raw HTTP request. Its gonna take a long time to refactor the existing service layer. All because the new endpoint has a different content type. -
My most shameless hacks mostly include cronjobs that run every 5 minutes to cleanup or fix some faulty stuff...
-
SharePoint have something called 'event receiver'. An event is triggered when the user inserts a new record in a list. That event must update a column in the same item. After a few minutes it starts to throw conflict errors while trying to update said column. Doesn't happen with every user. Also I wasn't able to reproduce this behavior in the dev environment.
So now I just recursively call the update method, passing an iterator parameter, repeating the same method until it successfully update the record. Or after 6 failures email someone to see what's going on. Just did it today and published at 7PM. Tomorrow gonna be a long day and I know I deserve it.1 -
You know you are done when stackoverflow gives upon you: http://stackoverflow.com/questions/...
So I decided to run a scheduled job on the server just before everyone starts using the it. -
I propagate to others that the use of singletons is bad, but still use them on rare occasions in code, which only I touch. 😈🐒4
-
<!-- KHAN!!!!!!! -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]--> -
I recieved a ticket.. spent a couple of hours on it... decided that the controller method needs to be completely refactored... so I just assigned it to a junior dev saying I do think have time for this.
-
Fucking jQuery in Polymer 0.5.
When polymer 0.5 was released, things seemed incredibly easy at first, but when you need to do some complex things, the abstraction layer provided by web components are not of much help. Babel wasn't there too, so I ended up using scope hacks to access event listeners (var self = this). Worse, I have to use jQuery because many of things are downright tedious or fucked up back then, including myself.
Now, React is here; No jQuery, no hacks, no web component polyfills, no unsolvable perf bugs, no scope hacks, no 10sec loading time, no regrets.1 -
I once added a scale css-transform with a media query targeting some specific Macbook to the whole <body> of a site.
Some designer came up with a pretty stupid navigation which wouldn't fit into that viewport, deadline was close and the customer wanted to see exactly the layout he had approved. Still feel bad about this :/ -
If I need to write a script to do something quickly and I encounter an error:
try:
do_something()
except:
pass # if curious, even print bad item
i.e. stupid errors such as url not found, access denied or whatever else I'm too lazy to find in a mess I wrote in 5-10 minutes, which mostly consists of a regex fetched stuff or similar -
I've written watchdog to restart background job runner every 5 minutes because I couldn't track why its process was randomly killed...
But hey, client had conference in 10 minutes so as long as it works... -
Once wrote a whole little marketing game thing as a WordPress page template. It was a long, weird file! Probably should've written a plugin instead..
-
reading the project's code, following "save" callback in jvascript, i find this comment "IMPORTANT : this is a workaround to solve memory leak" and below it code that basically removes all elements from th DOM and adds them again.
so basically, someone could not find a cause to a memory leak and decided "solve it" in a specific place by reloading almost an entire page -
I used alot of if checks to convert category name to category ids for sql query. For eg.
/Index.php?cat=venue
And I handled it like
If($cat=='venue')
{
$cat =1;
}
And so on.1 -
My joomla projects are full of workarounds, especially with the seblod cck, really nasty workarounds xD2
-
Found a JavaScript string that contains HTML, posts via Ajax just to be echoed back to the client to build HTML based on the returned value. As HTML. Not my code but made me lol1
-
Using windows scheduled tasks to call a url running classic asp in the background. This page would in turn send out a mail shot...
Awful shit that I did when I started coding in the old days...! -
My first #hack is that I once opened my friends account on my computer using the Google recovery question which he kept as his favorite sport . Once in I changed the password and informed him that his account was hacked..lol you should see his face .later I told him he put his recovery question to be hard to be guessed ....lol I think he learnt the lesson the hard way...well after that I got to know about internet ethical rules and there ends the matter
-
Coming from a Java background, could you please explain to me what is so special about Python these dags :/3
-
We have a huge domain model in Java and something is really fucked up with our equals/hashcode implementations and know body can track it down.
I have suggested Lombok/Groovy several times but they didn't listen.
Anyways it is so fucked up, that map.contains(foo) returns false, although it is part of the map.
So we wrote something like this:
for (Entity e: map.keyset) {
if (foo.equals(e) {
return true;
}
}1 -
I once had a colleague ranting about my variable naming because it went out of bounds on his IDE's printmargin. To please him i wrote minified code while pair programming
-
I've got this... thing. I built it when I first started with PHP. It's an OAuth2 system to pull form data from a service into a plugin, to make the rest of marketing's lives easier. It requires manually taking the initial received token and putting it into a database when doing the first auth. Occasionally it breaks and I have to try and remember the steps to get a replacement token to start the cycle over.
Someday I'll fix it, but for now... Let's fuck about with my browser for a few minutes to get the new token. -
Work with PLCs and similar controllers. If there is an issue that cannot be found in a relative amount of time, just turn it off and back on. "Power cycle" is oh to common with my coworkers and actually works too often for my liking.
-
New ad self-service portal too hard to integrate ssl and can't have users send their passwords in plaintext.
Setup apache proxy with ssl in same vpc to encrypt traffic to and from vpc.
All good as long as nobody is in my vpc sniffing traffic... -
Windows is a shameful dev enviro but when you stuck in Africa, you gotto work with what you have. I dabble in node, R and hadoop and setting up environment and building modules on windows is a walk on hot ash in a desert.
To go around setting up of different dev enviros, i use a windows pre installed hack specially meant for that purpose. A new user account for each dev job. Kips my machine clean and sane while avoiding the blue screen.
After all, who still shares laptops today enough to use different user accounts😂😂1 -
Not best practice whatsoever because the box was most likely owned, but...
SSH kept defaulting back to port 22 when it wasn't supposed to. So, wrote a cronjob that checked diff between SSH config and backed up SSH config. If different, reload backup. Didn't get locked out again.
Box has of course been replaced.2 -
Learned just enough Groovy to call a Python script and pass args to it. I have no problem with that.
-
Using Sudo to run a node script that interacts with GPIO pins on Ubuntu (Minnowboard). The permissions suck.