The Joys Of Programming

It's just one of those oddities from being a kid or young adult where you are supposed to take pride in doing the work while being a successful (for some definitions) adult is getting paid to make other people do your work.

I feel better about delegating nowadays, although it's still not my first instinct.

However, this week I was forced to delegate a fix effort for something I overlooked in the first place. Management wanted me to stay focused on other things.

That didn't feel so good. :\

Don't look at it as, "asking people to do things I could do myself" and look at it as "asking people to get things done that I don't have time to do".

Also, consider this, "I can be selfish and do the fun and interesting things and delegate the mundane or boring things to others."

When I was a manager of a large team, I always thought of it as being the conductor to an orchestra. Sure, the players are doing the heavy lifting, but I'm the one who's brought it all into a cohesive *system*.

Having said that, I hated the fact that I was a MS-Office jockey and meeting-attendee rather than playing with all the new, cool technology. So I backed away from management and ended my career as an individual contributor.

If you really have a hard time delegating, maybe management wasn't the right choice. In my experience the worst managers are the ones that used to be engineers, especially if they are promoted from within.

kazar wrote:

In my experience the worst managers are the ones that used to be engineers, especially if they are promoted from within.

Conversely, every ex-engineer manager I've ever had has been awesome, for the one simple reason that they have a nuanced understanding of what the work they're asking you to do involves. They get it.

The worst managers I've had and THE worst manager I've heard about from colleagues have all been lifelong managers. No real understanding of the scope and complexity of the things they're asking you to do, nor the wider environment they're asking you to do it within.

I mean, as a lifelong engineer, I'm baffled as to how the #1 lesson in management school isn't "understand the work that the people you're managing do."

Jonman wrote:

I mean, as a lifelong engineer, I'm baffled as to how the #1 lesson in management school isn't "understand the work that the people you're managing do."

It is way easier to sell people on the notion that the key to good management is an Oprah quote and a paintball game than a exhaustive examination of overlapping dependencies, abstractions (muddled or not), evolving tool chains, and paradoxes in spec reqs.

Danjo Olivaw wrote:

... is an Oprah quote and a paintball game than ...

The stories I could tell about a manager I once had. I'll stick with the one triggered by your phrase above.

Our manager's manager, we'll call him Lyle because that was the asshat's name, was the worst. His eventual firing was because of sexual misconduct with a direct report, although that's not what the documentation says. I was in the know on that situation and was interviewed by HR in the investigation, so I know the truth why the slimeball was fired.

Anyway, he decides to do a team building exercise with the devs. This is after all his previous ones have failed. We're going to play Laser Tag! Fun? No, not really. We ( about 9 devs and he ) head to the LTag place, suit up, and play for an hour or so. It's not real fun because this just isn't a LTag group. Plus, our guns weren't working well - it was near impossible to hit anyone.

Well, turns out the problem was only for the team I was on, which was not the team fearless loser Lyle was on. After the LTagging was all over, he announces to everyone, laughing, that he asked the LTag folks to make it where his team could only be hit in one place on the body, whereas the other team had normal hit spots.

Great team-building, eh? He was the kind of person that can't lose at anything. Hyper-competitive and could never admit when he was wrong. Perfect personality for a manager - not.

What a douche. Couldn't stand him from the first moment I met him. I had the day off when he was fired and was enjoying a day of drinking golfing. I got the page from my co-worker as we were stepping up to the tee box on 10. Best 9 holes of golf of my life.

-BEP

Jonman wrote:

Conversely, every ex-engineer manager I've ever had has been awesome, for the one simple reason that they have a nuanced understanding of what the work they're asking you to do involves. They get it.

The worst managers I've had and THE worst manager I've heard about from colleagues have all been lifelong managers. No real understanding of the scope and complexity of the things they're asking you to do, nor the wider environment they're asking you to do it within.

I mean, as a lifelong engineer, I'm baffled as to how the #1 lesson in management school isn't "understand the work that the people you're managing do."

I can't say if my experience is the rule or the exception or if your case is the rule or the exception. Both would just be confirmation bias. But I can say from my experience I have had 14 managers in the past 14 years and worked in parallel with dozens more and the only one who actually knew how to manage had an MBA, and he got fired because he protected his employees against a hostile co-worker that was best friends with his boss (who was an ex-engineer).

