Recent comments in /f/programming

Melba wrote

Assuming that you want a proper ide the most convenient is probably platformIO for whichever supported editor you prefer. It supports the Arduino and Espressif frameworks and all relevant architectures. Obviously there are a bunch of different Arduino boards and in turn countless clones but these days there's a Arduino framework for pretty much any chip/architecture that isn't strictly aimed at industry, so just get whichever development board you can find laying about that has onboard usb to serial. If you want to do wifi stuff then something with an ESP8266 is easy to get a hold of. It's like 10 years old at this point so there are some limitations but it's got a plenty capable single core 32bit processor and enough memory for messing about and learning. A newer alternative would be any of the ESP32 variants.

Hopefully that's neither too much nor too little information :)

2

zip wrote (edited )

depends. if I just want to get something up quickly to see smth I'll use JavaScript. if I want smth to run fast I'll use Zig or C. If I want a compiled program with a decent type system I'll use Kotlin or D. If I want to write something elegant I'll use Haskell. If I want to automate stuff I'll use Python or shell.

2

MountainMan wrote (edited )

I think a fun and useful one is writing a Lisp interpreter/REPL. Not only will you learn a lot about the language you're programming in, you'll also learn some Lisp which itself will expand your mind as a programmer.

1

ApocalyptoSoldier wrote

How do you feel about game design?

There's a open source multiplayer tank game written in c++ that hasn't had a release in almost 16 years and hasn't had a code commit in almost a decade.

I know c#, JavaScript, and x++ (exclusively used to customize the Microsoft Dynamics ERP platform) and started recreating it in Unity, but I'm having a hard time understanding the existing logic because the syntax is just so different from everything I know and the code isn't nearly as thoroughly commented as what I write. The only things I've managed to port to Unity are the heightmaps and some of the blender models. I haven't even been able to compile the c++ code because I'm not sure how to make includes work.

I should probably just take the time to learn c++, but I kinda lost motivation after I couldn't decide which part to tackle after getting tank and turret movement working.

The models and textures haven't been updated in 14 years, which really shows, but I think that gives it a certain charm and I'm guessing would help it run on low end systems.

site: http://www.zeroballistics.com/

code: https://sourceforge.net/p/zeroballistics/code/HEAD/tree/

1

hobomobo87 wrote (edited )

ask yourself, what do you want to learn? what kinds* of tools do you need to make your life easier? what projects do you wish were written in a different PL? why are you learning [language]? for what purpose do you wish to use [language], once you're experienced enough with it? etc etc

basically, be practical about it. i could suggest dozens of different kinds of projects for you to start, but only you know what you really wanna do.

i personally don't like starting projects for the sake of starting projects, but you do you.

4

UberGeek wrote

So, you don't really need to know the specifics of "normalization" levels, just really to know they are various levels of "normalization".

Normalization is the removal of duplicate data contained in a relational database, such as mariadb.

In order to do so, for example, in a customer record, you could have the following columns:

  • First Name
  • Last Name
  • Street Addr
  • City
  • State
  • Zip

This DB of customers, would be 1NF. Because ZIP, City, and State are easily duplicated data, and should be held in their own table, like such:

  • City
  • State
  • Zip Code
  • ID

By teasing this out, and using a Foreign Key relationship, you've "normalized" the database.

The extreme side of it, city and state would be their own tables, and the ZIP used as a sort of foreign key.

The problem with extreme normalization is your queries will, in fact, become quite complex, as you need to join across many tables, to form your queries, which necessitate heavy use of views, rather than ad-hoc queries.

3

actuallyaseal wrote

When people ask questions like this I usually point to Wikipedia. So here:

Normalization entails organizing the columns (attributes) and tables (relations) of a database to ensure that their dependencies are properly enforced by database integrity constraints. It is accomplished by applying some formal rules either by a process of synthesis (creating a new database design) or decomposition (improving an existing database design).

The actual definition of the forms are better defined there than I could ever do myself. I actually usually have to look up what each form is myself if I ever care.

My question is why are you asking this?

If it's homework you'll be better off opening your textbook and copying that.

If it's for this and this is your first time using a database, I wouldn't worry about it. Just get use to the idea of creating tables and querying them. You'll make all the common mistakes but gain the context required to understand why normalization is a thing. Then you can go through and normalize things.

5

ThatJay wrote (edited )

I am a self employed programmer who was self taught mainly and is currently 2nd year uni. there are many things, mainly professional things, that I did not learn by myself.

for example, I am an extremely cheap dev for the business I'm contracting for. however, at the time of writing I did not know about automated testing and definitely did things that later on just kinda shot me in the foot.

so because of lacking of automated testing, say I change the backend database software to be from a tree of JSON files which get corrupted every now and then to a much more stable MariaDB server with protection against race condition (and therefore no more file corruptions). now, orders start undercharging and overcharging people because I reimplemented some math incorrectly. automated tests would've caught this, meaning bugs caught and fixed (generally) stay fixed.

i have become much more professional in my practices as I've learned more things. the business knew I lacked knowledge, but they also knew I was really cheap compared to other options.

