The Joys Of Programming

DanB wrote:
Mixolyde wrote:
charlemagne wrote:
Mixolyde wrote:

I enjoy writing tests around other people's code and then showing them all the bugs they left in.

You are an agent of chaos.

Kind of the opposite, really. Find and prune dead code, fix bugs, and ensure they don't come back. I increase stability. Bad bosses hate me because I reduce the number of fires they have to put out.

I worked with a guy some years ago who maintained his productivity should be measured by the number of lines he removed from the code base

For legacy code, that's not an awful metric.

lunchbox12682 wrote:
DanB wrote:
Mixolyde wrote:
charlemagne wrote:
Mixolyde wrote:

I enjoy writing tests around other people's code and then showing them all the bugs they left in.

You are an agent of chaos.

Kind of the opposite, really. Find and prune dead code, fix bugs, and ensure they don't come back. I increase stability. Bad bosses hate me because I reduce the number of fires they have to put out.

I worked with a guy some years ago who maintained his productivity should be measured by the number of lines he removed from the code base

For legacy code, that's not an awful metric.

All code is legacy code, but it is a good metric as long as you've adequately covered it with tests.

Mixolyde wrote:
charlemagne wrote:
Mixolyde wrote:

I enjoy writing tests around other people's code and then showing them all the bugs they left in.

You are an agent of chaos.

Kind of the opposite, really. Find and prune dead code, fix bugs, and ensure they don't come back. I increase stability. Bad bosses hate me because I reduce the number of fires they have to put out.

Oh yeah for sure! I can imagine some devs don't appreciate it, unfortunately.

We always wanna see more red than green on those pre deploy Pull Requests. The day Elasticsearch died in our behemoth was a good day.

I have a chance to go to a different company who uses Angular (not AJS) for front end and Java for all back end. I'm a very good .Net developer but my exposure to Java is making 2 small mods to Minecraft back before modloaders were a thing.

They'll hire me without the Java experience if I choose to go there, but I think I would like to be able to speak the "language", as they say.

Do you guys know of a Java course that would be good for me to run through that is tailored to a Sr. Dev?

-BEP

Going from (presumably) C# to Java is not about the language, at least it hasn't been since Java 8 (ok, you'll use -> instead of => for your closures, and get used to String instead of string. There, you're a Java dev now). The bigger switch is going from there being an "according to Hoyle" way of doing things to an absolute explosion of libraries offering to do similar things at every single level of the stack, right down to how you represent time.

If you're going to a place where a lot of decisions have already been made about the stack, and there's a good body of existing source code, you'll have an easy transition from the .Net world, and you won't need a book. If those decisions haven't already been made and they're looking to you to make them, then no book is going to help.

Java IDEs are very excellent for guiding your code structure and syntax.

When I was coding java more regularly I more or less let the ide warnings/errors and a bit of googling teach me.

(I was coming from a C and Perl background at that point)

I put a dev version of my Blaseball fan project up on a separate ec2 instance so I can share it with others for debug help. If you care to see my live playoff bracket WIP, it is here.

Edit: when the development server is up.

Crinkel/Dan: Thanks for your feedback.

-BEP

Came across this old article the other day: 101 Great Computer Programming Quotes.

Some standouts (there are many, many more):

Edward Tufte wrote:

There are only two industries that refer to their customers as "users".

Alan Kay wrote:

Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.

IEEE Grid newsmagazine wrote:

A programmer is a person who passes as an exacting expert on the basis of being able to turn out, after innumerable punching, an infinite series of incomprehensive answers calculated with micrometric precisions from vague assumptions based on debatable figures taken from inconclusive documents and carried out on instruments of problematical accuracy by persons of dubious reliability and questionable mentality for the avowed purpose of annoying and confounding a hopelessly defenseless department that was unfortunate enough to ask for the information in the first place.

Edward tuffte is a genius. If you haven't already everyone should read his book "the visual display of quantitive information" it's amazing

