|
Quote: Not quite. If those tools converted between C, C++, C#, Java, and Python, this site would be spared a lot of "Questions" that are nothing but code dumps asking for precisely that!
Get after it then.
|
|
|
|
|
Greg Utas wrote: this site would be spared a lot of "Questions" that are nothing but code dumps asking for precisely that!
I admire your optimism!
Given the number of questions posted which could be answered by typing the question into Google and reading the first result, I doubt such a site would have any impact on the people who post the "convert this code for me" questions here.
Even if Chris managed to integrate the converter into the QA form, auto-detect questions about converting code, and automatically offer them the converted code, I suspect the questions would still get posted. After all, you can't expect them to have the time to actually read things on screen - they're far too busy trying to cheat on homework for a course they're not fit to pass.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Nice, thanks for the link.
The less you need, the more you have.
Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?
JaxCoder.com
|
|
|
|
|
I totally put it in the wrong place tho. Again. *hangs head in shame*
Still, I'm glad you found it helpful. I use it all the time.
Real programmers use butterflies
|
|
|
|
|
I have been working as a developer for a little over 40 years. In all that time, I have kept my comments clean. I am an avid user of curse words in my normal conversations, both verbal and online. It just always seemed unprofessional to use vulgar language in my code. Until today.
I am now saddled with responsible for a piece of product code that is over 30 years old and still in active use. It's in C and started out on custom-built embedded hardware. Now it runs under Windows on an industrial PC. The original creator of this pus-oozing bedsore author of this stuff deliberately wrote it in a fashion that no one else could maintain it. He even cultivated a mythology about it, that it was dangerous for other people to even look at it, because it was so "performance-intensive". A few years ago he decided to retire rather than accept reassignment to another product. A succession of other people have taken it over, but no significant maintenance has been performed.
We now have a hardware obsolescence issue that requires a code change. I've spent well over 100 hours over the last month going through the code, finding all references to the bits that need replaced. Based on my study, only 4 out of the over 20 functions in the module really do anything with the hardware that's going obsolete. The rest are basically stubs and no-ops, but their return values are used to direct logic elsewhere. I have had to trace every single reference to the functions and the global values involved to ensure that it was safe to change things. I had to leave all these other bits in place because removing them would have wreaked havoc in other logic I don't want to touch.
After all this, it took me less than a day to write the new code.
Software Zen: delete this;
|
|
|
|
|
And
There's probably a good business case for a site where developers saddled with this kind of thing can trade their jobs of breaking the perpetrators' legs.
|
|
|
|
|
'twould be nice, except this guy passed away a couple of years ago .
Software Zen: delete this;
|
|
|
|
|
I guess the Simulation will get broken any day now...
|
|
|
|
|
Gary Wheeler wrote: passed away a couple of years ago
Did he fall, or was he pushed?
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
Let me put it this way. The only thing he and I had in common is that we are/were both avid cyclists. I used to see him out on our local bike paths a couple times a month. It was so, so tempting...
Software Zen: delete this;
|
|
|
|
|
If you know where he's buried you could still arrange for his legs to be broken...
|
|
|
|
|
If I came across it, I hope my bladder's full...
Software Zen: delete this;
|
|
|
|
|
Congratulations! I don't envy you your task, and that's quite a rabbit to pull out of your hat.
Horror stories like these are how I convince my managers that code reviews are worth their weight in meetings.
Real programmers use butterflies
|
|
|
|
|
I've been working here for 30 years, and in all that time there has only been one code review ever held. At the end of that one, the developer on the 'hot seat' told his boss if he ever held another one, he'd quit. I wasn't present, but I'm pretty sure it wasn't handled very well. I don't think anyone went into it with the idea of "stabbing it with their steely knives" trying to kill the beast, but I doubt the ground rules were very detailed. Also, the guy chosen as the guinea pig was probably the worst choice to go first. Sharp guy and easy to work with, but not one to handle criticism well.
That said, if there had ever been any kind of detailed code review of the POS I'm modifying, the author would have been terminated with extreme prejudice shortly thereafter.
Software Zen: delete this;
|
|
|
|
|
That sounds like a disaster. Code reviews can be helpful but you do have to go in with the idea of constructive criticism, and in any case, it's easier after the first couple of times.
Real programmers use butterflies
|
|
|
|
|
Look at it from a different angle: that guy was actually very smart.
When ever you touch a little useless line, you are likely to break the codez. Thus he provides proof that the code really requires deep long thoughts and enormous diligence. Which can be provided by really smart asses people like him only.
Oh sanctissimi Wilhelmus, Theodorus, et Fredericus!
|
|
|
|
|
Gary Wheeler wrote: He even cultivated a mythology about it, that it was dangerous for other people to even look at it,
Observing the code changes the code. Physics!
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
|
|
|
|
|
He told his management he didn't want anyone else to see it since they wouldn't understand it and would screw it up if allowed.
Software Zen: delete this;
|
|
|
|
|
I embed some curse words in my comments but I'm the only one that will ever read itr.
The less you need, the more you have.
Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?
JaxCoder.com
|
|
|
|
|
Would it be easier to deduce the function it performed and re-write from scratch. Or is that not possible given the circumstances?
"Momma looks down and she spit on the ground evry time my (his) name gets mentioned" - Paul Simon
|
|
|
|
|
We have sufficient information to recreate the product, but neither the manpower nor the time to do so.
Software Zen: delete this;
|
|
|
|
|
..with all your due respect!!..
😇😇😇😇
|
|
|
|
|
Been there done this rewrite. Only in my case it was my boss's code that I rewrote. He had four entry points and I whittled them down to two - add() and delete(). Had to track down all the instances where he used the four entry points and rework those as well. Final code not only was about two thirds the size it executed about a third faster (very disk intensive).
|
|
|
|
|
Part 1
You probably know about jsfiddle and how you run and test your JavaScript in your browser.
But there is also a SQLFiddle which allows you to run and test your sql in your browser[^].
It's quite convenient.
Supports MySQl, Postgres, Sqlite, Oracle and Sql Server.
Also, if you work on a query, you can save the URL and get back to it.
Part 2
I recently discovered that you can do a select from two tables allowing you to select just the columns you want (versus a join). I don't know why that amazed me, but I'd never tried it before and it really helped in a current situation.
here's a very simplified sqlfiddle example:
SQL Fiddle[^]
edit
fixed initial link to sqlfiddle
modified 18-May-21 13:25pm.
|
|
|
|
|
Nice, but did you really intend to have a non-unique key in Address ?
/ravi
|
|
|
|