Code finally works

>code finally works

Other urls found in this thread:

neilmitchell.blogspot.com/2015/09/three-space-leaks.html
twitter.com/SFWRedditGifs

>one of your other developers makes changes that directly undo the code you spent a day working on

>code compiles the first time, every time

>you design a solution
>nobody listens to you
>they fail and you have to bail them out

>git push --force-with-lease

>submit a ticket to QA
>QA guy tests it and sends the ticket back for a completely unrelated issue, but since it happens to be on the same screen he figures you should fix it anyways
We use TFS, kill me now

>run it again
>didnt change anything
>now it doesnt

>explain something multiple times
>everyone ignores you
>they just keep repeating the same buzzwords over and over

>but since it happens to be on the same screen he figures you should fix it anyways
Marked as closed and I open a new ticket with just the relevant part.

>write code
>test code
>write code
>test code
>write code
>test code
>repeat until project is done
>???
>no bugs

Sure, but then it won't get pushed to production, otherwise I would

>Write code.
>Doesn't work, but compiles.
>Continue to write code.
>Doesn't compile, even after triple checking.
>Get mad.
>Have cig
>Complain to dog about code.
>Doggo barks at cat across the street when talking about a while loop.
>Figure dog barked at me.
>Go to fix, it werks.

Doggo's are truly the best.

sounds kafkaesque, user

>clients trying to pick technologies so they can feel smart and as knowledgeable as programmers

Git in TFS is still git. If you're still using TFVC god help you.

>suggest to my boss to use a software library that's FOSS, and you can buy a license if you don't want to distribute the source code under the LGPL
>He's ignored all my attempts to get the license set up, while not offering the source code to the clients even though the library is in use throughout the application
We are using TFSVC indeed. I tried to get us to switch to git when we were setting up development and release branches, but management didn't want to use it

You should probably mention that Microsoft is basically dropping all support for TFVC in the near future to them. Seriously, within MS they're almost exclusively using git and any new features are git-only (this has already started). We have a handful of legacy things in TFVC because that code's IDE doesn't support git natively but we're migrating everything we can as fast as possible.

As for GPL, any corporation is going to avoid that license (and its variants) like the plague because of how much of a poison pill it is. It's on the automatic deny list for our compliance department.

Also Microsoft needs to fucking chill with the TFS updates. Just noticed TFS 2018 is at RC2 already

>TFSVC ending
Thank god.
>Gpl stuff
Sure, but you can use this library commercially and pay a fee to have the license changed to something that isn't open source. I mentioned as much before I started using it, and management said they'd look into it. It's been two years, with no update. I'm conflicted because I like the library, I like my team, but I also believe in following the licensing for open source projects

>>

Literally the best way to code, if your computer can compile fast.

>dialed into the issue, work on it for hours, never fix it
>go to sleep defeated
>wake up and find the bug in 30 seconds
>It's in a different place than you were working last night

>you're a wageslave code monkey

How many times per day do you guys think about suicide?

what are you?

fuckin ricer neet

I don't at all, I have many hobbies outside of work that are more than enough to keep me from thinking about suicide.

>write functional code
>works everytime you run it
>it's never run

You think hobbyist programmers don't ever compile code or something?

This.
>write 600 lines of code with no previous tests whatsoever
>wtf why do I have so many bugs?

Many posts here are complaining about shitty QA, shitty clients, and their shitty teams using shitty version control. So I assume most people here are wageslaves who hate their jobs.

Like what?

Your assumptions aren't reality. I enjoy many aspects of my job, a bad QA person isn't enough to make me, or most people I'd assume, consider suicide.

>code works
>it shouldn't

you mean
>code "works"

>write 500 LOC
>everything in tiny functions
>all passes unit tests

Every fucking time

How do you write unit tests?

>write functional code
>works everytime you run it
>uses 20GB RAM for a hello world because of space leaks
Haskell is a meme.

Board games, role playing games like Pathfinder/dnd, hiking, biking, video games, reading, cooking, movie nights with friends, going to the gym, personal software development, etc etc
Now please don't move goal posts in your next replies