1

ThatJay wrote

you'll need a job. get hired or be self employed.

however, to be self employed, you'll need to be more than just a first year software engineering student. you'll need to be professional in the way you organise and test things, doing the "boring stuff" as well as the actual coding. you'll need documents for specification, communication with stakeholders, automated testing, testing reports, etc.

1

ThatJay wrote (edited )

nice! i did a similar thing on GPU with OpenGL compute shaders. no collision detection, but collision was definitely an emergent property that sort of just came out of nowhere due to gravity between particles and also having many many particles lol.

1

OrIsThatSo wrote

Reply to comment by zip in Learning Batch Scripting is fun! by Cleariam

I don't use windows at my home neither, but most corporation and offices can't exist without windows so it's hard to just ignore their existence.

yet, Technically, you have WSL (Windows Subsystem for Linux) if you wanna use linux. It has mount to the C driver on the windows host, and is actually pretty good. WIndows these days include a whole linux kernel inside them. If you have the chance - give it a go. it's really nice when you have to use Windows but wanna have the familliar bash shell (or you can install like zsh or whatever).

3

wednesday wrote

Reply to by !deleted48827

other people already gave reasonable, practical advice. so i'll just add this, based on 25 years of working, volunteering and hobbyisting in IT:

working with IT and computers is the #1 reason i hate computers and technology. nothing about those things is good. the entire field is dominated by people who think they're cleverer, whether they're 'hackers' or 'founders' or just managers.

no one cares about the impact their work has on their users or on society. IT is far worse than other forms of 'engineering' -- and i put that word in quotes because i really find the idea of computing being 'engineering' quite laughable -- because it completely lacks any kind of ethical analysis or safety culture that other engineers take for granted. in fact, anyone trying to discuss ethics is likely to be laughed at and ostracised, and not in the good 'ethics are a spook actually' sort of way.

the entire field was created by and remains dominated by adult babies who think being able to write a computer program gives them some sort of God-like insight into society and the moral authority to do whatever they want because "hey bro, i'm just writing code here".

i absolutely detest the field i work in and would rather do almost anything else. i hate myself and what i've become every time i sit down to write code.

all of which is to say, while you might 'like computers and tech' now, you might change your mine after you see how the sausage is made.

... but of course we all have to make compromises if we want to exist in capitalist society, so you know, whatever; if you think you'd be able to make money from it, don't let me stop you.

1

GooseSyrup wrote

Reply to by !deleted48827

I am a software dev and the company I work for is pretty morally neutral. We make software that makes it easier for a certain sector to do their jobs more efficiently, and don’t rely on advertising, hijacking someone’s attention span, or making addictive algorithms to hook users. I am not super inspired by working here but I don’t feel bad about it either. I would say there’s a lot of software jobs like that out there, just don’t work for the big FAANG (or MANGA now, I guess) companies. Those big famous companies pay a lot but it isn’t worth me selling out my personal ethics. Heck, I am the weird one at work who won’t even use gmail because I think google is a terrible company.

Additionally, if you want to go beyond morally neutral and towards making a positive difference, there are jobs for that too (see https://www.techjobsforgood.com/). You could work at a non-profit, a start-up with an ethical mission, a company making software alternatives that respect folks’ privacy and attention, etc.

Honestly as long as you stay away from most social media and advertising-funded software companies I think you’ll do fine. Check out work by the Centre for Humane Technology and the Electronic Frontier Foundation if you’re interested in reading about this kind of thing. I also like some of the writing and interviews from Jaron Lanier about tech.

1

suk wrote

Reply to comment by araly in by !deleted48827

Just adding a couple of '+1's here.

As somebody who has interviewed programmers for jobs in the past, when asked why you left your last company, tell them about your experience with bigotry. It'll sort out good jobs from bad. If you get red flags during the interview thank them for their time and leave.

Also games, I've spent most of the last 20 years in games, and I second this 100%. Avoid a large game studio or anyone looking to get acquired. You'll just be a disposable asset to those people, and they will burn through teams until they end up rich or bankrupt. Small studios can be better. It all depends on who drives the culture, but that goes for every workplace.

2

suk wrote

Reply to by !deleted48827

I write code for a living. I've left companies that started to work with companies I don't agree with in the past with no problems. Nobody worth working with is going to have a problem with you having morals or being trans.

If it's something you can see yourself doing for a few years, go for it. If you avoid anything that attracts tech bros and other hyper-capitalist types hang you can create a space for yourself and develop transferable skills if you decide to move on later. Every sector has some programming attached to it these days so there are some cool niches if you want to avoid any specific sectors.

1

araly wrote

Reply to by !deleted48827

like probably other fields, there's a bit of everything, and programming has mostly men, so it's easy to find jobs with mysoginy and the like.

but programming also has a lot of very progressive people, and there's a ton of lgbt people. so don't worry too much, if you end up in a bad company, it's relatively easy to change, compared to other fields.

usually huge companies will have more of both worlds, and small companies will be mostly one of both worlds.

if you're talking about fields in programming, I'd say avoid game development in big companies, as that seems to be consistently bad.

2