Lines of code I've written in the last 24 hours:
Displaying poll results.38580 total votes.
Most Votes
- What's the highest dollar price will Bitcoin reach in 2024? Posted on February 28th, 2024 | 6268 votes
Most Comments
- What's the highest dollar price will Bitcoin reach in 2024? Posted on February 28th, 2024 | 68 comments
Dammit Jim, I'm a hardware tech, not a softie! (Score:3)
I know all about RAM and making great use of a hard drive, not things that are Micro and Soft.
Re: (Score:2)
Re: (Score:2)
In fact, didn't someone (Xilnx?) have a compiler that took C code as input, and told you if it was better to implement it as logic gates, or as executable code for their embedded processor? So you wrote the exact same lines, and it told you whether you were a hardware engineer or a software engineer that day.
Re: (Score:2)
Not anymore (usually, did a project with .iso files and virtual CDROM drives not too long ago), I do still write the occasional shell script. I used to be the master of writing scripts for Netware 4, both menu's and logon scripts, but that's been a while.
Re: (Score:2)
And I'm stuck in a project where specifications are to be written and maintained, not code written.
I'm in MS hell (Score:2)
I manage databases and used to do a lot of coding; NOMAD on the mainframe and FoxPro on the PC (very similar languages) when the tables were small enough to fit. PCs got bigger and it's been over ten years since I wrote in NOMAD. Now they have me using MS Access, GOD but I hate Access! It isn't really programming, and takes forever to figure out how to do anything the least bit complex. With real languages I could make the machine do damned near anything in an hour or less with a few lines of code.
But this
Re: (Score:2)
Wow, considering how long DBAN can take if it was four hours one way that was a long day, even if it did consist of watching yellow bars form.
Re: (Score:2)
Your company's IT policies involve way too little powerdrills/hammers/thermite/whatever.
I havent done the thermite thing, but last weekend i threw out a few single/double digit GB disks, and hitting them repeatedly with a hammer was rather satisfying. I also drilled a few holes through the entire thing and wrecked all the controller ICs.
I figure anyone willing to pay for the thousands of dollars of data recovery it takes to recover anything from those things has earned his share of 15 year old windows insta
1000, exactly (Score:2)
One of these days, the Slashdot poll guy will learn what a half-open interval is, and the world will change!
Re: (Score:2)
More than likely, the universe will simply die of shock.
Not just 1000, but 100, too.
Re: (Score:2)
One of these days, the Slashdot poll guy will learn what a half-open interval is, and the world will change!
I think the appropriate answer then is: "More than your puny mind can comprehend!"
Re: (Score:2)
It is never exact.
I remember in College when I needed to print out my code to be graded, and more often then not it will print the last page with the following text.
} //End of int main(char argv, char** argc)
Re: (Score:2)
Yes I screwed up on my comment it should be (char argc, char** argv)
Re: (Score:2)
Shouldn't that be (int argc, char **argv)?
:-)
Re: (Score:2)
Yes I screwed up on my comment it should be (char argc, char** argv)
It should probably also be int argc
Ah, I see you use mplayer.
Hence the need for a data type allowing more than 255 command-line parameters. ;)
Re: (Score:2)
Re: (Score:2)
Yes. Note the wink. I was not trying to get into specifics of how the memory space would be allocated when the main() function is called, or how it would be addressed if it were treated as a char despite being allocated as an int, or the question of whether the char was signed or unsigned.
Re: (Score:2)
http://userguide.icu-project.org/posix [icu-project.org]
The ISO C standard provides two basic character types (char and wchar_t) and defines strings as arrays of units of these types. The standard allows nearly arbitrary character and string character sets and encodings, which was necessary when there was no single character set that worked everywhere.
While the size of the char type is in practice fixed to 8 bits in modern compilers, and its common encodings are reasonably well documented, the size of wchar_t vari
Re: (Score:2)
"char range depends on the implementation. "
which is another way of saying - Sure, if it's implemented correctly.
I can write my own compiler(everyone should!) that makes it -119...118, but that woudln't make it correct.
Re: (Score:2)
Nope. 0..255 and -128..127 are both equally correct. The standard was purposefully drawn up to allow both. If you rely on one implementation or the other, you are introducing a compiler dependency.
Re: (Score:2)
The C specification requires that char have a range of at least 0 to 127. Both -128 to 127 and 0 to 255 are valid implementations, as is using a 30-bit signed quantity. -119 to 118 would not, although -32 to 127 would. POSIX adds some stricter restrictions, which basically mean that char has to be 8 bits (although it may or may not be signed).
In the grandparent's case, there is a bigger problem related to calling conventions. If your arguments are passed on the stack, instead of in registers, then havin
Re: (Score:2)
I like that quote. I may have to use it (carefully) where I work.
Re: (Score:2)
Not too many (Score:3)
I removed a few lines yesterday because they are no longer needed, does that affect my total? Also, does generated code count? What about comments? I added a few of them yesterday.
Re: (Score:2)
Just kidding. I spent half the day commenting some of my own old code. I don't really count it as code lines as I tend to be a bit generous with the blank lines.
Actual lines of code - about 12. And these were old procedures that didn't validate their inputs. I like tidying up these kinds of things.
Re: (Score:2)
Proper documentation is critical, but it's not code.
No one should count it, or blank lines.
If I was to count my code that wrote code, I would have over a million lines yesterday.
Re: (Score:3)
It's a pretty simple question. How many lines of code did you write. Clearly, removing lines is not writing lines, generated code is not code you wrote, and comments are not executable. It did not ask your net change in the number of lines in the source files or anything like that.
Re: (Score:2)
Same. I've finished up the coding for my project; now it's just working on the configuration and data files.
Re: (Score:2)
There's this 'cloc.pl' tool that does a great job at measuring your code. It understands languages so it treats things like 'for' loops as a single line, regardless of how they're split. You should check it out! Also, I don't count added lines, but total code throughput. Otherwise I'd be fired for cleaning up 100k lines in the past 6 months...
Re: (Score:2)
What about comments? I added a few of them yesterday.
Of late I've come to the conclusion that comments count, but they should be subtracted from the total. Over time most comments go from marginally useful, to a waste of time, to misleading evils. Comments that are used to generate useful documentation (e.g. Javadoc -- but useful Javadoc) are an exception, but other than that whenever I find myself wanting to write an explanatory comments I take it as a sign that the code needs to be refactored. Code that needs comments is bad code.
OTOH, I also find myse
Re: (Score:2)
to misleading evils
No kidding. Nothing like reading comments, well written full sentence comments, that state the opposite of the code's actions, for wasting a day of troubleshooting. It happens; someone changes the code, design-on-the-fly, and never changes the comments.
24 hours (Score:2)
Perfect timing (Score:2)
Re: (Score:2)
And not so perfect timing for me. I just happened to not write any code yesterday. But was thinking about it.
Re: (Score:2)
Same thing here. By coincidence I have recently decided to update an old app of mine.
So my vote in this poll represents non-typical behavior.
Bad timing for many, actually (Score:2)
Summer school just over, and Fall semester won't start until for at least another 2 weeks.
Re: (Score:2)
And here's your obligatory xkcd [xkcd.com]
Re: (Score:2)
Re: (Score:2)
Does copy-paste count? (Score:2)
Does copying, pasting and then slightly modifying count?
Re: (Score:2)
Re: (Score:2)
I'n curious as to why you are copy and pasting? if it's that common, shouldn't you write a class that handles the light variation each implementation uses?
Re: (Score:3)
Find the pieces you need on the web, copy and paste.
Re: (Score:2)
Mostly it's setting up function calls and modifying which parameters are sent to them. Also, as jklovanc suggests, som ecode is often found on the interweb. ;-)
I don't get to do too much real coding these days. :-|
It's been years... (Score:2)
.... since I last sat down an coded. My education was that of computer science, and programming was the main focus originally, but as I learned I am a far better analyst than I am a coder. I learned that I should leave the coding up to people who are better at it than I. But I can analyze the shit of something and write requirements that allow a developer to understand the scope of the full task that is put before them.
Re: (Score:2)
Only one line (Score:2)
Re: (Score:2)
and let me further guess that the one line in question take up over a megabyte of hard disk space?
Unix Sysadmin (Score:2)
I made changes to about 40 lines of code. I do scripting of course as a unix admin but I also have three php based apps I've written. One had a bug in the picture display code (stupid one; I didn't fully qualify a search so was getting too much data back from mysql), and the other needed some changes due to it being August (I haven't taken the time to make the code correct after creating it).
Today I'll be making cron changes to implement a new wrapper script I wrote for work and likely working on the third
Wannabe sysadmin (Score:2)
I work in a network operations center. If I'm good, they let me write a shell script once in a while.
Most of the coding I do is for the exercises in textbooks I work through when there's nothing going on.
Voted wrong (Score:2)
Damn.. i voted 'none' but that actually isn't accurate.. i hacked some fix in a WoW addon making less-than-100 the correct answer..
We're in the testing phase (Score:2)
So not much code being written.
Less than I would like. (Score:2)
I deleted code, you insensitive clod! (Score:5, Interesting)
I love deleting code. It's sort of the same feeling as finishing a job cleaning your bathroom - the work itself stinks, but once you do it things stink a lot less. And it doesn't leave behind any maintenance burden either, so when you can get away with it, it's by far the best use of your time.
Besides, I even have the backing of one of the most famousest of hackers:
One of my most productive days was throwing away 1000 lines of code. -Ken Thompson
Re: (Score:2)
Speaking of quotes, I love this one too:
A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
— Antoine de Saint Exupéry
Re: (Score:2)
Here are my top 5 ways to make programmers on your team more productive.
1. Don't write code that you don't need
2. Delete code that you don't need
3. Avoid libraries that enforce a particular architectural design
4. Refactor code whose purpose and correctness isn't blatantly obvious at first glance
5. Write simple code
Re: (Score:3)
Because everyone writes perfect code the first time, requirements never, ever change, libraries aren't ever updated, and new language features never appear to make certain things easier or more compact, amirite?
Re: (Score:2)
Re: (Score:2)
I wasn't deleting my old code, I was cleaning up yours.
Re: (Score:2)
Writing lines of code or lines of text? (Score:2)
Sadly (Score:2)
I used to think that the most miserable part of programming was debugging my code, but now I really miss those days.
Benchmarking today (Score:2)
I've spent the better part of my day running tests to see how reliable a piece of software is so I've only written maybe two or three dozen lines of SQL to grab data for comparison.
Most days I write a lot more code though...
How do you count LOC? (Score:2)
Re: (Score:2)
I just count everything in the file. It's not as if LOC is a useful metric for anything anyway.
None, but I designed a PC board (Score:2)
Re: (Score:2)
You mean you don't write Excellon drill files by hand?
jk.
Re: (Score:2)
I work in pictures that turn into circuits. No lines of code, but similar results.
Similar to a Fortran program?
Re: (Score:2)
Sometimes that is more fun... I wish I could more of that, but my current job has me writing PLC code and maintaining ancient C++ apps.
There is something. Does 1 rung on a PLC equal one line of code? How about Assembly language? Your lines add up faster. In your case, maybe add up the routes you did manually(never met autorouting that didn't suck..) and the components you placed. Then thats your "lines" of code....
The further up the technical ladder you go... (Score:2)
Bad timing (Score:2)
Re: (Score:2)
Re: (Score:2)
Even more productive is to... (Score:2)
copy and paste!
Missing option (Score:2)
I'm on vacation you insensitive clod! Seriously, I had to fight to get my vacation this year - and there's no way I'm going to write or debug any code for the next two weeks.
Well, ALMOST no way, anyway - given the economy, if push came to shove I'd do what it takes to keep my job...
I Made a Tree! (Score:2)
bad timing (Score:2)
More than 1000 (Score:2)
I
get
paid
by
the
line,
just
like
Dickens.
Maven-hell (Score:2)
Maven is such a waste of time ...
Yeah, yeah, I know, "The good old days of Turbo Pascal 3 with only one source file", but still ...
Stream of consciousness programming (Score:3)
I don't want to see 1000+ lines of anything that someone wrote in a 24-hour period.
Missing Option... (Score:3)
You forgot the most correct answer...
As few as possible
Any more than that and you're doing it wrong.
Re: (Score:2)
some days my net output is -300 lines of code
I consider those the best days.
Re: (Score:3)
You've got to love a poll where a negative answer is actually a legitimate value, despite the creator of the poll missing that fact. I had to vote for zero, but in fact I wrote -2 today, removing an unused variable and the empty line above it.
Re: (Score:2)
Re: (Score:2)
I think this counts as writing two lines - those lines are different now.
If you want to go that way, then every line below the one you delete is different, because they've all been moved up one.
Re: (Score:2, Insightful)
You are an immortal in a MUD and over the prior 24 hours you have:
1) Created five new rooms. How many rooms have you created in the prior 24 hours? Five.
2) Created seven new rooms, destroyed three old rooms. How many rooms have you created in the prior 24 hours? Seven.
3) Created four new rooms, destroyed seventeen. How many rooms have you created in the prior 24 hours? Four.
4) Created zero new rooms, destroyed four old rooms. How many rooms have you created in the prior 24 hours? Zero.
I don't see how creati
Re: (Score:2)
Last time I checked, -300 was "less than 100", so the option to pick should be obvious.
People who write exactly 1000 lines, on the other hand, are kind of stuck...
Re: (Score:2, Interesting)
Re: (Score:2)
Actually, the last one overlaps with all of them, depending on how the code was written...
Re: (Score:3)
Does it count if all my code consists of GOTO statements?
Re: (Score:2)
Why would one need a negative answer? The question did not ask the net change in lines of code in your source, only for the count of lines you write. Deleting a line is not writing a line. If I asked you how many emails you received yesterday I wouldn't expect you to tell me -10 because the number of emails in your inbox had a net change of -10.
Re: (Score:2)
No, but if some portion of the people answered zero and some portion answered less than 100 then one's data is misleading. While it is an informal poll, to be certain, it does not take a terrible amount of thought to at least make it considerably more information with a proper formulation of the choices.
Re: (Score:2)
Or to put it differently, if zero is of particular interest, making it so that an unknown portion of the people who wrote zero lines of code do not choose another option is probably worth a little more precision in the second answer.
Re: (Score:2)
No. If the question asked for net change in lines of code in the source, that'd be a whole different question. If I write fifty lines and delete four, I still wrote fifty lines, not forty-seven.
Re: (Score:2)
Arithmetic fail, forty-six.
Re: (Score:2)
The question did not ask about net change, but the number written. Deleting a line does not change the count of lines written, only the net lines remaining.
Re: (Score:2)
You serious underestimate the power of software.
I send a request into our intake, it texts the maintenance guy, light bulb gets change. Software changes light bulb QED
Re: (Score:2)
And after several changes of requirements, ballooning scope and out of control budgets, the "game changing technology" of software controlled light bulb switching will quietly be swept under the carpet. But due to the sheer audaciousness of your project and the insane amounts of money pumped into it, internally the project will be declared a massive success and you will be promoted into a managerial position. From there you will continue with your unrivalled vision until you jump ship to a director positi
Re: (Score:2)
I hate you.
Re: (Score:2)
Does talking to my girlfriend count as communicating in code?
What is this "girlfriend" thing you speak of?