>Write 1k lines and tests
>Run tests, they all pass
>Execute program, it works first try
Does this seriously not happen on a regular basis for everyone else? I'd fucking kill myself if I was still doing the idiotic [write a line, execute, debug] shit I was doing when I started.

>writing complex program for a class project
>forced to use a single source file

The fuck man

>[write a line, execute, debug]
Are you serious?

>not using multiple files and then just copy+pasting it all into one at the end
your compiler is doing this anyways

No I'm asking because I want hobbies, what else do you do?

I'm bored.

/thread

>rewrite linux kernel in haskell
>its 20% faster

Hey pal, we were all fucking idiots the first time we got our hands on a compiler.

Find something that you like to do. I'm not you and we likely don't have multiple things in common if none of those grabbed your interest. Find something to do with friends, painting, games, whatever. Sometimes you need to be self motivated

>Write 1k lines
>Execute program, it works first try
Does this seriously not happen on a regular basis for everyone else? I'd fucking kill myself if I was still writing unit tests for all of my functions. Why waste time writing tests when you can just write 100% correct code the first time?

I wasn't.
And I'm 100% serious about this.

I thought haskell wasn't a meme for like 2 weeks and started learning about it.

neilmitchell.blogspot.com/2015/09/three-space-leaks.html
>Every large Haskell program almost inevitably contains space leaks.
>The first two space leaks have obvious causes, but I remain mystified by the third.
t. experienced haskell programmer

EVERYTHING Sup Forums suggests is a meme.

I've never written a single error in my entire life. Only babby plebs make errors

>writing code at all
>when you can just run the algorithms in your head and get the right answer 100% of the time
Wow, I didn't realize I was on an imageboard filled with morons.

I'm just asking for things to try out, I'm not saying I'll like everything you do

Okay, well try that list then

>try to implement a LinkedList in my head
>get an overflow error
Why am I so stupid?

Tests aren't for now, they're for later. They're for the fuckups who will be maintaining your code, including you in a year.
And they're extremely useful for exercising poorly documented code and libraries.

I don't believe you. I've watched hundreds of people learn to code and even the total autists have trouble at first. Programming syntax, data structures, and flow control are simply not very intuitive to the novice. When you're first starting out you're bound to make bad assumptions and have to step with a debugger to find where your reasoning is different than the compiler's. It's called discovery and learning and isn't a bad thing.

If you feel that bad you should make a game or something

constantly

If your code works and it shouldn't, that means you don't understand what you've written and need to practice/explore/play with it more.

Hit the edge cases with a sanity check for valid and invalid values.

>wage slave
>living comfortably in a nice house with a nice car and no debt

Pick one.

every day, but for unrelated reasons

where do you think we are?

>>go to sleep defeated
>>wake up and find the bug in 30 seconds
>>It's in a different place than you were working last night

I know this feel

Can't you anonymously report it to that project?

Our team is, regularly, only 5 or 6 people. Of them 3 of us write code, one of them being my boss and the other not using the library in question. It would be pretty obvious who reported the infraction

I complain about shit to my dog too

>write 1000s of lines of code
>get a bunch of errors
>it's all mistypes and spelling mistakes
I don't know why my typing is so prone to pressing wrong or multiple keys, I've been doing it my whole life. Maybe it's because my vision is shit?

>Work at Silicon Valley startup #47852418654321
>It doesn't work
>Working just as planned.
:^)

lol

They're perfect for it, and he just listens so paitently.

Here is my Code Helper Doggo

>when you can start deleting debug messages
good feel

I do the same, mostly with shit like constexpr where I'll auto-complete the word or add stupid shit like constexpress. Or whats worse is ' when you need to close it with " instead.

n-never

How many lines? 10k or lower is okay.

>sprint backlog worth of 1 week finished in 4 hours
Welp i have 4 days worth chans and youtube

>dev makes breaking changes
>you are assigned to fix it
??????

brains and sleeping work in magical ways

>come back to project after a break
>try to remember what you were doing
>it comes back to you after a bit
>make changes you had planned out
>run code
>nothing changes
>frantically comment out and litter prints all through the codepath you expect
>nothing
>after a decent 30 minutes realize you were working on a copy in a different directory while trying to run the original

