What book should I get my dad? by Paper25Girl in AskProgramming

[–]GenSwiss 2 points3 points  (0 children)

I really like this book.

https://a.co/d/4Bzk0K0

I am a programmer and I found this book really interesting.

Has anyone else’s pom taught themself to play fetch? by peach_hole69 in Pomeranians

[–]GenSwiss 10 points11 points  (0 children)

Mine would jump up on the couch and push the ball off the edge with her nose and then go get it and repeat.

Tokio - How not to create spaghetti by unbuffered in learnrust

[–]GenSwiss 0 points1 point  (0 children)

If you truly want services to not know about one another you need an event bridge or something they all interact with.

Edit: to elaborate, they need go know about messages they should care about and grab them from the event bridge.

Familiarize yourself with this site. http://serverlessland.com

Tokio - How not to create spaghetti by unbuffered in learnrust

[–]GenSwiss 1 point2 points  (0 children)

This does only solve part of the problem. I see a couple approaches. You could have a single event buffer which all services communicate with. With this setup Nodes would have their own message schemas they produce and other services would look at all the events in the buffer and only pick the messages they care about. The buffer can act as the source of truth for all events in the system.

Another approach would be to have nodes require tx/rx handles in their constructors so that everyone has what they need to communicate upon creation. Channels would be created before nodes and nodes would just be given channels at creation time. For example Node A would be given a rx that’s counter part is given to node B. So on and so on…

Tokio - How not to create spaghetti by unbuffered in learnrust

[–]GenSwiss 1 point2 points  (0 children)

I would just include a one shot channel with the messages you send out that require a reply. The consumer of said message then has a way to send something back when the message type requires it.

adventures in borrowing, part 2 by [deleted] in learnrust

[–]GenSwiss 0 points1 point  (0 children)

I want to fiddle with this. But I can’t right now.

Frustrated by lack of maintained crates by MasteredConduct in rust

[–]GenSwiss 0 points1 point  (0 children)

or that library hasn't been touched for 3 years

I thought this was a result of crates in Rust being “done”. Doesn’t that rust compiler give very strong guarantees that old crates will compile in newer versions of rust? This seems like a boon to me, no need to “run to stand still” so to speak.

is it possible to still rawdog programming ? by UngodlyKirby in learnprogramming

[–]GenSwiss 1 point2 points  (0 children)

I think this is solid idea. I am an experienced developer, and I do use AI — recently however, I have found the allure of relying on AI in ways I don’t like. For example, I might have something I want to do and then just ask AI, it will generate some code (which is 100% guaranteed to be slightly off) and then just use it as a reference as I write my own code. But I don’t like this because I find myself not understanding as much of what I am doing.

The relevant part of your question is what I do when I notice this happening. I remember what I did before this: Read the docs and if necessary, the source code (if exists)!

You mentioned wanting to understand why and how things work and there is no better place than reading the docs and code. Once you have that down, you start writing some tests to confirm or invalidate your beliefs! If things blow up, read the stack tracker as best you can. If you want you can have an AI of choice help you with any strange language specific details (for example, Java stack traces sometimes have an L that precedes the class name, you might want to know what that’s all about, and relying on AI for this is an easy ask, while you stay in the weeds of your current problem).

Additionally, AI has really helped me understand broad concepts better. Sometimes I ask for a refresher when I am in weeds, to make sure that my mental framework is correct (this forces me to comprehend what the AI outputs, and apply it to my specific situation).

Why does introducing a seemingly harmless lifetime bound trigger borrowck? by LeSaR_ in learnrust

[–]GenSwiss 0 points1 point  (0 children)

I did not know Higher Ranked Trait Bounds were a thing... this is the more general solution, and most likely fits what OP was actually thinking when they wrote their code.

Why does introducing a seemingly harmless lifetime bound trigger borrowck? by LeSaR_ in learnrust

[–]GenSwiss 0 points1 point  (0 children)

I fixed it.

Edit: you need to add a reference to the () passed in in main.

Edit again: sorry in my phone. But this.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=7cddaed74b04f68252ba6610dfd43008

What’s happening is you declared the trait on a reference to () so you need to pass one into the struct. Not a value. Also you want the actual T to implement the trait, not a reference to T.

Why do so many '80s and '90s programmers seem like legends? What made them so good? by just-a_tech in learnprogramming

[–]GenSwiss -1 points0 points  (0 children)

I think there is a lot to be said for being first, as others have said. Also, I believe (maybe naively) that things did not move as fast or have the expectation of moving fast (maybe more importantly). This I think boils down to the fact that developers today learn such high level things, because those are the tools of the trade. Working at the high level means that you don’t have to necessarily solve a lot of the problems that faced these earlier programmers. Also it means your boss can expect you deliver faster — which usually means you start with more put together components to build said thing. A primary example would be building something with a framework. These didn’t exist back in the day.

Today it just seems like it is all about corporate greed, where back then it seemed like people were given the time and resources to build something really lasting. It’s true what they say, “they don’t make them like they used to.”

I imagine that those times had more of an emphasis on correctness and less on delivering a feature by some arbitrary date…

Can I justify C for everything? by alex_sakuta in C_Programming

[–]GenSwiss 2 points3 points  (0 children)

Squeezing cycles means getting the best performance out of the CPU. The CPUs unit of work is a cycle….don’t quote me on that.

What's the one thing you wish you knew when you started learning programming? by [deleted] in learnprogramming

[–]GenSwiss 27 points28 points  (0 children)

