Codebl - Tumblr Posts

1 year ago

When to add delta in GoDot?

So I am slowly eating my way though the tutorial for GoDot. I already have some experience with moving things in space and calculating inputs for individual objects.... That is essentially half of robotics software. So in every frame, a function called _process is called. this function takes a number called "delta", which is the amount of time passed since last frame ins seconds (Usually close to 1/30 or 1/60). You add delta to the calculation of certain variables. The first example usually found is position, which is done like so:

position += velocity * delta

To me that was all good and obvious. But I found a lot of posts of people being confused when to multiply delta and when not to. And apparently doing it in wrong places is a quite common bug in GoDot games. Here is to figure it out! Think in term of units

Velocity is distance/time Position is distance

So you cannot add velocity to position. They are 2 different units. How to fix this? Remove the time component.

Since time is distance is divided by time, we simply multiply time onto it. You know what have the unit of time?

delta is time

Meaning it is obvious why you need delta in the line! :D position += velocity * delta

Because distance += distance / time * time


Tags :
1 year ago

I am so happy for you! Congratulations! I hope it will be an awesome place to work!!!

Here is a good tip for whenever you join a new company, no matter which number of job it is for you

Write down things you wished to had when you started. List of Libraries to download, instructions, tutorials in how to do things, set up ID. Virtual machines...Whatever.

And then offer to your supervisor after some months that you spend a few work-hours making those ressources.

From then on, make it a task of every new hire to update this packet.

That way it comes easier and easier to be a newly hired person at this company.

This trick takes advantage of the fact that YOU are right now the best and most experienced in the company at "Being the newly hired person", and so are by far the most competent to do this.

First day at new job!

First Day At New Job!
First Day At New Job!

Monday 8th January 2024

OMG today was the best! The new job’s office (not in the picture background, I'm at the doctor's there...) has so many cool chill people in it, so far I wanna stay here forever!

Had induction meetings, and a tour around the office, everything was so cool! Another 2 people joined so I wasn’t entirely nervous thinking I’m the only one who would be confused on the whole onboarding process. Work’s in an old-like building with a Grunge aesthetic vibe going on, absolutely love it! And music plays in the background which is so much better than the old job which was in complete silence 🤐

I'm just super excited to start working on the project + the team seem, and are, super friendly and helpful! Thank God for a smooth process getting here, yay!

New Years Resolutions #3: Work hard and do well in new job!

First Day At New Job!

Tags :
1 year ago

This is freaking amazing. And I think you are making good choices in simply cutting away what is not working so you can make your deadline.

I am still curious though.

Power banks are freaking temperamental little bitches ( There is NO standard for when they should give charge, other than the vague " When a phone is connected" ). How did the environmental sensor not like it?

And did the programmable RGB have a datasheet to explain the logic of how to address LEDs?

And would it be possible to adjust the addressable LEDs by powering them with a PWM signal? ( IE, is it powered by 5V? )

Servo skull integration is underway!

I have run a few tests and the core functionality seems to be working fine - so I can press the button and it'll take a picture with the camera embedded in the left eye socket, briefly illuminating an led that's in the right eye socket and playing a buzzer briefly.

The green led turns on when the program I wrote is running, and if it's connected to a network the orange led will also turn on(so I can tell whether it's accessible to get the pictures off of it)

So it should be all good for MCM London on Saturday at this rate, just need to check that the cranial casing for the left hand side won't affect the picture too much

Servo Skull Integration Is Underway!
Servo Skull Integration Is Underway!

Had to remove the environment sensor as it didn't like that it was being powered from a power bank - so no temperature alert when it gets too hot for me(It was going to light up the remed if the temperature got above 30°)

Also had to take off the programmable RGB array, as whoever wired that integrated circuit was clearly on a great many things when they designed it - Trying to just access specified lights was madness. The first led was accessed through (0,1) whilst the 2nd was (1,1) and the third (6,0). And having all of them on made it looks like the skull was about to self-destruct with how bright they are


Tags :
1 year ago

"I want to make games, but that requires programming skills and"

No. Just like starting to draw requires no skills, nor does making software of any kind.

Will you make great art on your first try? No. But you DID a thing.

Use the hellmachines that is machine learning for something useful. Go to chat GPT and ask it to make a simple game in html, cs and javascript.

Copy paste that into a notepad file, save it as "mygame.html" and open it with a browser. Any browser.

Bam. You have a game.

It is the equivalent of a stick figure drawing with no perspective, but it exists! Its creation is equivalent to tracing a drawing BUT IT EXISTS!

Now do it again, with less help. Figure out what different parts does by turning them on and off.

When you have questions, google them. If you have questions you do not know how to google, find communities and ask them.

You can do it! You can make things! Please make things! I want to see all the crazy stuff you will make!

“I want to write/draw/play music but I don’t know how”