>Be the only guy on the team that has touched C++ before
>Is assigned to write report instead of coding
>Other people do code
>It's unreadable and there completely random whitespace everywhere
>They don't follow our coding conventions
>I end up re-writing the entire code base

To be fair, my report sections are complete shit.

Just revert all their commits and tell them to do it over.

That's what I do

>be new guy at the startup
>boss assigns me some custom reporting tasks with a software I've never used, I've no knowledge of and was never told I would require for the job
>ask boss for some help
>get redirected to a coworker that's never there and only works sparsely with us for some reason I don't know
>he sends me some code samples
>javascript spaghetti monster of 1200 lines to print 4 lines of text and a table on a word document
>have to decipher this code, learn the program and the quirks of this custom implementation of javascript
>after a week of no progress tell boss I can't do it
>"Don't worry user, we'll figure something out, I'll go to talk to this coworker and then we'll talk about what to do next"
That was last week, I've been sitting here arms crossed for a week. I feel guilty for not doing anything and getting paid.
Is this normal in software development? I'm just browsing Sup Forums and reading the news every day while waiting for a call/meeting with my boss.

>that moment when you compile and run your first entirely self-made complex program

Get a better keyboard. No kidding, a tactile mechanical keyboard will help you with that.
It will also make typing less tiring and more enjoyable overall.

Having something work is never good enough.
You are supposed to make it work, so doing your job is not impressive.
What determines if you are worth the time you spend on something is determined by how well you tested it, how easy it is for you to modify it, integrate it with other things and so on.
The engineering part is not getting some code to compile. This is expected.

>javascript spaghetti monster of 1200 lines to print 4 lines of text and a table on a word document
This is what happens when people don't fucking define their coding conventions and not following SOLID... What's the other guys (and yours) education level? Bachelor or Master?

Maybe he's just still learning?

I have a bachelors, I don't know the qualifications of the other guy.

When I asked him about his spaghetti mess he told me that the best way to figure out how the functions worked correctly was to debug the code line by line.
I was so baffled I didn't even try to argue with him, I just went along.

Apparently he's been reusing the same document (the one he sent me) to do all the custom reports, and he just modifies/comments all the parts he needs, so even though there's thousands of lines of code, only a dozen actually do anything, and since there's basically no comments at all it's impossible to decipher what's going on, at least to me being a novice to both the program, the language and the task I need to do.

kek

>We have a handful of legacy things in TFVC because that code's IDE doesn't support git natively
What the hell does that mean?
Git is not locked to the IDE.
The git support means you can add files to the project and to the git in the same action and commit within the IDE but those are just nice to have features.
Worst case, you have to start from the current state or something, but you don't even need that in a lot of cases

Sounds like he just need to document that shit.. Did he not know when he started on the code that it had to be humanly readible?

>Started learning to program about 2 months ago at uni exam coming up in about a month

>None of it is really sticking understand the basics but got along way to go really, got a mate to help with alot of the tasks.

>reeeeeeeeeeeeeee

hope u take him for lots of walkos when ur code doesn't work

Do some really simple programs in your spare time. Practice is really the key here.

I'd recommend doing something simple in different languages, like tic tac toe in C#, C, and Java. This will show you the many differences in languages and how they are structured.
Also, remember to use stackoverflow (don't ever post yourself. Almost every question has already been asked there. No need to fill it up with more stupid questions)
Also use DuckDuckGo instead of google. ddg is much better at finding actual helpful shit. Google just finds stupid articles and facebook pages.

Thanks for the tips man I'm doing java and assuming i pass its c next year. Ill try ddg

>Kode With Klossy

>have to deal with ancient, probably shameful code of yours
>the code is actually well written as fuck, easy to maintain and actually do half of the things you were planning to do with it already

>load code into linux VM and run it
>windows BSODs
>restart computer
>try it again
>it works fine
>it never crashes again

>Having to load an entire VM just to execute your code
If you're so fucking set on using windows and a bash environment, just install something like CygWin or MSYS2 ffs

About once a week.

i can get a clean environment by simply spinning up a VM, i can't do that with cygwin

>clean environment
what do you even mean with this? cygwin and msys2 are both "clean" in the sense that you don't have stupid libraries installed that you don't need unless you install them yourself...