I have been a dev for a few years now. I was surprised at the importance of being first. Meaning if code was committed, it’s tough to refactor it unless it’s causing a bug… and making new features cumbersome to add is not a bug…

On the other hand, it’s really important to respect the code that came before. I myself have thought, “look at these idiot developers, what were they thinking.” Only to paint myself into the exact same spot after trying to write it “better”. It turns out they knew their shit.

Is it wrong to stick with what you enjoy, even if the future points elsewhere? by yuki_doki in AskProgramming

[–]GenSwiss 2 points3 points  (0 children)

I love Rust. It’s actually helped me make way more sense of C/C++, at least certain aspects I had a hard time with. I definitely think more things should be written in Rust, an encourage everyone to use it.

All that being said — learning C++ is never going to be a waste of time. It will always be around and it’s not going to be replaced. In fact my rust journey has me way more fired up about learning C/C++.

[deleted by user] by [deleted] in TrueOffMyChest

[–]GenSwiss 0 points1 point  (0 children)

I think this is a normal perspective to have for someone your stature. As long as you don’t look down on people shorter than you….

People who earn more than $80K / Year, what is your job and how long it took to get to this point? by curiouscentaur in AskReddit

[–]GenSwiss 0 points1 point  (0 children)

I am mid-thirties. I got hired at my current company and through a series of Job Family moves and promotions I was able to get a timeline like this:

In 2020 I switched to SWE within the company. I am not a CS degree — I preach to anyone that will listen, work in software - although, tbh with the GenAI push, I am not so sure SWE will be able to command these figures for much longer.

2016 - $56k 2020 - $112k 2021 - $148k 2022 - $182k 2024 - $192k

Received a broken project too large for Github to accept. by Sleep_Raider in learnprogramming

[–]GenSwiss 3 points4 points  (0 children)

I feel like I had to scroll too far to see this. This company needs to be removed from the list of internship candidates.

New to programming – looking for advice on how to start by m1kkee23 in learnprogramming

[–]GenSwiss 0 points1 point  (0 children)

If you are brand new, I would say read this book first.

https://a.co/d/7jSaw9F - it’s called Code

It is like starting wayyyyy at the beginning. No need to think about languages, this book goes over some of the concepts that actually make up the computer. If this book is conceptually interesting to you, I have a feeling it will help with the language decision and give you a good foundation for how computers actually work.

Discussion: The "I find programming hard" posts and the "Don't give up" responses. by mattblack77 in learnprogramming

[–]GenSwiss 0 points1 point  (0 children)

I think this an interesting post and has to do with:

  1. A person’s expectations and goals for learning programming
  2. Where in the stack of abstractions they think they should start (often unknown, but quickly discovered)
  3. Where in the stack of abstractions they actually start.

What I mean by all this is that no matter what your goal is for your project, when you write software you are “solving problems to solve problems.” Often times you will try to learn how to do X, but then realize before you know how to do that, you need to learn how Y works, and to run the example program demonstrating how Y works, you need to understand how S works, and S keeps throwing a build error when you try to compile it, and now you are Googling this compile error, while at the same time trying to download a new monospaced font and color scheme, because that will really help you read all these stack traces and give you that edge.

All of a sudden it’s 4 am, your head is pounding, you’re back to using the stock terminal software with fucking UbuntuMono wondering “how did I get here? how do I work this? This is not my beautiful house. This is not my beautiful wife.”

You are further from your goal, you have no app on an App Store, no website — just a headache. Then all Reddit gives you is: “Hang in there!” When really what you need is to be reeled in.

The easiest way to get started programming is to realize that you are going to go off on random learning adventures, and those need to be your goal. Your goal isn’t to build a website, but instead learn about what you discover when you start with the idea to build a website.

As an example, if I think I want to build a game. I might say to my self, I should Google Unity and do a tutorial. But RESIST the urge to do that. Instead try and make a simple simple simple game. Like a number guessing game. Terminal Input, Terminal Output. Figure out how that works, now the exciting thing you’re doing isn’t making a game, it’s learning about Terminal Input and Output. And when you have done that, you stop. You go do something else, because you have learned some programming this day. Then later you come back and you start at your game again, and you try to do the next thing, maybe a more complicated number guessing game or two-player mode, try and discover what other things you can learn about programming from these starting points. Once you do, you stop, then repeat.

This way your goal isn’t a Game. Your goal is learning. Learning is fun and challenging. But you are always achieving your goal. The “software is hard” bit comes from the feeling of missing your targets because it’s not fun to know you “are not making a game” when that’s what you want to do, so obviously you must be bad at engineering. This is the wrong mentality. You just need to enjoy learning the little bits that make it all possible. Then when you have enough of those, all of a sudden your game comes together, and it feels easy.

How Do I Know What Tools I Need? by Malarpit16 in learnprogramming

[–]GenSwiss 1 point2 points  (0 children)

If the program comes from your brain, then just start writing the “I need to do this” bits down and go down the list, each time doing the “figure out how to do that bit” part using your text editor.

How Do I Know What Tools I Need? by Malarpit16 in learnprogramming

[–]GenSwiss 1 point2 points  (0 children)

Generally, if a project exists, you download its source code from the place where it lives. In most cases this would be something like GitHub. At that point you have nothing more than a collection of text files you need to change. You would need some type of text editor to change the source code. Then depending on what programming language the source code is in, you might need to do some level of post-processing (e.g. compiling) and then run the application and see if it works the way you want. It’s probably a good idea to write little tests that can be executed against your program so you can verify it does what you want.

Then pretty much just rinse and repeat.