1.0k
u/LeftHandBandito_ Mar 19 '17
That's called the "fuck it bridge"
→ More replies (6)169
u/hazeust Mar 20 '17
No. It's called the, "band-aid bridge"
Gotta get that alliteration lol
→ More replies (20)
281
u/Luder714 Mar 19 '17
Every macro I ever wrote in Excel.
45
Mar 20 '17
I don't know why you or others dislike excel and its VBA... I did my university studies and spent most of my working life on those two programs.
41
34
Mar 20 '17
As a programmer (professionally) this is why:
It's non intuitive. Most programming languages are structured nothing like vb. Statically typed languages are either C-style
[type] [varname]or like mathematics[varname] : [type].Dim _ as _is unintuitive and annoying, and that's just one example.The excel APIs can be very.... particular. I made a few macros for my girlfriend before and there was a tiny bug I fixed that had to do with setting a value within the function call that had a very unintuitive fix (I forget what it was specifically).
The runtime is very, again and I swear this is the last time I Say it, unintuitive. you "create" macros which you run in a button or as a shortcut? Then what if some library doesn't import? Then wtf do you do?
Everything about excel and VBA is shitty as a programmer and if you programmed in multiple languages, you'd realize how shitty VBA feels to write, compared to both statically typed and dynamically typed languages. It feels like writing fucking modern COBOL.
Not that it's particularly performant either. It's stuck to whatever performance excel can pump out, which basically means you might as well just use numpy and the pypy ecosystem for your numerical stuff unless you need very specific finance tools such as the excel solver, and even then I think it's doable.
It just sucks, but my SO is in finance and finance people tend to view programming as a tool, not as their career, so they don't give a fuck. If you do programming for a living, you tend to be more particular and develop preferences, what you like and dislike.
→ More replies (8)9
Mar 20 '17
finance people
Not just them, everybody thinks about programming like that. Programmers are the only ones who care about programming itself. And even they have to overcome this if they want to advance their career.
→ More replies (8)4
u/themouseinator Mar 20 '17
I actually really enjoy using VBA in excel, but it's kind of a mess of a programming language.
→ More replies (3)→ More replies (4)2
Mar 20 '17
As far as programming languages go VBA is messy to use, the syntax is difficult to read and it's just very unintuitive in general. I will concede that some might find the syntax intuitive, though. To each their own.
→ More replies (3)
400
u/gunch Mar 20 '17
84
u/jjmod Mar 20 '17
I don't get it, how is a CPU a rock?
225
107
u/lnsulnsu Mar 20 '17
Its silicon, mixed with some other mineral-derived elements. The materials to make it were mostly all dug out of the ground.
30
u/Saul_Firehand Mar 20 '17
What if I told you everything is dug out of the ground.
Except birds and... shit I guess just some things.
It isn't as mind boggling if just a lot of stuff comes from the ground though.→ More replies (8)15
u/mindsnare Mar 20 '17
Everything does, we do, birds do, everything. Just some more indirectly than others.
→ More replies (6)32
u/CameToComplain_v4 Mar 20 '17
Microchips are made of silicon. Silicon is the second-most plentiful element in the Earth's crust, after oxygen. The other parts of a microchip are other kinds of metal, i.e. other rocks we dig up from the ground.
12
9
7
u/randomguy186 Mar 20 '17
CPUs are made of silicon.
Silicon is made from silica (very pure silicon dioxide.)
Silica is made from sand, which is mostly tiny pieces of quartz rock, which is mostly silicon dioxide.
→ More replies (1)→ More replies (1)4
u/unbrokenPhantom Mar 20 '17
"Not to oversimplify, first you have to flatten the rock and put lightning inside it"
24
u/dalovindj Mar 20 '17
If you leave hydrogen alone for long enough, eventually it begins to think about itself.
5
→ More replies (6)18
u/rukus23 Mar 20 '17
A thing is more than teh sum of its parts.
→ More replies (2)42
67
u/julian88888888 Mar 20 '17 edited Mar 20 '17
What's this game?
*edit, https://store.steampowered.com/app/367450/ $12.
46
9
1
0
115
u/Ginkgopsida Mar 19 '17
35
u/cromiium Mar 20 '17
Damn, I really wanted this sub to be active.
85
u/BobLobLawsLawBlawg Mar 20 '17 edited Mar 20 '17
It was but the mods wrote a script that broke the rendering of it and couldn't log back in
8
→ More replies (1)16
Mar 20 '17 edited Mar 20 '17
→ More replies (1)7
u/sneakpeekbot Mar 20 '17
Here's a sneak peek of /r/badcode using the top posts of the year!
#1: Test post, please upvote!
#2: // comment in during winter time | 16 comments
#3: Is point inside rectangle? Now O(n^2). | 74 commentsI'm a bot, beep boop | Downvote to remove | Contact ^^me | ^^Info | ^^Opt-out
→ More replies (1)1
30
u/TheGamingEngineer Mar 20 '17
So I'm not a programmer, and I typically lurk this sub solely for entertainment, but the analogy implied here got me thinking. Is it actually possible to code up something that achieves the desired objective only once and then always fails on subsequent runs (besides a random number generator)? Normally I would think that a code would have some element of repeatability that would make this impossible, no?
53
u/SirTyrael Mar 20 '17
Quick example of a yes to this answer.
Write a piece of code that opens a file. Reads the information in the file. Does some calculation. Saves the value of the computation in the same file or overwrites it.
Everythings good.
Run it again & everything blows up because the value of the computation wasn't saved in the right format.
57
u/hoadlck Mar 20 '17
Oh, yes. It can happen. It does happen.
Someone tests the feature, and it works the first time...so ship it. But, when the user tries to do the feature twice, it breaks.
21
u/Fig1024 Mar 20 '17
the most common case is when your application / algorithm performs properly for the first task you give it, corrupts some memory while doing so, but finishes properly. The next task you give it will have significantly higher chance of failure because process memory is corrupted.
Of course, restarting the application would "fix it" for the first case.
That's why the first thing you do is try turning it off and on again
5
u/TheGamingEngineer Mar 20 '17
This is the most interesting answer thus far. Thanks!
7
Mar 20 '17
The more interesting answer is that literally a neutron or a proton moving at almost light speed comes from space and hits just that one specific tiny piece of your computer to flip it to the wrong value.
https://en.wikipedia.org/wiki/Soft_error#Alpha_particles_from_package_decay
3
u/TotesMessenger Mar 20 '17
I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:
[/r/soposts] So I'm not a programmer, and I typically lurk this sub solely for entertainment, but the analogy implied here got me thinking.
If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)
3
u/ehcolem Mar 20 '17
Not only possible but common, although ususally not as nicely as 'only once.' It is more like it works a bunch of times for unknown random reasons and then one time doesn't work for what ultimately becomes an obvious reason. :-)
2
u/silentpat530 Mar 20 '17
Yeah it's possible. Especially if it's intended. But it's possible you do something that accidentally makes it only work once as well.
2
u/MeanestBossEver Mar 20 '17
Most common variation of this that I see is code that only works in the development environment. Periodically this is because someone hard coded in the development environment. /headdesk/
1
u/xakeri Mar 20 '17
I wrote some code that read a URL path from a config and saved it to a variable and then got another thing to stick on the end of the path and then call some other stuff to make an HTTP request to that URL.
It only worked the first time because the variable was being appended to the end of the path every time it was called.
1
u/greengo Mar 20 '17
A good analogy would be your company just hired you to write a Shakespearian play. It should both match the Old English style and be as good as all the plays he wrote (e.g. a masterpiece). You've read his work extensively and think you might be able to come up with some decent stuff. Alas, you work on a team of writers, as the deadline is very short. One of the other writers is from Japan, and you're having trouble fitting in his pieces because the translation is a bit weird. The other guy is from New Orleans and tells some great jokes, but it's not helping the end goal that much. The last guy is from Colorado and just rolls in high every day but somehow actually turns in the best work. Ok, now where is that masterpiece?
→ More replies (2)1
u/miellaby Mar 20 '17
Not exactly in the way depicted in the gif. The program doesn't deteriorate all by itself. But piece of codes have side effects, including "collateral damages". For example, reserving resources -let's say the camera of your smartphone- and forgetting to release it. As a whole, these side effects means that every time you run any program, the conditions are slightly different every time.
52
19
u/Doeboyfresh35 Mar 20 '17
Fiserv products..😔
17
u/topgun966 Mar 20 '17
Fiserv
As someone who has to work with them all the time ... this made me laugh .... and then cry and cringe.
11
u/nighthawke75 Mar 20 '17
That makes two of us.
Bastards keep breaking their own certificates and then pretending that nothing happened, only that "it must be something wrong with their browser" all the while every teller and CSR's work comes to a screeching halt due to their browsers breaking FOR THE SAME DAMNED REASON.
→ More replies (5)6
4
1
1
u/Dockirby Mar 20 '17
Please don't say that word to me, you are making me dread the fact I have to document how our integration with them actually works in the next month.
18
u/pickoneforme Mar 20 '17
there's a game called "fantastic contraption" that is similar to this. you build weird vehicles to move the red object from the starting point to the finish point over all sorts of different obstacles. it was awesome.
2
u/spacecowgoesmoo Mar 20 '17
2
u/MeisterKarl Mar 20 '17
Oh yes. TIM is the best! Spent so mant childhood hours in that game and I still can't figure out some of the puzzles 15 years later
24
u/phishyrf Mar 20 '17
Poly bridge is a hugely underrated game..the music makes the game even better.
21
8
7
Mar 20 '17
I'm at the point with my job right now where the company let a few people go and I've taken over maintaining/updating the former employees' code and responsibilities and I've never been so demoralized before. I spend so much time optimizing and rewriting my own code, and these people have written some of the worst "just trying to make it work" hardcode-ridden programming I've ever seen and it's a nightmare trying to fix problems or change anything. And now I'm responsible for cleaning it all up and fixing all the bugs I never knew existed, while still working on my original scripts. 22 years old fixing 50+ year olds' code. Big dose of reality for me recently
5
4
3
3
u/greyjackal Mar 20 '17
It's IBleedOrange, back from the dead. And having never written a line of code in his life.
3
3
3
u/Steve_the_Stevedore Mar 20 '17
That's how career advancement works:
Fuck shit up and jump ship before the company drags you down with it!
3
Mar 20 '17
But that bridge looks like it's harder to build than if you just did it the right wa...
...oh, this analogy is deep.
2
Mar 20 '17
this reminds of how my coworkers work and when they make a pull request. Then I comment it like there shit is fucked like this to which they respond that it works and "I don't see why I need to change it if it works."
2
2
u/jroddie4 Mar 20 '17
until someone comes back 5 years from now and rewrites it a jillion times faster as a single ramp because it no longer plays nice
→ More replies (1)
2
2
2
1
1
1
1
1
1
Mar 20 '17
As a student taking a couple of programming classes in his senior year of high school, this is how most of my homework programs work
1
u/Bonchee Mar 20 '17
I always imagined the superrich did stuff like this irl when they ran out of things to do. The ole' one time use bridge.
1
1
1
1
1
1
u/m4bwav Mar 20 '17
Validate your input parameters often enough and its hard not to get something to work.
1
1
1
u/nomnaut Mar 20 '17
This is accurate. It's an iterator with a StopIteration to handle an exception. In this case, when the bridge is out.
1
1
u/mtarascio Mar 20 '17
I'm not sure, it landed perfectly with an acceleration.
Seemed superior to the outcome that was originally envisaged.
It spent more time at the execution stage but then sped to the next instruction.
Someone needs to do the maths.
1
1
1
u/grandaddy7 Mar 20 '17
This game looks fun and I want to buy it.
Then I read reviews and people are like the game looked fun so I bought it but it wasn't as much fun to play.
1
1
u/thecatsleeps Mar 20 '17
Hey they just asked get truck for point a to point b. Not my fault bridge collapses.
1
1
1
1
1
1
1
u/Pleb_nz Mar 20 '17
Customer 'it worked the first time, now it's fucked' Support 'please power off your machine then turn back on and it should be fine'
1
1
u/everno99 Mar 20 '17
Reminds me of how Mr Burns is almost immortal because he has so many diseases, they actually cancel each other out.
1
1
1
1
Mar 20 '17
ASU, Fall 2015, MAE 384 assignment 4.... Yes. This is the perfect visual description of what I submitted that day. It was so bad, I remember it still...
1
1
Mar 20 '17
All the filemaker scripts I wrote to enable that standalone software to become a semi-usable ERP for an SME.
1
1
1
1
1
u/SCPoPo Mar 20 '17
looks like my code after a night of drinking and coding... "IDK wtf I did last night but it works... good to go for me...
1
u/therighttobecool Mar 20 '17
Bad code that works should still work repeatedly so that makes no sense. It would just look really messy. Think of a house made of a bunch of bricks in haphazard shapes but you put so much fucking cement on it, the house looks messy but it still holds strong. Another one would be how the Millennium Falcon from Star Wars looks like a mess of stuff glued together (though it looks flawless to me) but it runs okay
1
Mar 20 '17
As a non coder (or at least don't consider myself one, just know basic programming in Python & C++), how the hell do you go about programming anything 3D or representative?
1
Mar 20 '17
This is timely, we're doing this year's appraisal, and this about sums up my self evaluation.
1
u/SarenSabertooth Mar 20 '17
Lmao I try to be all clean and make nice objects and asynchronous functions for days, but in the end I think most my code works like that and I should just hack most of it and save myself the time of even trying… It seems more fun when you invest the least effort and get the most out of it.
1
1
1
1
1
u/SupremeRedditBot Mar 20 '17
Congrats for reaching r/all/top/ (of the day, top 50) with your post!
I am a bot, probably quite annoying, I mean no harm ^though
Message me to add your account or subreddit to my ^blacklist
1
1
1
1
u/CRISPR Mar 20 '17
That's not the end of the story. The story is that this gif never stops and bad code that worked and became legacy while working and being bad and tons of good stuff was built that is relying on that bad stuff.
And at that point changing the bad stuff requires a lot of LOE
1
u/Doeboyfresh35 Mar 20 '17
I work for them.. the software is trash and poorly developed. They roll it out with very little testing and let the client and support reps figure out what works and what doesn't. Jank ass Janks..!
2
u/Christian_Akacro Mar 20 '17
As a mod of r/Polybridge and the Producer of the game; that is entirely false.
1
1
u/sirmoveon Mar 20 '17
Bad code you say; Smart code I say.
In the business world they call it planned obsolescence. Lets cut the double standards, shall we?
6
1
1
1
Mar 20 '17
Sometimes when constructing a logic statement in a program my mind goes blank and I just try things until it works. This captures that process perfectly.
1.3k
u/ipha Mar 20 '17
I think everyone has looked at their old code and thought "this _shouldn't_ work"