I stumbled onto a relatively new Youtube channel: Dave's Garage. It's basically a retired 25-year veteran Microsoft Engineer, telling amusing and interesting stories (and occasionally showing code) from the Microsoft days of yore. For instance, he literally built Task Manager from scratch as a side project, and later got it incorporated into the main codebase because his fellow engineers loved it.

I love old programming war stories, and this stuff's right up my alley. Maybe some of you would enjoy it too.

Not sure if this is the right thread or not, but here goes.

Got a new gig at work, and it requires this non-IT dude to learn how to program in Visual Basic, specifically in Word.

Any suggestions on a nice, easy to use set of lessons?

Don’t know if it’s a bit too technical but I remember liking the O’Reilly book on VBA. Writing Word Macros. If your employer has an OReily Safari subscription you could take a look. It might be useful as a reference.

This is a little bit of an unusual post for the thread but I've been playing Starbase for a bit and they've integrated a custom programming language in it, called YOLOL. The game is all about constructing ships bolt by bolt, beam by beam, and though you can do plenty without ever coding, you unlock a lot by stepping into this language.

Yolol is highly restrictive, which forces creativity and a bit of code golf. Every script has a maximum of 20 lines and every line has a maximum of 70 characters. I only know a bit of Python and C# so I haven't used a language before that uses Goto to do things like loops and branching logic. Working with it has been fascinating and I've learned some new things, like how to do the equivalent of an If statement without if-then-else.

Like instead of

if :detectAsteroid then :fireLasers

I can write

:fireLasers = :detectAsteroid

I suspect that's pretty fundamental to minimizing loops/decisions in programming where that's desired, but it's something that never occurred to me until I needed to crunch a 100 character line down to 70

Any way I have spent way more time designing ships and writing code in this game than actually playing the game, and it's been a refreshing change of pace that has actually taught me a thing or two.

polypusher wrote:

so I haven't used a language before that uses Goto

30+ years of high level language development: "you're welcome".

DoveBrown wrote:

Don’t know if it’s a bit too technical but I remember liking the O’Reilly book on VBA. Writing Word Macros. If your employer has an OReily Safari subscription you could take a look. It might be useful as a reference.

Thanks.

polypusher wrote:

I only know a bit of Python and C# so I haven't used a language before that uses Goto to do things like loops and branching logic.

Surprise! You have, because C# has "goto" and labels. While it's extremely discouraged in any modern language, sometimes, just sometimes, there's no other way to make your code do the right thing or to avoid being grossly inefficient.

VBA should be super simple to pick up.
15 years ago I had a lot of fun with it attaching code to forms in Access.

I think the best environment for using VBA is Excel. It's also the only one I've ever tried. There's just something great about having discrete collections and locations of your data. I don't even know what the structure primitives look like in Word.

And VBA, too, has a GoTo statement.

muraii wrote:

And VBA, too, has a GoTo statement.

Is it considered harmful?

*Legion* wrote:
muraii wrote:

And VBA, too, has a GoTo statement.

Is it considered harmful?

Yes, VBA is considered extremely harmful.

No way. It was always tremendously entertaining when you got a finance person who was flexible-brained enough to go "wow, I can pretty automate all my work if I play with VBA enough" and they would eventually show up with this multi-megabyte spreadsheet that would let you edit a value, press F9, go away for the weekend, and then come back on Monday to get the new quarterly budget for a billion-a-year IT organization, broken out right down to individual payroll.

Then they would learn they were now in a worse place than a developer supporting finance, because their tools didn't let them accomplish anything easily, but they were now "the person who could do things in Excel," and pretty soon they were functionally a VLOOKUP + IFF dogsbody for everyone they knew.

Which then tied up all their time instead of hassling me about budgetary variance during the 3+9 or whatever bullsh*t, thus proving VBA was not only not harmful, but actually salutary. QED.