Details
-
AboutI started Coding in Minecraft with Computercraft, got interested in C and then C++. Now I'm studying computer science.
-
SkillsC, C++, Java
-
LocationGermany
Joined devRant on 11/22/2016
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
-
Things I've learned throughout my 5 - 6 years as a programmer.
- StackOverflow is full of assholes.
- CMS's are for weaklings.
- The best feeling about waking up in the morning is figuring out how to solve that error in your code.
- You no longer think about normal people things. Your mind is full of code.
- You're practically a computer.
- ALWAYS backup and save your stuff or you WILL regret it. Enable autosave if possible.
- RIP your social life (if your friends don't know squat about programming)
- Darkness is better.
- Being a programmer is amazing.26 -
this.title = "gg Microsoft"
this.metadata = {
rant: true,
long: true,
super_long: true,
has_summary: true
}
// Also:
let microsoft = "dead" // please?
tl;dr: Windows' MAX_PATH is the devil, and it basically does not allow you to copy files with paths that exceed this length. No matter what. Even with official fixes and workarounds.
Long story:
So, I haven't had actual gainful employ in quite awhile. I've been earning just enough to get behind on bills and go without all but basic groceries. Because of this, our electronics have been ... in need of upgrading for quite awhile. In particular, we've needed new drives. (We've been down a server for two years now because its drive died!)
Anyway, I originally bought my external drive just for backup, but due to the above, I eventually began using it for everyday things. including Steam. over USB. Terrible, right? So, I decided to mount it as an internal drive to lower the read/write times. Finding SATA cables was difficult, the motherboard's SATA plugs are in a terrible spot, and my tiny case (and 2yo) made everything soo much worse. It was a miserable experience, but I finally got it installed.
However! It turns out the Seagate external drives use some custom drive header, or custom driver to access the drive, so Windows couldn't read the bare drive. ffs. So, I took it out again (joy) and put it back in the enclosure, and began copying the files off.
The drive I'm copying it to is smaller, so I enabled compression to allow storing a bit more of the data, and excluded a couple of directories so I could copy those elsewhere. I (barely) managed to fit everything with some pretty tight shuffling.
but. that external drive is connected via USB, remember? and for some reason, even over USB3, I was only getting ~20mb/s transfer rate, so the process took 20some hours! In the interim, I worked on some projects, watched netflix, etc., then locked my computer, and went to bed. (I also made sure to turn my monitors and keyboard light off so it wouldn't be enticing to my 2yo.) Cue dramatic music ~
Come morning, I go to check on the progress... and find that the computer is off! What the hell! I turn it on and check the logs... and found that it lost power around 9:16am. aslkjdfhaslkjashdasfjhasd. My 2yo had apparently been playing with the power strip and its enticing glowing red on/off switch. So. It didn't finish copying.
aslkjdfhaslkjashdasfjhasd x2
Anyway, finding the missing files was easy, but what about any that didn't finish? Filesizes don't match, so writing a script to check doesn't work. and using a visual utility like windirstat won't work either because of the excluded folders. Friggin' hell.
Also -- and rather the point of this rant:
It turns out that some of the files (70 in total, as I eventually found out) have paths exceeding Windows' MAX_PATH length (260 chars). So I couldn't copy those.
After some research, I learned that there's a Microsoft hotfix that patches this specific issue! for my specific version! woo! It's like. totally perfect. So, I installed that, restarted as per its wishes... tried again (via both drag and `copy`)... and Lo! It did not work.
After installing the hotfix. to fix this specific issue. on my specific os. the issue remained. gg Microsoft?
Further research.
I then learned (well, learned more about) the unicode path prefix `\\?\`, which bypasses Windows kernel's path parsing, and passes the path directly to ntfslib, thereby indirectly allowing ~32k path lengths. I tried this with the native `copy` command; no luck. I tried this with `robocopy` and cygwin's `cp`; they likewise failed. I tried it with cygwin's `rsync`, but it sees `\\?\` as denoting a remote path, and therefore fails.
However, `dir \\?\C:\` works just fine?
So, apparently, Microsoft's own workaround for long pathnames doesn't work with its own utilities. unless the paths are shorter than MAX_PATH? gg Microsoft.
At this point, I was sorely tempted to write my own copy utility that calls the internal Windows APIs that support unicode paths. but as I lack a C compiler, and haven't coded in C in like 15 years, I figured I'd try a few last desperate ideas first.
For the hell of it, I tried making an archive of the offending files with winRAR. Unsurprisingly, it failed to access the files.
... and for completeness's sake -- mostly to say I tried it -- I did the same with 7zip. I took one of the offending files and made a 7z archive of it in the destination folder -- and, much to my surprise, it worked perfectly! I could even extract the file! Hell, I could even work with paths >340 characters!
So... I'm going through all of the 70 missing files and copying them. with 7zip. because it's the only bloody thing that works. ffs
Third-party utilities work better than Microsoft's official fixes. gg.
...
On a related note, I totally feel like that person from http://xkcd.com/763 right now ;;21 -
So my actual job is being a nurse at the local hospital, with coding being just a hobby. However, the way some IT–Related things are treated here are just mind-blowing. Here are some examples:
Issue: Printer is not recognized by network anymore due to not being properly plugged in
Solution: Someone has to tell the house technician, if the house technician is currently not available, ask his assistant who only works part time and like twice a week. House technician took the printer (God knows why), came back 2 days later and plugged it back in.
Issue: Printer 1 of 2 on ICU has run out of ink and since all computers default to printer 1, nobody can print.
Solution: Call the house technician, blah blah, house technician comes, takes ink cartridge of printer 2 and puts it into printer 1.
Issue: Public WiFi is broken, can be connected to but internet access is missing. Probably config issue as a result of a recent blackout.
Solution: Buy a new router, spend 5 days configuring it and complain about how hard networking is.
Issue: Computer is broken, needs to be exchanged with a new one, but how do we transfer the data?
Solution: Instead of just keeping the old hard drive, make a 182GB backup, upload it to the main file server and then download it again on the new computer.
Issue: Nurse returns from vacation, forgot the password to her network account.
Solution: Call the technician who then proceeds to open a new account, copies all the files from the old one and tells her to pick an easier password this time. She chooses "121213".12 -
Came back from vacation today to find out that some FUCKTURD PIECE OF SHIT deleted my virtual server!! Tried to find any traces on who that SHITFACED NUTSACK was without luck. This server is hosting several websites, some having files and data stretching over more than 10 years! Spent the day praying to GOD that my equally old backup scripts had run and where the FLYING FUCK those files were saved. Luckily the script had worked and I found a recent backup so now I can start the restore process on another machine. But still. WTF!!??6
-
I forced my friends to use git(hub) as vcs because their project was in a usb-to-usb state, which was unacceptable for me. So I offered them my help and uploaded it (with a little bit of a forced consent) to github, to end this misery. Of course I helped them the basics of git. Now they automatically use git(hub) as vcs and to share their code.
I feel proud for this :)10 -
I honestly don't get too mad when people aks me to do things like install programs for them. This is not my dayjob, but when you think of it, they're right when they say "you are a programmer so you must know how to do that". We do know how to do that. When you have a question about plants and you know a farmer, you are going to ask the farmer, even though he is not a gardener. He will know. Just as we know how to use computers very well.2
-
Dev: why should I develop windows phone apps. Almost nobody uses this kind of shit.
Customer: Why should I use a fucking windows phone. The windows app store is as empty as a ghost town.31 -
DevRant makes me really proud how well developers can act together as a group. Makes me think what we could accomplish if we would take all the world's developers and programmers to one place and make our own country. Our currency will be devCoin. World domination follows shortly afterwards11
-
My conversation with my wife today, while I was at work:
Wife: The wifi isn't working.
Me: What's it doing?
W: Not working
Me: Try turning it off an on again.
.
.
.
Me: Is your phone on LTE? Or is it connected to wifi and the internet isn't working?
W: LTE. Aubrey (my wife's sister) said she turned it off and nothing happened.
Me: did she turn it back on?
W: Do you really want me to answer that?
Me: Just making sure. What lights are on on the router?
W: (Sends me a picture of the router with no lights on)
Me:...
W: Oh it isn't even plugged in
Me:...
W (after a couple minutes): Its working now!
YES I REALLY WANT YOU TO ANSWER IF YOU TURNED IT BACK ON!14 -
One night, after one very stressful week of production code fixes (I was working on a game with some friends and I created the network infrastructure for P2P and database communication from scratch), I was at my gf's house. After we fell asleep, I stood up and screamed right at her something like "I fucking already told you how X works and how to communicate with Y. Learn to write code properly and after double checking yours then you shall ask me for a non-existing 'bug' fix. Learn how to properly write event based code and use polling you moron!". After that I turned to the other side and fell asleep immediately.
When I saw her the next morning sleeping in the couch, I could not understand why... Only after she described to me the whole incident I started laughing.
After that I just took two weeks off the project and after that period I never actually worked the same way (so hard) in my free time with them.1 -
First software refactoring in the company I worked for. No test environnement because "who needs it?", no unit testing, no comments, had to make sql updates and shit, was scared all day long that something would fuck up.
"Fuck fuck fuck, forgot a part of the where !" Had to fix everything quickly so no one would notice, no coffee/smoke pauses. On top of that, got a ton of retarded requests from the PM and other technicians working with me like "hey boi, could you add an icon to every button we made? There's like a thousand, we need it for tonight, our client will come visit us and I want to show him a better interface blablabla"
And since I was an intern, I couldn't refuse, had to work like a prostitute in virgin-land, and for what?
"Oi, you did good, now do other stuff"1 -
Allright, I'm pissed.
Warning: more than 4k characters written by a non native english speaker ahead.
Legend:
Storytelling
> Short summary of the current situation
> "Something being said"
> (Something being thought)
* Actions *
-- Background --
In an attempt to reorganize my desktop I accidentally deleted a folder I called "development". In there I stored links to all my IDEs (Not sure how you call these in english), but also some workspaces like unity (Not much stuff there, processing (just some hobby stuff) AND Eclipse (FUCKING EVERYTHING RELATED TO SCHOOL WEB DEVELOPMENT). Now 3 days have passed and I realized this important folder was missing. Cleared that windows trash the instant I deleted the trash on my desktop.
> Shit, Regret
Install a file restore programm. Do every possible search. Nothing found.
> Big shit
Deadline was in like 3 days. Week was fucking rough so:
> "Screw this, the teacher nevet corrects the assignments and also fuck JSP"
Fast forward 2 months to last week. Teacher starts checking assignments.
> Fuck
* Sees pattern: Only students with missing or bad marks are checked. *
* Feels save *
Teacher approaching me while working on current projects.
* Doesn't feel save anymore *
> "Well, I'ld like to see your THAT programm"
> Well fuck
* Tells the truth *
> "Well that's unfortunate, but I must write a mark. Do you really have nothing to show?"
* Remember that I worked on the school pcs when I started *
> (Better than nothing. Gotta try it)
* Teacher checks programm, not pleased *
> (Fuck me, but at least it's over...)
> Nope
* Teacher calls me over *
> "With the mark I had to write today you can't reach that good mark even with a good examination, what are we gonna do about this?"
> "Well, there were other assignments that were never checked. Could we replace that mark with one of those?"
* Teacher agrees *
> (Srly bless this guy for that support)
My best choice was an Android app we had to develop during December in pairs. I did the front end (90% of the whole work) and my partner the backend (10 %). I also did 30 % of these 10 %, because I had to review the shit he wasn't able to debug himself.
> brainlogic.exe provided by windows vista
This distribution was partly my fault since I overestimated the work needed for the backend, but also the fault of that fucker. I mean, he didn't tell me the professor already provided 90 % of the backend...
Rest of the week was really busy (always 1 or 2 things to study for each day, workout and family stuff).
Yesterday (It's past 12 already) I arrived at ~9 pm in the dorm I could finally start reviewing my code.
Internet gets shut down at 10 pm.
Gotta hurry.
* Opens project *
* Sees half a year old code *
* Fights urge to puke *
> (Alright I gotta do this. For the mark!)
* waits for gradle to index files *
* Remembers the fact that I haven't opened Android Studio in the last 2 months *
For those who don't develop with android studio: This is an equivalent to ~10k windows updates waiting to be installed
> (Well, gotta work with this kinda old version)
"gradle sync failed"
> ( Ok, just restart it. You're fine )
* Android Studio doesn't react anymore and/or renders *
* Waits 5 min *
* Restarts laptop *
* Android Studio is reacting again*
"gradle is synching"
9:45 pm: gradle is done and I can finally compile my app
> FML
* Sees App launched on phone *
* Almost pukes again *
> (This was the assigment for the UX chapter, so design doesn't matter)
UX is decent. Proceeds with testing stuff. Save paths work, but some bugs can be caused by going of it
* fixes as much as possible *
* Takes quick look at backend *
Date date = new Date (GregorianCalender.getInstance().getTimeInMillis());
C'mon, I asked you to be the backend. You got 90% of the methods already written by the teacher and had 2 months to write the interfaces to my Front end AND you come up with shits like that.
Note: this example is a minor example of brainlogic.exe
I did what I could to make improve my situation. Hopefully he doesn't discover the bugs. And If it's a backend bug then I could't care less, since that was not my job!
Wish me luck for today!undefined web development jsp school assignment not my job fuck up android studio tldr; not getting paid enough for this shit gradle blame backend9 -
Sports commenter at AI vs AI deathmatches.
It would probably go like this:
- UltimateGod the Second launches half of the US nuclear missiles to NorthernEurope!
I guess that's it for the poor bugger.
- WankerBot69 tries to delay its doom by channeling old 4chan archives into a devastating ddos attack. UGtS' logic processe go down for a few nanoseconds... Ugh, that's NASTY! It doesn't even have a mother
- Missiles still going up. Looks like UGtS confused the imperial and metric system just like its predecessor.
- WB69 is now has the upper hand. It just used a SMB exploit and is bow encrypting UGtS's storage.
- UGtS is down. We all hope UltimateGod the third will do better. For now, all hail our catevolent overlord WankerBot69.
- See you next time on Bot Armaggedon folks! -
Who else uses Firefox over everything else? I switched from chrome recently and I don't regret it!26
-
"If Java had true garbage collection, most programs would delete themselves upon execution." - Robert Sewell31