|
mmm.....
henceforth
A union B = not (not-A intersection not-B)
Interesting idea I didn't think of...
not-A is not quite trivial.. but I can approximate it by constraining the universe to a common containing box...
mm.. have to think of it
Holes becomes solid island that I still have to unionize...
I think there is some trivial bug in my find contour algorithm.... Trying to get back into it...
Maybe I am just getting old?
That was some fun, easy, and rewarding this morning to refactor my IoC/Activator utility !
Ho well...
|
|
|
|
|
Damn those scrollbars that ruin your focus!
I wish there were some way to make them disappear!
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
I could never drive a car with such an awful registration number.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I was never a Ford fan, my father (who was a car mechanic) always said "It's not refined technology", and it also seems that Henry Ford had anti-semitic symphaties. But all that was a long time ago of course and on my last holiday in Italy I even rented a Ford Focus and must say that it was a fine driving experience.
|
|
|
|
|
Henry Ford is dead.
Anyway, I find "refined technology" to be an interesting description. The meaning seems a bit fluid at times.
Sometimes it means simplified (as in perfected for a task), and sometimes it means advanced (as in the opposite of simple)
Refined is the opposite of crude. But Crude and simple isn't the same thing.
If "not refined" is the same as crude, I will have to disagree.
Ford has always been masters of simplification though.
|
|
|
|
|
After some bout of refactoring where I spent some time updating one of my old and trusty utility class to be yet even (significantly) more simple, elegant and functional... I started to idly wonder...
Did it happen to you that a coworker refactored some (large amount?) of your code, with the announced purpose to "make it more simple" (no new functionality, just improvement). Yet when you look at the result (honestly and deeply, not just a quick reaction and disgusted look) you find it way more convoluted, messy, broken, confusing, etc?
Just wondering!
|
|
|
|
|
The hell with cow orkers. I do it to my own code all the time.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Quote: Yes, there were times, I'm sure you knew
When I bit off more than I could chew
But through it all, when there was doubt
I ate it up and spit it out
I faced it all and I stood tall
And did it my way
|
|
|
|
|
|
Super Lloyd wrote: where I spent some time updating one of my old and trusty utility class
...Did it happen to you that a coworker refactored some (large amount?) of your code ... Yet when you look at the result you find it way more convoluted, messy, broken, confusing, etc?
ummm, as you are cleaning up your own code and writing about when coworkers do this to your code...
split personality? self trust issues? worried a coworker has hijacked your body?
but seriously:
your code is your expression of an algorithm - a sequence of steps to get from A to B.
but anything more than a few steps means there will be multiple possible paths,
you code: your mind begins by visualizing & testing a path, then expresses that into code.
a different person
(1) visualizes a different path,
(2) expresses [that different path] into code by different mechanisms, and,
(3) even with defined house or whatever rules in place style can still vary too.
later you look back at that code:
your mind recalls the path and mechanisms you used and looks for that,
...and then it all unravels (in the opposite order)
1. style differences: slows down your code/pattern recognition (- though soon [mostly] overcome - it'll still irk a bit)
2. huh? this mechanism doesn't fit the path (you're looking for "your" path)
3. whaaa??, why is this here? (figured the mechanisms, but the path you see doesn't match yours)
I'm sure this morning I arrived in and parked a black car in that [now empty] spot over there oh yeah, some guy told me it was looking a bit dirty and offered to clean it up for me
why am I now standing here holding the keys to this pink half-track truck?
your car code is gone, now you have this completely different one.
It'll still get you home.
Message Signature
(Click to edit ->)
|
|
|
|
|
So.. why the question mark icon btw?
|
|
|
|
|
why the "?": from the first couple of lines, I only wrote the "serious" bit after and didn't go back to change the response type.
Message Signature
(Click to edit ->)
|
|
|
|
|
Lopatir wrote: a different person
(1) visualizes a different wrong path,
(2) expresses [that different wrong path] into code by different wrong mechanisms, and,
(3) even with defined house or whatever wrong rules in place style can still vary too. Don't mess with traditions: Dilbert Comic Strip on 2013-02-24 | Dilbert by Scott Adams[^]
|
|
|
|
|
Super Lloyd wrote: Did it happen to you that a coworker refactored some (large amount?) of your code Just once, and had quite some fun watching him roll back the changes.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
|
It is not "agile" to document every decision you make when coding, meaning that the original dev probably had some reasons for building things the way they are. If there's an improvement to be made, I wanna know - it might teach me something and prevent me from making the same mistake in the future.
..but changing code that isn't broken needs a damned good reason - since any change has the potential to introduce new (and subtle) bugs.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
If the code works, and you're not tasked to work on it, don't "optimize" it. In fact, don't even reformat it. See if you can get that guy fired.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
#realJSOP wrote: See if you can get that guy fired. That is insane! If you get him fired, they'll give you MORE of his code!
|
|
|
|
|
If it works, I won't touch it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Code can be as complicated and convoluted as you like, as long as it's adequately documented.
The problem is that the worst offenders seem to not believe in documenting code.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Super Lloyd wrote: Did it happen to you that a coworker refactored some (large amount?) of your code
Thankfully, I'm the only coder here for most of the last 20 years so I don't have that to worry about.
My task of the week has been putting lipstick on a pig...new interface/graphics/theme/icons for 94 forms in a legacy project. My designer made it difficult and chose a diagonal gradient and not all controls have transparency. When I get this one done, I have around 70 'add-on modules/utilities' that need rebranding. What I really need is an intern!
"Go forth into the source" - Neal Morse
|
|
|
|
|
Not exactly, but I've once talked to a co-worker about his mess of code both convoluted and hard to debug. According to him, it's simpler this way. Turned out he learned to code in the 60s and pretty much stuck with what he learned for half a century now.
|
|
|
|
|
* Yes, There are multiple points of view a developer can look at a task (or a job)
* If you gives the **beeeep*** about loosing your position (job) your point of view
is the correct to take (personal risk).
* If this job is probably the only developer job you will get for the next 6 months, you have to use your Emotional Intelligence forging a way threw the difficult organizational culture (politics) and accept the risk you will get the blame for accepting/following the work some other person forced you using.
sometimes a task you get assignd to you just in order to protect someone else with better score
in the organization political structure and you have no chance surviving it....
|
|
|
|
|
Not so much code, but documentation I wrote. They did a lot of pointless wordsmithing - changed fonts, removed page headers, linked sentences into compound sentences using semicolons, introduced spelling errors, and removed paragraphs in places. A section they added didn't adhere to the formatting in the rest of the document at all.
Fortunately this document lives in source control. When I needed to update the document recently, I could go back to my original. I added their new section, reformatting it so that it looked like the rest. I did adopt a couple of their wording changes.
Software Zen: delete this;
|
|
|
|