Jonman wrote:

I mean, as a lifelong engineer, I'm baffled as to how the #1 lesson in management school isn't "understand the work that the people you're managing do."

Hard to structure a $250,000 MBA program around that

Iridium884 wrote:
Jonman wrote:

I mean, as a lifelong engineer, I'm baffled as to how the #1 lesson in management school isn't "understand the work that the people you're managing do."

Hard to structure a $250,000 MBA program around that

I think it is. It's just hard work, so lazy managers ignore it. Lean Six Sigma, CMMI, and all that buzzword stuff is all about a deep understanding of the work and the worker, but that's hard work. Good managers are willing to put in that work. Good executives require it. Unfortunately, many executives and managers aren't that good.

kaostheory wrote:
Iridium884 wrote:
Jonman wrote:

I mean, as a lifelong engineer, I'm baffled as to how the #1 lesson in management school isn't "understand the work that the people you're managing do."

Hard to structure a $250,000 MBA program around that

I think it is. It's just hard work, so lazy managers ignore it. Lean Six Sigma, CMMI, and all that buzzword stuff is all about a deep understanding of the work and the worker, but that's hard work. Good managers are willing to put in that work. Good executives require it. Unfortunately, many executives and managers aren't that good.

My wife is an executive, formerly a project manager. I think she's one of the good ones that tries to understand the work. And fortunately she's usually not in charge of tech teams, so the amount she needs to know isn't as high as other managers.

That said I can vouch for one underrated aspect of this problem. She never has time to do any training. In an ideal world they would hire enough staff that managers could take time off to get requisite training. Either training in the technical aspects of the people they manager or some general training that isn't an MBA.

As it stands most really good companies would help her get an MBA, but that would mostly be for the paper.

Do any of you use Shadow Properties in EF Core to handle your Audit columns ( CreateDate, CreatedBy, etc. )?

If so, why did you choose to as opposed to putting them in a base class/interface?

The entities will be in an API and not directly accessible by any application. Apps will be working with DTOs. Therefore, I don't care about "hiding" the audit columns from the consuming apps. They won't see them since they won't be included in the DTOs.

-BEP

Once upon a time I found what was probably a JavaScript snippet that allowed the develop of a web page to allow in-place editing of a sequestered content block. Like it presented a text area around a paragraph that let a client edit the text without loading up a CMS admin page. Does this ring a bell?

Possibly the contenteditable attribute?

Edit: speaking of which, this is a fun trick: data:text/html, < html contenteditable >

Gremlin wrote:

Possibly the contenteditable attribute?

That’s not it but that looks like a great starting point. Thank you!

This thing was probably more of a hack, but I seem to recall it seeming well-designed and useful. N.b., I’m almost certainly wrong in my estimation.

This might help you search further:

MDN: Making content editable

Edit my post!

Hallo lovely people,

It has been a long time since I posted here. In that time I have shifted careers from geology towards coding and now work in a MSVC C++ shop on a scientific foused app.

