|
Jerry SanDisky posted:ClearCase is an IBM product, meaning that its great when your company can afford a really nice contract with IBM. I pity anyone that has to do in house support of IBM (especially Rational) products. I was this guy. Soul crushing doesn't even begin to describe this work.
|
# ? Dec 31, 2012 09:44 |
|
|
# ? May 23, 2024 20:43 |
|
BLT Clobbers posted:I was this guy. Soul crushing doesn't even begin to describe this work. I tried that. Once. I threw up my hands and fixed their CVS repository. The hardest part was training the H-1B designers the concept of 'HTML is text, everything else is binary'. Of course, then one of them discovered the ^M from their OS was kind of ugly so they set their editor to strip them at the end and proceeded to have a war of diffs for about a day before I broke down and locked everyone's editor rights. Other than needing to call me a handful of time when forking branches and tagging, they ran perfectly fine with that for a few years.
|
# ? Jan 1, 2013 02:49 |
|
On different forums I post on I convinced another dude to learn Python, and as an exercise to help him learn he wrote a function for determining if a given number is prime. That's all well and good, but the solution he came up with is something else: Python code:
It's even worse because the guy is apparently employed as a programmer somewhere (according to him, that is).
|
# ? Jan 2, 2013 05:32 |
|
Optimus Prime Ribs posted:On different forums I post on I convinced another dude to learn Python, and as an exercise to help him learn he wrote a function for determining if a given number is prime. Why not just link him to code academy?
|
# ? Jan 2, 2013 06:02 |
|
I gave him links to Learn Python the Hard Way and Think Python, so vv
|
# ? Jan 2, 2013 06:15 |
|
Part of configuration file parsing in the impressively terrible NoSQLite4j (which the creator posted to reddit, stackoverflow, and linkedin):Java code:
But really I'm pretty sure everything in that project is awful. Like how its error handling is "catch everything and print a stack trace", which is similar to how it handles nulls, "print a complaint to syserr". In spite of this, the creator appears to have been a lead dev at one company for 2.5 years.
|
# ? Jan 2, 2013 06:36 |
|
Aleksei Vasiliev posted:In spite of this, the creator appears to have been a lead dev at one company for 2.5 years.
|
# ? Jan 2, 2013 07:00 |
|
The Gripper posted:Commit history makes me sad for anybody on his previous team https://github.com/debarshri/noSQLite4j/commits/master (the best part is that most of the non-gibberish commit messages are wrong)
|
# ? Jan 2, 2013 07:40 |
Plorkyeran posted:It could be much worse: Presumably the "fix" one actually didn't fix anything, but just introduced a new bug?
|
|
# ? Jan 2, 2013 08:58 |
|
Plorkyeran posted:It could be much worse: It will be fine
|
# ? Jan 2, 2013 09:07 |
|
Optimus Prime Ribs posted:On different forums I post on I convinced another dude to learn Python, and as an exercise to help him learn he wrote a function for determining if a given number is prime. If I'm reading this correctly, his definition of a prime number is... a number N for which all numbers N-1...0 are also prime? Plorkyeran posted:It could be much worse: I do this all the time on my own projects. It's a habit I really need to break, alongside trying to fix multiple things in one feature branch.
|
# ? Jan 2, 2013 21:32 |
|
WHOIS John Galt posted:If I'm reading this correctly, his definition of a prime number is... a number N for which all numbers N-1...0 are also prime? code:
|
# ? Jan 2, 2013 21:57 |
|
WHOIS John Galt posted:alongside trying to fix multiple things in one feature branch. I do this as well and it irritates the poo poo out of me. I'll just get "in the zone" whipping out features, fixes and commits like a mad man and then an hour later I'll realize I did all those on some feature branch I started to correct some minor issue.
|
# ? Jan 2, 2013 21:59 |
|
WHOIS John Galt posted:If I'm reading this correctly, his definition of a prime number is... a number N for which all numbers N-1...0 are also prime? Nah, the code is actually technically correct, I guess, just the variables are terribly-named and like 80% of the lines are unnecessary (and it doesn't break early).
|
# ? Jan 2, 2013 22:01 |
|
Thermopyle posted:I do this as well and it irritates the poo poo out of me. I'll just get "in the zone" whipping out features, fixes and commits like a mad man and then an hour later I'll realize I did all those on some feature branch I started to correct some minor issue.
|
# ? Jan 2, 2013 22:28 |
|
Plorkyeran posted:git makes it so easy to move commits between branches that I don't really bother creating features branches in advance anymore. Instead I just work off master, and if I need to switch to working on something else I create a branch then, and reset master to origin/master. I'm really embarrassed to say that I use git and didn't really know this. This is due to me first learning the minimum I needed to know about git during a time crunch and then lazily not ever reading about it more.
|
# ? Jan 2, 2013 22:49 |
|
seiken posted:(and it doesn't break early). That way it's more secure.
|
# ? Jan 2, 2013 22:50 |
|
Plorkyeran posted:git makes it so easy to move commits between branches that I don't really bother creating features branches in advance anymore. Instead I just work off master, and if I need to switch to working on something else I create a branch then, and reset master to origin/master. git checkout -b my-new-branch origin/master
|
# ? Jan 2, 2013 22:51 |
|
Suspicious Dish posted:That way it's more secure. This is an interesting thing I didn't know about before, at the same time as being a completely ludicrous defense of the actual code in question. Well done seiken fucked around with this message at 22:59 on Jan 2, 2013 |
# ? Jan 2, 2013 22:56 |
|
seiken posted:Nah, the code is actually technically correct, I guess, just the variables are terribly-named and like 80% of the lines are unnecessary (and it doesn't break early). And it's also not necessary to test numbers all the way up to N-1, it's enough to go to sqrt(N) because if there is no divisors by that point there can't be any afterwards. Not to mention many other possible optimisations.
|
# ? Jan 2, 2013 23:01 |
|
ivantod posted:And it's also not necessary to test numbers all the way up to N-1, it's enough to go to sqrt(N) Won't you need to use sqrt(N)+1 to prevent false positives with low values (like 8 or 10)?
|
# ? Jan 2, 2013 23:07 |
|
Plorkyeran posted:It could be much worse:
|
# ? Jan 2, 2013 23:13 |
|
ivantod posted:And it's also not necessary to test numbers all the way up to N-1, it's enough to go to sqrt(N) because if there is no divisors by that point there can't be any afterwards. Not to mention many other possible optimisations. seiken fucked around with this message at 23:17 on Jan 2, 2013 |
# ? Jan 2, 2013 23:14 |
|
seiken posted:Obviously there are many faster ways to do it but missed optimizations like that probably aren't nearly so much of a horror as the other fundamental ones present (like huge sections of pointless code). You may as well say it's a horror not to implement AKS in baby's first python function. Actually implementing AKS would be a horror. It's extraordinarily slow and complex. Everyone just uses Miller or Miller-Rabin instead.
|
# ? Jan 2, 2013 23:23 |
|
Optimus Prime Ribs posted:Won't you need to use sqrt(N)+1 to prevent false positives with low values (like 8 or 10)?
|
# ? Jan 2, 2013 23:51 |
|
Freakus posted:I think you're reading it incorrectly. Think of "notPrimeCount" as a count of the non-trivial divisors for the number "num". Here's a rewrite with variables renamed that might make it a bit clearer: Oh oh I see
|
# ? Jan 3, 2013 01:28 |
|
Thermopyle posted:I'm really embarrassed to say that I use git and didn't really know this. This is due to me first learning the minimum I needed to know about git during a time crunch and then lazily not ever reading about it more. Since it came up, I might be good to mention git add -p, which allows for staging hunks. So even if it's the same file, you could commit the different changes to different branches.
|
# ? Jan 3, 2013 01:48 |
|
Rainbow Pony Deluxe posted:Since it came up, I might be good to mention git add -p, which allows for staging hunks. So even if it's the same file, you could commit the different changes to different branches. git gui lets you do this a bit more conveniently, too; right click and "stage/unstage hunk" or "stage/unstage line".
|
# ? Jan 3, 2013 02:19 |
|
And if you use emacs (lol), use magit. Has a fancy thing for staging/unstaging hunks that's p. awesome.
|
# ? Jan 3, 2013 03:23 |
|
I'm usually good about my commit messages even on personal stuff, but among things like "added javascript to toggle user pane" and "added date constraints to posts list" is stuff like "God is fake" and it's become a real problem because at work I actually put ", and God is not real." into the description of a work item. I removed it immediately after but it's there in the revision history. Nobody noticed and it's been closed for 3 months so I think I'm in the clear.
|
# ? Jan 3, 2013 13:25 |
|
Suspicious Dish posted:And if you use emacs (lol), use magit. Has a fancy thing for staging/unstaging hunks that's p. awesome. As does SourceTree if you're on a Mac. I use it for anything remotely complicated, which saves me the trouble of ever learning to use git properly.
|
# ? Jan 3, 2013 14:03 |
|
Fortunately I'm too OCD about the quality of my commit messages, even when it's a project I'm working on myself. But on the project I'm currently on now, since it's hosted on Github, that keeps me pretty honest. The biggest problem I have is re-training myself to do very fine-grained commits. I keep the Github native app open in the background so that I can switch to it every once in a while to commit once I've done some work, but I usually find myself getting "in the zone" and making a lot more changes than I should for a single commit, and then it kills my productivity to have to go in and selectively check files to figure out what should go in what commit.
|
# ? Jan 3, 2013 14:05 |
|
Exactly. What usually ends up happening is at the end of the day/week I spend way too much time trying to dissect the commits with git add -i into two or three (and sometimes five or six) different branches. Complicating that is me desire to make sure each commit can reasonably have tests run against it or what not in case I need to go back and bisect. It's frustrating and I imagine it will take a lot more practice before I'm making good atomic commits.
|
# ? Jan 3, 2013 17:35 |
|
I've never understood the need people have to sperg out about commit. How often do you *really* have to go back over your history to find a particular commit? The number of times a bad commit message has negatively effected me: 0. I had a co-worker a while back who was one of those source control nazis. He'd freak out and yell at you if each commit message wasn't at least 2 sentences. I would always ask him "how does this effect you in any way" and never got an answer.
|
# ? Jan 3, 2013 18:59 |
|
how!! posted:I've never understood the need people have to sperg out about commit. How often do you *really* have to go back over your history to find a particular commit? I have to fix things in other people's code all the time. It's a huge pain in the rear end searching through diffs to find where a change was made because half the devs here leave the commit message completely blank. Anecdotal evidence aside, it's fairly easy to think of a scenario where a lovely/missing commit message hurts someone. Is typing two sentences really that hard? Why wouldn't you?
|
# ? Jan 3, 2013 19:01 |
|
It affects me. If I'm working on a project with other people, I expect them to make sensible commit messages, so I can tell at a glance what they've made. Doesn't have to be long, just a sentence like "fixed the foo bug in the bar feature" or whatever, so I know what's going on.
|
# ? Jan 3, 2013 19:04 |
|
Bunny Cuddlin posted:I have to fix things in other people's code all the time. It's a huge pain in the rear end searching through diffs to find where a change was made because half the devs here leave the commit message completely blank. why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it. When I first started out, I used to do the long, thorough commit message every time. Until I realized its just wasted effort.
|
# ? Jan 3, 2013 19:32 |
|
git blame -> git show <commit id> -> code:
|
# ? Jan 3, 2013 19:34 |
|
how!! posted:why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it. Look I don't give a poo poo that you can diagnose and fix a bug without looking through commit history. That's bullee, for you but maybe someone on your team isn't as good as you are. If writing 2 sentences when you check in some work will save that person a headache, just do it. What is the argument against it exactly? Edit: and in response to your first question, there are plenty of bug reports that say "Feature X worked in version y, but now in version z it does not." Well, wouldn't it be handy if we had some quick one or two sentence descriptions of all changes made to that code file between version y and z? Bunny Cuddlin fucked around with this message at 19:38 on Jan 3, 2013 |
# ? Jan 3, 2013 19:36 |
|
|
# ? May 23, 2024 20:43 |
|
how!! posted:why would you need to look through commit history to fix a bug? Just fix the bug. I've fixed many bugs, and can't tell you of a single time where I had to look through the history in order to fix it. That and your coworkers wont hate you!
|
# ? Jan 3, 2013 19:42 |