Listen to me. Every creative endeavor is a leap of faith. It is flinging your soul off a ledge into fog and hoping you’ll land. There is no plan for that story you’re going to write. There are no directions for that space ship you want to draw. There is no sheet music for the song you haven’t yet written.

Making art is about accepting that you are plunging forward into the unknown, and using that to discover both yourself and your destination.

You don’t know how to write a story? Just do it! Go for it! There are no rules, friend!

You gotta make that leap.


Tags :
1 year ago

Fun fact, those two methods are NOT just different syntax for the same thing.

"If" Checks a condition. It compares it with something else. If you have a chain of many if/if else/if else /if else statments, the last one will only check its condition AFTER all the others have done so and failed. The if statements further down will be run with a delay compared to the ones further up. Only small, but real.

A switchcase runs every option with the same delay. No matter how many there are.

Because it uses its input, together with a constant, to get the correct memory place where the instructions are stored for the case, and jumps there.

It works by the compiler placing all the options in predictable memory so this method work.

So the swirch case does not compare its input to anything, it turns it into an address and goes there.

So the delay on every case is the same.

This can be important, if you are using the current time to measure time down to the micro or nanosecond, which is quite normal to want when you work with embedded systems :D

But rarely when working with higher level languages!

Its neat!

You Know You Wanna Use It So Why Dont You?

You know you wanna use it… So why don’t you?


Tags :
1 year ago

SQL nearly always.

SQL is based on relational algebra, meaning you have a mathematical garantee for data validity.