My management provides the guidance ' make us as much money as you can' without understanding that providing hospice care for an incredibly old and non-documented code base is not going to accomplish that. (We don't even have unit tests, only regression tests!) And we can't spend time on building regression tests unless we increase the profitability of our product. So, we have the mandate 'If you can win some races in your Pinto, we (management) will consider providing budget and support for an Audi.

That said I do really love coding and architecture and want to proactively start improving some of our key business logic libraries. I'm just struggling to findng the motivation.

So I've been asked to take an older C++ program*, written by an Italian volcanologist, and make one specific part of it available as a webapp. The good news is that I can completely ignore the main file of the program, all 48,000 (source control? who needs source control when you can have a 6000-line block of commented out code!) lines of it. The bad news is the rest of it isn't much better. The file I need some functions from is 14,000 lines and since the programmer was Italian the comments are meaningless, and since he or she was a scientist, the code is the least self-documenting stuff you've ever read through.

I did something similar 15 years ago and found the process pretty simple: once the library was compiled as a dll it wasn't too hard to call it from an ASP.NET app. But we don't run ASP.NET apps here. About 10 years ago I was part of a group that took on another similar project, this time needing to call the functions from a Java app. SWIG was the chosen wrapper and I'd sooner quit my job that have to use that again.

So I started to look into doing it with python and stumbled onto boost-python, which seems a whole lot nicer than SWIG. After a few hours slowing adding stuff to the shared library (I did not know about gcc's --no-undefined and it made this process go a lot faster once I discovered it) until python would load it without complaining, I've now got a functional python wrapper for the C++ code. Now I just have to see if I was correct that this is the only part of the codebase I need in order to make the webapp work.

*As far as I can tell the only thing cpp about this is that they use std::cout and std::endl. Everything else is structs, macros with one-letter names and C functions. And for anyone interested, the app takes a set of coordinates and does a lava flow path simulation using said coordinates as the vent location. It does this X times (10,000 is our default -- necessary because DEMs aren't perfect so some elevation error is added each step along the way) and then outputs a map with the paths overlayed by density.

Edit: Sidenote -- I did this all in a CentOS 7 (with a desktop) VM since that's the OS we run on our webservers. It's been at least a decade since I last used a linux desktop and it was surprisingly nice. If I didn't just get a refreshed Macbook Pro for work I'd definitely be looking at non-apple options with the intention of running linux.

Yeah we use CentOS7 and I broadly like it. No idea if you'd find it useful but I keep a note of all the config steps I make for my dev environment. Obviously many of those are specific to my machine/workflow but you might find some useful. Sorry it's a bit of a mess, as it has acreted stuff over time.
https://github.com/DanBuchan/setup_c...

billt721 wrote:

So I've been asked to take an older C++ program*, written by an Italian volcanologist, and make one specific part of it available as a webapp.

Incidentally this is exactly what I've been working on for the last 5 years. Building a web based framework for running standalone executables (of scientific software). Our framework is opensource so if you need something like that drop me a DM and see if it is useful.

Check it out:
http://bioinf.cs.ucl.ac.uk/psipred/

This is a pretty good deal for the aspiring pythonista:

https://www.humblebundle.com/books/p...

georob wrote:

Hallo lovely people,

It has been a long time since I posted here. In that time I have shifted careers from geology towards coding and now work in a MSVC C++ shop on a scientific foused app.

My management provides the guidance ' make us as much money as you can' without understanding that providing hospice care for an incredibly old and non-documented code base is not going to accomplish that. (We don't even have unit tests, only regression tests!) And we can't spend time on building regression tests unless we increase the profitability of our product. So, we have the mandate 'If you can win some races in your Pinto, we (management) will consider providing budget and support for an Audi.

That said I do really love coding and architecture and want to proactively start improving some of our key business logic libraries. I'm just struggling to findng the motivation. :P

Many things in this post would trigger me to looking for a new job.

I've been enjoying golang and made a makefile documentation tool

What’s the most lightweight way to compile C on Windows? Visual Studio seems like it installs a million things I don’t need. MinGW? This is for low-level audio programming.

Well, mingw-w64 is gcc repackaged, so it's likely to be relatively straightforward. Pure command-line driven, bring your own editor. To get much simpler, you'd probably have to fall back to a toy compiler.

Now, internally, gcc is crazy. The sheer complexity of the package is nutsoid. But they hide most of that from you; it puts about a million files into, I believe, a single subdirectory tree. The interface to the language is pretty straightforward. If, however, you want to try to dig into the implementation, you won't have a good time.

In other words: it's "simple" in the sense of not really installing runtime anything, and being pretty much self-contained, with almost no system-wide side effects. (unless you change your paths to include its binary dir, and since you'll probably be doing it yourself, you'll know how to undo it again.) It is not at all simple in terms of internal architecture, but you can probably ignore almost all of that.

As far as I can tell, you probably want this one:

https://mingw-w64.org

But I'm not a C/C++ programmer. Pay close attention to anyone that is.

Yeah, mingw is going to be the simplest way. Just make sure in the options you click to install the C/C++ compiler and you're good to go.

Michael wrote:

What’s the most lightweight way to compile C on Windows? Visual Studio seems like it installs a million things I don’t need. MinGW? This is for low-level audio programming.

If you don't want the visual studio GUI, you can just use the Visual C++ toolchain which will give you cl and link command line tools. I find it's better than using mingw since all the standard Windows documentation applies.

I’ll probably go with mingw/gcc. Thanks for the tips.