Programming

A couple years ago I transitioned from Windows to cloud backend work. One dramatic difference is my use of the debugger. In Windows the debugger was everything to me. I ran every line of code in the debugger before committing. The windows debuggers are great tools* so this is painless. “Set next statement” means I can walk through a section of code again, right now, possibly editing the variables first.

Now? I almost never run the debugger and the code suffers. It’s too slow to load, too hard to get a reasonable environment. It just isn’t a useful tool unless I’m really stuck. I’m sure the solution is to learn emacs and use its debugger.

  • Visual Studio debugger primarily, but also the VB 6.0 debugger, windbg, ida pro, soft ice at different times. Post-mortem debugging is amazing.
1 Like

Yeah the IntelliJ Java debugger is like not terrible I guess, but the Visual Studio debugger gives you all the advantages of static typing plus all the things you can do in scripting languages like edit and continue, super easy expression evaluation, setting execution start point and whatever. I don’t know any other statically typed language that gives you the same power. While slogging through Java I’ve thought many times about what an advantage it is for the same company to produce the language specification, compiler and IDE. Everything fits together with such neatness in a way that isn’t really possible in something like a Java IDE.

LMAO. God I hate Xcode. Just so Steve. Luckily I haven’t had to use it for several years now. For Linux, including WSL, I’ve been using CLion, which is, ah, better than straight gdb. Visual Studio has definitely been the gold standard for decades.

WSL environment is surprisingly good, despite some weird issues like not being able to ping without a sudo. Been working on it for 6 months and no real complaints. It pisses my boss off though, he wants me to use a mac.

1 Like

Are you using WSL2? No sudo required for ping for me.

I was always bumping into weird incompatibilities with WSL, but WSL2 is just plain Linux, with a real kernel. Everything works exactly as I expect. I’ve even been able to run an X server and have a full desktop on my 2nd monitor. It was pointless and stupid so I stopped doing it, but I could.

No, just WSL on my company’s ancient setup, unfortunately. I asked if it was possible to get upgraded for WSL2 and they were like lol nah just use a mac if if’s that big a deal to you.

I’m looking for the name of a interface design pattern, if there is one at all.

The reason is that in my software start-up we are taking a different design approach than our competitors, and I’m looking for the best way to describe both the current standard practice, and the way how we solve it. I’d like to write about it, but I have trouble finding the appropriate vocabulary.

Current standard practice is that a platform (MLOps in our case) exposes APIs and wraps them in a SDK that users can import into their script to call whenever they want to use a function from the platform. For example to track experiments, or manage infrastructure, etc. Amazon Sagemaker works like that, and many more MLOps platforms do. Actually most cloud services in general work like that, it’s a very common pattern that makes a lot of sense in many scenarios. Does this interface design pattern have a name?

We are doing something else. Instead of asking our users to call our functionality from their code, we prescribe the structure of their code, and ask them to implement a number of required and optional interfaces, so we can reason about their code. I would love to go into why we do this and what the benefits are, but right now I’m looking for some context on how these patterns are named. I don’t know of many services that take this approach, not in the MLOps space or outside, except for AWS Lambda. All they need to manage the lifecycle of your function is your code in a prescribed structure / interface and some configuration. Does this interface design pattern have a name?

Hope my question is clear.

Maybe a diagram would help. #2 sounds like just another name for an SDK to me.

Are these required and optional interfaces defined in your code or somewhere else?

I’ll try to make a diagram and post it later.

The difference is that in #1 you have to call the APIs of the platform and you normally use their SDK to do so.

In #2 the platform calls the APIs you are asked to define, no sdk is needed, but you need to implement the required interfaces in your code.

In our case, these map directly to logical functionality you need in a ML project: a data loader, model.fit, model.predict, metrics and some optional methods for example for feature importance.

Does that sound heavy handed? It’s actually a light touch approach, and we provide scaffolding utilities to make it easy.

Edit: for clarity. In #1 you run your code from wherever, as long as it can connect to the service you are using. In #2 you send your code to the platform where it will be run.

1 Like

I recently started mentoring a 13 year old who wants to become a software engineer. He’s not really sure exactly where in the field he wants to go, he just knows he wants to be in tech. He’s in the “absolute beginner” phase. He wants to take a programming course with me - what’s a good language for absolute beginners? My instinct says python, because eventually I want to build something cool with him, and you can build just about anything with python and it’s got a shitload of libraries. It’s also easy to pick up for beginners, I think.

But I also am considering golang, because it looks like the future to me. But it introduces a lot of concepts that I’m not sure may be too much for a kid to grasp. He’s smart but I really don’t know how he’d do with the concept of pointers and stuff.

Any ideas what language to go with?

Python is better imo. Maybe even javascript. I think the most important thing is being able to see some results as quickly as possible. You need a little reward for the effort. Javascript/html makes that really easy.

1 Like

Javascript. Python is scratch++.

Or maybe Scratch.

2 Likes

I really hate javascript on a fundamental, visceral level but maybe it would be good for me to learn. I’m like an intermediate python programmer, so it couldn’t hurt me to go through a course again. I’m already going through that course for network engineers. My boss told me to teach him bash and I was like LOL no I don’t want to ruin his young mind.

I had to look this up but that looks interesting. Looks like its designed for kids much younger than him though. An important part of this is it needs to be able to hold my attention as well, the kid will pick up on it if I am disinterested.

He has kind of a defeated mindset about it, like “oh I’m not a very good programmer” so I think if I had something real where we could get up and running quickly and build something neat that it’d give him some confidence.

I would just start doing web pages. If he’s really a total beginner, it’s not a bad idea to just start with HTML/CSS. You may find that the concepts of mark-up are not immediately obvious to him. And it’s a very quick reward for the effort.

1 Like

My son does scratch a lot

He has learned a lot of the basic logic of programming and makes little games and animated shorts in it.

He’s 10 not 13, but it makes it easy to quickly build stuff and go over logic with him without having to focus on syntax.

We will probably move on to html/js or python next.

We’ve done some unreal engine stuff as well but it’s harder to teach him stuff that I don’t really know either.

I agree that just getting to meaningful results quickly is important early on.

My eldest daughter did scratch when she was younger and she did that. She didn’t really make games, but had the sprites acting stuff out.

Lisp, how is this even a question?

3 Likes