And it is well tested, and many automation tools to do it for you. No-sql sacrifices that. ( Note, any category which starts with "no-" is a badly defined category. Always"

No-SQL really only have a use-case when:

1: Your database is so big it needs to be on multiple servers and cannot be broken down to smaller databases

2: You need the database to sync very quickly within itself.

If both of those are true, then SQL might not be the right choice.

And... 99% of databases do not need this. Unless you are making Facebook, twitter or similar you have no need for this.

No-SQL is mostly a bad choice being pushed by Google and Amazon selling cloud solutions ( "cloud solutions" meaning "You have no right to know anytjing about how we store your users data" ) which is done so the big corporations do not have to put too much work into their services and to keep their users ( developers ) in the dark about what is actually happening.

It is much easier to steal your users data when they have no idea about access and what is stored where. Google SPECIFICALLY writes that they WILL access the data you store on their cloud solutions for "business purposes".

Learn SQL, it is not hard, get a automation program to set up your database on a server you actually control. Which can include renting server space.

That is not only the cheaper and more efficient solution in nearly all cases, it comes with the added benefit of not selling YOUR users out to big corp.

If a corporation say they take good care of your data, and use Google, Amazon or certain Microsoft services... they are lying.

Software engineers, how often do you find you’re using SQL vs NoSQL solutions for your systems?


Tags :
1 year ago

I love being at work and in a good mood.

Whistling happily as I look up the contact information of work safety authorities so i can hand in my firms insane and careless breaches of basic safety.

The process for setting up hardware that can kill you is: "Whoever can do it. No knowledge or training required. The checklist for what to do is inside the heads of some people in the firm... Probably...maybe, and if those people randomly are near they will tell you what they think they remember they know"

I had a hardware setup that KILLS YOU if you touch the wrong parts. And it had been running FOR A MONTH before someone said "I... seem to remember us being told that the rules say you have to print and fill out a risk assessment and hang it on the safety rail?"

Goodie!


Tags :
1 year ago

When if your job is mainly about your network... then you are part of the leadership we can fire with no real longterm consequences.

Cut the fat. No firm should need "An aristocrat, because the other aristocrats will only deal with us when we hire an aristocrat to make bigger decisions"

No. Like a programmer who writes badly so no one but him can maintain it: "Fire them quickly, because every day you wait it will hurt more"

Just fucking fire the CEO, and most likely the majority of the next 2-3 levels of managment too.

Did you know people thought a country could not be run without a government? So even if the government is corrupt it is at least better to have than no government... and then Belgium just did not have one for almost two years... and they were fine.

They. were. not. Needed.

"Networking is how you get a good job" I am killing myself dawg


Tags :
1 year ago

Correct!

And they are called microcontrollers and they are my robot babies and I love all of them and their weird quirks a lot!!!

I can't help but feel like there is a fascinating realm of Turing incomplete programming languages to study, where so much more is decidable in terms of optimisation and verification. Surely we don't need always Turing complete formalisms to transform the results of a database query into a webpage? etc.


Tags :
1 year ago

If the coding convention is not enforced with auto-formaters, it does not exist. If someone wants all the code to be written in exactly the same way every time... then get a machine to do that. Doing the same thing every time is what computers are good at. Set up a autoformater. If that is too much work. Then they have just said it is not very important, which means it is not very important. What IS very important is to make your code readable. Developers spend ~80% of their time READING code. So make THAT part easier. The code should fulfill its functional and performance requirements, after that, it should be made as easy to read as possible. It should take the reader from high abstraction overall idea and/or program flow, to more and more specific, so you can quickly get a overall idea and then deep dive only in the thing you are looking for right now. It should only use acronyms that it have defined in comments at the top of the file (If that is too much work... then do not use acronyms) If the code can only be understood with knowledge from outside the codebase, then that must be documented in a MD file. Nothing fancy, just write the thing down. If you cannot explain it in text, then make a diagram (I recomend draw.io). Easy, quick, no the specific style does not matter, just make it easy to read.

there's just a lot of "if everyone adopts my particularly tortured way of coding, everything will be great" going on, when 90% of the time this is extremely stilted and adds instead of reduces complexity. and you just don't have to do that. you can code normal style and nothing bad will happen


Tags :
11 months ago

Wooooo!

Endless congratulations!

May you learn loads and loads and find it wonderful and interesting! :D

I am officially a frontend developer 🥳✨

I still can’t believe I’m in the tech industry now 😭🤍🤍🤍

I Am Officially A Frontend Developer

One step closer to software engineering 🤍🤍🤍

This role doesn’t give good 💰 but the tech experience is what I want right now.

And I will keep searching for better jobs but for now, that's better than doing nothing.

2025 will be the year of backend and software engineering and also studying business more 👩🏻‍💻✨


Tags :
10 months ago

I hope it all works out for you!

I hope you find answers to all your trouble and your workflow gets smoother!

I hope you find cheatsheets to help you and manage to write notes that helps you remember!

bitch java is so fucking annoying why does the S in String need to be capitalized but the i in int has to be in lowercase??? why do you need to import a whole ass module just to take an input from the user??? why are all the commands so fucking long and hard to remember??? JUST DIE


Tags :
10 months ago

And we sometimes forget that we create those limitations. For example, nearly all robots with cameras use red, green and blue sensors...

Despite... they don't have to

every single thing involving a computer is designed to put something into our senses. until a human looks at it, and interprets it, it is nothing. it isn't 'data'. it isn't 'ones and zeroes'. it's just some electrons and photons moving around, as is their wont.

but if we arrange those electrons just so, and let them do their thing, we can create a pattern that someone will experience as bits, registers, numbers, letters, instructions, algorithms, messages, financial transactions, videos, thoughts, worlds, etc etc.

the whole project of computer programming is corraling the electrons into situations where they will obey rules we have in our heads. electrons are surprisingly predictable, so this isn't a fool's errand. but every layer of the stack of abstractions is something we built: arranging one thing to produce a pattern we want to see. the chip arranged so the 'high and low voltages' fit our idea of 'bits' and 'logic gates'. the screen whose lights create a 'field of colour' for an organism that has this level of visual acuity, this frequency response in its cone cells, this capacity to see shapes and edges. these bits and logic organised into an 'algorithm' that takes 'data' that we think of as 'vertices' and 'triangles' and produces the appearance of 'perspective rendering', which approximates our concept of a '3D object', of even a 'virtual world'.

we have gotten so very very good at producing these patterns that it's easy to see them as something natural, and miss all the layers of orchestration behind even the simplest operation. computers are a game played between humans.


Tags :
9 months ago

This is... SUCH an accurate way to describe what working with programming is like

And fun fact!

We work very hard to make the computer MORE whiney.

We want it to check EXACTLY what is going on and start crying about very specific things so those errors does not end up in the release!

computer: I can't icanticanticant do it...I need CoolLibrary where's CoolLibrary I can't find it ;m;

me: uh, lemme check..

*rummages through the filesystem*

me: ...aha !! see, we got CoolLibrary right here !

computer: b-but..but it's...it's the nnneeewww CoolLibrary >:c I want the oooolllddddd one !!!!

*me, writing 'old' on a label and sticking it to CoolLibrary*

me: here you go, honey, how's this ?

computer: yippee !!! yaaayyy !!!! ^w^


Tags :
9 months ago

Being an engineer means being a professional and using correct technical terminology!

It is "Gas driven high impedance issues with the hardware."

Not " I forgot to plug it in "

To be fair, a lot of goofy-sounding rocketry/aerospace terminology has a legitimate nomenclatural role beyond just being silly euphemisms.

"Unplanned rapid disassembly", for example, exists as the necessary counterpart to planned rapid disassembly: sometimes a rocket is legitimately supposed to fall apart or blow up, so you need a specific term to emphasise that it wasn't supposed to do that.

Similarly, "lithobraking" was coined by analogy with aerobraking (shedding velocity via atmospheric friction) and hydrobraking (shedding velocity by landing in water), and it does have some intentional applications; the Mars Pathfinder probe, for example, was deliberately crashed into the Martian surface while surrounded by giant airbags, and reportedly bounced at least 15 times before coming to rest.

(That said, aerospace engineers absolutely do use these terms humorously as well, because engineers are just Like That.)


Tags :