firelizzard

joined 1 year ago
[–] [email protected] 1 points 12 hours ago

Of course but presumably on occasion you do work in other languages? I work in all kinds of languages and so jumping between them it’s pretty handy to bridge the gap.

If I were jumping languages a lot, I definitely think it would be helpful. But pretty much 100% of what I've done for the last 3-4 years is Go (mostly) or JavaScript (occasionally). I have used chatgpt the few times I needed to work in some other language, but that has been pretty rare.

I think you could definitely still get value out of generating simple stuff though, at least for me it really helps get projects done quickly without burning myself out

If simple stuff == for loops and basic boilerplate, the kind of stuff that copilot can autocomplete, I write that on autopilot and it doesn't really register. So it doesn't contribute to my burnout. If simple stuff == boring, boilerplate tests, I'll admit that I don't do nearly enough of that. But doing the 'prompt engineering' to get copilot to write that wasn't any less painful that writing it myself.

For small one off scripts it makes them actually save more time than they take to write

The other day I wrote a duplicate image detector for my sister (files recovered from a dying drive). In hindsight I could have asked chatgpt to do it. But it was something I've never done before and an interesting problem so it was more fun to do it myself. And most of the one off stuff I'm asked to do by coworkers is tied to our code and our system and not the kind of thing chatgpt would know how to do.

[–] [email protected] 1 points 12 hours ago
func randomRGB(uid int) color.RGBA {
	b := binary.BigEndian.AppendUint64(nil, uint64(uid))
	h := sha256.Sum256(b)
	return color.RGBA{h[0], h[1], h[2], 255}
}

That took me under three minutes and half of that was remembering that RGBA is in the color package, not the image package, and uint-to-bits is in the binary package, not the math package. I have found chatgpt useful when I was working in a different language. But trying to get chatgpt or copilot to write tests or documentation for me (the kind of work that bores me to death), doing the prompt engineering to get it to spit out something useful was more work than just writing the tests/documentation myself. Except for the time when I needed to write about 100 tests that were all nearly the same. In that case, using chatgpt was worth it.

[–] [email protected] 1 points 1 day ago (2 children)

If I've been working in the same language for at least a year or two, I don't have to look up any of that. Copilot might be actually helpful if I'm working in a language I'm not used to, but it's been a long time since I've had to look up syntax or functions (excluding 3rd party packages) for the language I work in.

[–] [email protected] 3 points 1 day ago (2 children)

I won't say copilot is completely useless for code. I will say that it's near useless for me. The kind of code that it's good at writing is the kind of code that I can write in my sleep. When I write a for-loop to iterate over an array and print it out (for example), it takes near zero brain power. I'm on autopilot, like driving to work. On the other hand, when I was trialing copilot I'd have to check each suggestion it made to verify that it wasn't giving me garbage. Verifying copilot's suggestions takes a lot more brain power than just writing it myself. And the difference in time is minimal. It doesn't take me much longer to write it myself than it does to validate copilot's work.

[–] [email protected] 4 points 3 weeks ago

My comment game has gotten far better since I started doing live code reviews. Essentially I ask myself, “Would I feel the need to explain this to someone during a code review?” and if the answer is yes I add a comment.

[–] [email protected] 5 points 3 weeks ago

That’s a hot take. If you want your code to be maintainable at all, it needs comments. If you’re part of a team, write comments for them. If someone else may take over your project after you move on, leave comments for them. And have you ever tried to read uncommented code you wrote a year ago? Leave comments for yourself.

[–] [email protected] 4 points 4 months ago

If I designed the schema it is most certainly going to be structured. Unstructured databases are awful.

 

Why is crypto.subtle.digest designed to return a promise?

Every other system I've ever worked with has the signature hash(bytes) => bytes, yet whatever committee designed the Subtle Crypto API decided that the browser version should return a promise. Why? I've looked around but I've never found any discussion on the motivation behind that.

[–] [email protected] 0 points 4 months ago

So you’re arguing that “Object oriented” shouldn’t apply to languages that are oriented around objects?

[–] [email protected] 2 points 4 months ago (2 children)

Of course, but OOP is typically about putting methods on classes, inheritance of behaviour etc.

You’re referring to one subtype of OOP. That may be what most people mean when they say OOP, but that doesn’t make it correct. Object-oriented programming is programming with objects, which does not require inheritance or classes.

[–] [email protected] 2 points 5 months ago

I've done a little bit of Python in the past, the biggest thing being an automation task that borderline became an app. I certainly can imagine using it for scripts, though I default to bash because that's almost always available but TBH mostly because inertia. Beyond that my default is Go because inertia (and I love Go). I watched a video by the Primeagen (on YT) - in his view, Rust is better for text/data pipelines and CLI tools. Being very familiar with Go and not at all familiar with Rust, that's an interesting take because honestly writing a CLI in Go is kind of meh.

[–] [email protected] 3 points 5 months ago (2 children)

so you have to catch all exceptions then do extra work to tell what the specific situation is

That’s horrifying. That’s a solid reason to avoid Python like the plague.

[–] [email protected] 4 points 5 months ago

For references within a scope, you’re probably right. For references that cross scope boundaries (i.e. function parameters), they necessarily must consume memory (or a register). Passing a parameter to a function call consumes memory or a register by definition. If a function call is inlined, that means its instructions are copy-pasted to the call location so there’s no actual call in the compiled code.

 

I have a subscription to Nature but most of the articles are totally beyond me. I’m thinking of switching to a comp-sci specific journal. I’m mainly interested in compiler design and implementation of JIT compilers and VMs like JVM and .NET.

 

I am a self-taught programmer and I do not have imposter syndrome. I have a degree in electrical engineering and when I thought that was going to be my career I did have imposter syndrome, so I'm not immune. I wonder if there's a correlation. It seems that many if not most professionals suffer from imposter syndrome; I wonder if that's related to the way they learned.

When I say self-taught, I don't mean I never took a class, I mean the majority of my programming skill was learned by doing/outside of classes. I took a Java class in high school that helped me graduate from procedural languages to OOP, and I took classes in college but with few exceptions the ones that were practical (vs theoretical) covered material I already knew.

 

My last job was at a company that designed and built satellites to order. There was a well defined process for this, and systems engineers were a big part of it. Maybe my experience there is distorting my perspective, but it seems to me that any sufficiently complex project needs to include systems engineering, even if the person doing that is not called a systems engineer. Yet as far as I can tell, it isn't really a thing in the software industry. When I look at job postings and "about us" blog posts about how a company operates, I don't see systems engineering mentioned. Am I just not seeing it, is it called something else, or is the majority of the industry somehow operating without it?

view more: next ›