|OT| Programming - Print("Hello "+ metacounciluser[yourID] + "!");

C-Dub

Makoto Niijima Fan Club President
Dec 23, 2018
3,992
11,886
113
I’ll have to put learning on hold for the time being. I’m still recovering and doing a full day’s work for a week is killing me by Friday.

I might have to go off sick again because I’ve obviously not fully recovered. Trying to get through work today was dreadful.

I’m thinking more for the future once I’m back 100%. Even then, finding the time and energy is hard…
 
  • Hug
Reactions: lashman and Deku
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
I really need to find projects to do also in. python, something simple to teach myself but also to have a "start" of a portfolio to show now that I have to find a company.
 
  • Like
Reactions: lashman
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
So Im playing around with Python and pygame, I have a resolution for it all but. I want the actual "game" be in a smaller area, meaning I have background image and then a surface element, but how do I limit movement and everything game related to just that area?

If anyone has any experience with any of that.:)
 

low-G

old school cool
Nov 1, 2018
912
1,745
93
I really need to find projects to do also in. python, something simple to teach myself but also to have a "start" of a portfolio to show now that I have to find a company.
Python & AI go hand-in-hand, and I suspect that would guarantee you success in landing a job. AI is a vast unexplored space, everything is starting on the ground floor, it's caveman days. Any shmo can come up and make a big difference, or become the next God.

My first ever python project a few months ago was writing a web scraper for data to train an AI on for personal use. But there are a lot of AI repos that it's very well worth your time tinkering around in. You don't need advanced knowledge at all because the fruit is immensely low hanging here and there.
 
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
After spending three weeks at a programming school doing the entrance exam to see if I should start there, I kind fell in love with the way they programmed. They only used shell and vim to do everything and all programming was done in C. While I might want to learn more gdscript I still would love to use shell and vim. Anyone have experience with customising stuff like that? I did install just a theme for it to make it look colorful lol. One can open gdscript files just fine but it doesn't have syntax support.
 
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
Vim in it self is not that hard, well in the limited way that I used it, it's like using a DOS era text editor. Its more that I want it to colorise Godot syntax, I can still edit the code just fine.

I did mange to run Godot through the terminal lol, but it seems little buggy at the moment, or I just don't know how to fully use it.

Look how hacker I am lol with my fancy terminal.


 
  • Like
Reactions: lashman

ganmo

My Neighbour Totoro
Dec 10, 2018
359
414
63
I enjoy using vim, or in my case neovim
Current favorite theme I'm using with it is one which is called bluloco ;)
 
  • Comfy
Reactions: Le Pertti

undu

Junior Member
Mar 17, 2019
201
510
93
After spending three weeks at a programming school doing the entrance exam to see if I should start there, I kind fell in love with the way they programmed. They only used shell and vim to do everything and all programming was done in C. While I might want to learn more gdscript I still would love to use shell and vim. Anyone have experience with customising stuff like that? I did install just a theme for it to make it look colorful lol. One can open gdscript files just fine but it doesn't have syntax support.
Shell with (neo)vim has been my programming environment for close to 8 years now. Neovim comes with quite good defaults regarding basic behaviour, compared to vim. This doesn't get you some good tools, like searching project-wide (text, or files), a git blame to understand when and why a line was introduced, or making it connect to an LSP server. All these needs plugins, and configuration. I have a public configuration for these, but it might be quite opaque if you don't know what the options are doing. You might be better off searching for tutorials. In any case I'm sharing it: nvim/.config/nvim · master · Pau Ruiz Safont / dotfiles · GitLab
 
  • Hug
Reactions: Le Pertti
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
I installed neovim, but don't fully understand yet how things work, I have to run it from its proper folder where it installed, but I thought it would be more like vim that you can use everywhere?
 
  • Blobxorcism
Reactions: lashman

Pommes

Hey you! Have a nice day!
Jun 4, 2019
433
848
93
I installed neovim, but don't fully understand yet how things work, I have to run it from its proper folder where it installed, but I thought it would be more like vim that you can use everywhere?
You should normally be able to use NeoVim with the command nvim from everywhere just like Vim.
Perhaps you need to add it to the Path or something similar?
 
  • Eyes
Reactions: Le Pertti

ganmo

My Neighbour Totoro
Dec 10, 2018
359
414
63
I installed neovim, but don't fully understand yet how things work, I have to run it from its proper folder where it installed, but I thought it would be more like vim that you can use everywhere?
assuming you are in linux, or macos, and you have installed neovim with some package manager, then you should have nvim command available. I added alias, so that I can open it up with vim . Neovim pretty much the same as vim anyhow. If you are a hardcore user you maybe can spot differences. otherwise the biggest difference is that configuring neovim you use lua instead of vimscript.
 
  • Eyes
Reactions: Le Pertti

ganmo

My Neighbour Totoro
Dec 10, 2018
359
414
63
Ive been changing and installing so much in my terminal so now even aliases don't work lol, hmh is there a way to factory reset terminal in Mac?XD
if you are in macOS then maybe you are using zsh, then your configuration for it should be in the .zshrc file I think, or .bashrc if you are using bash.
which terminal emulator are you using btw? I can recommend wezterm ;)
 
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
It was the .zshrc file that messed things up! But now I have everything working, even. neowin! Now I just need to figure out how to get syntax highlighting working...

Also got news from the programming school that I tried out for, didn't get accepted and I admit, it is bumming me out more than I thought. The trial was three weeks and in those I learnt more than I have ever before, so I was so hyped to see what I would learn in two years.

So at least I am trying to learn some C on my own now that I have the basics. Officially enrolled into the HarvardX CS50x introduction to computer science yeasterday and is seems great thus far!
 
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
Im curious, how did you all "get" programming? I keep learning and learning and it still feels like I have no idea what hell I am doing. Im trying to solve problems for the course Im doing now and most of the time it feels like I don't even know where to begin. :sweaty-blob:

What does your programming journey look like?
 

Pommes

Hey you! Have a nice day!
Jun 4, 2019
433
848
93
Mostly I did get into programming during my tertiary education.
I had some courses that focused on programming and some other courses where programming was used as a tool to solve some problems.
Besides that I did some programming on the side mostly to understand some things better or just for fun.

Since then, programming has been my job for the most part.

Overall it was and still is a process.

You may currently have the feeling that you don't know what you are doing.
But I am pretty sure that you already learned some things. E.g. you are probably much better at reading and understanding source code than you were before you started programming.

Concerning solving problems and not knowing where to start:
There I only have the standard advice to divide the problem into smaller problems and start from there.
 
  • Comfy
Reactions: Le Pertti

Parsnip

Riskbreaker
Sep 11, 2018
3,253
7,243
113
Finland
My journey is a series of fits and starts.
I tend to start, hit some kind of wall, lose interest, rinse and repeat sometime later.
 
  • This!
Reactions: Le Pertti
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
My whole life I have wanted to learn programming but always it was the same, started, hit a wall and then lost interest because I thought I wasn't good enough. But it feels different now, I am genuinely determined and keep trying and hoping I learn just a little bit more each time. I do realise that programming in its nature is problem solving and its supposed to feel like not really knowing how to do it.

You are right Pommes I do know much more now than before, even solved a problem today without even looking up anything! Sure it's a long list of whiles but oh well it works and it passed the criteria at the school.
 
  • Like
Reactions: Pommes

ganmo

My Neighbour Totoro
Dec 10, 2018
359
414
63
Im curious, how did you all "get" programming? I keep learning and learning and it still feels like I have no idea what hell I am doing. Im trying to solve problems for the course Im doing now and most of the time it feels like I don't even know where to begin. :sweaty-blob:

What does your programming journey look like?
For me, programming started with creating small websites that offered links to download emulators and ROMs. Back then, web development wasn't even considered real programming, and people would laugh if you said you were 'programming' a webpage.

:geek:
 
  • Comfy
Reactions: Le Pertti

low-G

old school cool
Nov 1, 2018
912
1,745
93
Im curious, how did you all "get" programming? I keep learning and learning and it still feels like I have no idea what hell I am doing. Im trying to solve problems for the course Im doing now and most of the time it feels like I don't even know where to begin. :sweaty-blob:

What does your programming journey look like?
I'd be kind of curious to see an example problem in your coursework and give advice how I'd approach it or what sort of 'thing' you may be missing (is it knowledge of concepts, is it the way you're thinking about things, or are you simply worrying too much about an ideal solution?).

I started with BASIC-based language as a child, making text based adventures. I just did a lot of different stuff throughout the years. Non-programming type stuff like writing HTML kind of does get you familiar with programming because you're thinking about syntax and how information is read by machines. Creating maps for the original Doom made me think about concepts such as texture alignment etc. I think there's a lot of ways people can approach programming from the sides, that may not include programming or even scripting at all.

People can approach these problems from all different directions.

And now as a software engineer I still think of things relatively basically at first, as high level basic concepts. I'll have, or need to have, familiarity with the data involved, basic inputs and outputs to whatever system. From there, I guess you might say I have a general idea from high to low level all the abstract things you can do with information, up to an extent -- all those common ways of reading and writing data, and all the things you can do between -- are the things that make up the knowledge of engineering.

Example might be, 'oh we want to find when the input includes certain words'. Regardless of the language, a regex pattern is probably involved. If it's something particularly complicated and you have lots of resources, maybe you start thinking modern ML implementations like a similarity comparison or even using a LLM. Within each of the needs and potential solutions there are countless permutations of how you might go about implementing a solution. Knowing which ones are best, especially in the long term, are what makes a better software engineer.

And knowing the cutting edge stuff, like having an idea what sort of AI model architecture might solve some previously unsolvable problem, is what makes a researcher or scientist working on the cutting edge. I use the term AI because I'm not really aware of what other cutting edge areas aren't something that might be being worked on by all but a few dozen people in the world otherwise -- maybe like a new CUDA routine for an upcoming unannounced GPU, etc.
 
  • Comfy
Reactions: Le Pertti
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
low-G you're right, it happens a few times that I think something is going to be impossible to then see that it was pretty simple.XD Right now I am doing a problem where I have to write function for a voting program, that not only counts votes but has to eliminate the one with lowest votes, then take the second and thirst options in the ballot and recount until there is one clear winner. :sweaty-blob:

Essentially these functions I have to write. Working on the tabulate one now.

 
  • Like
Reactions: low-G and lashman

low-G

old school cool
Nov 1, 2018
912
1,745
93
low-G you're right, it happens a few times that I think something is going to be impossible to then see that it was pretty simple.XD Right now I am doing a problem where I have to write function for a voting program, that not only counts votes but has to eliminate the one with lowest votes, then take the second and thirst options in the ballot and recount until there is one clear winner. :sweaty-blob:

Essentially these functions I have to write. Working on the tabulate one now.
The hints there, without any other context, are definitely confusing at first read! I think I see what they're trying to teach you though. This will be directly applicable to video game scripting / programming, if nothing else.

I wouldn't feel bad being confused with this, it's the type of thing you'll just have to sit down and grind away at and also probably iterate upon.
 
  • Hug
Reactions: Le Pertti
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
I was struggling almost two days trying to understand how to writer a certain function... only to conclude that is was kind of simple ! Or I think I have done it as its supposed to be, can't test the program before Ive written all functions.

C:
 bool vote(int voter, int rank, string name)
{
    int i = 0;

    while (i < candidate_count)
    {
        if(candidates[i].eliminated == false && strcmp(candidates[i].name,name == 0)
        {
            preferences[voter][rank] = i;
            return true:
        }
        i++;

    }
    return false;
}
 
Dec 5, 2018
1,749
4,328
113
If I'm reading this right (since i don't know the specification), you're storing the candidate index (position) in case it's still active in a matrix indexed by voter/rank ?

Also, you're missing a parenthesis between name and ==
 
  • This!
Reactions: Le Pertti
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
If I'm reading this right (since i don't know the specification), you're storing the candidate index (position) in case it's still active in a matrix indexed by voter/rank ?

Also, you're missing a parenthesis between name and ==
Thanks! Yeah I also missed one where I put : in stead of ; lol

But yeah as I understand, I have to store the voters candidates, they can vote on three candidates and I have to store the placements of those for that voter. There is another function that iterates through the voting process, this function just has to store the values, which I believe I have done. Took so long to even know what I had to do.XD
 

low-G

old school cool
Nov 1, 2018
912
1,745
93
I was struggling almost two days trying to understand how to writer a certain function... only to conclude that is was kind of simple ! Or I think I have done it as its supposed to be, can't test the program before Ive written all functions.

C:
 bool vote(int voter, int rank, string name)
{
    int i = 0;

    while (i < candidate_count)
    {
        if(candidates[i].eliminated == false && strcmp(candidates[i].name,name == 0)
        {
            preferences[voter][rank] = i;
            return true:
        }
        i++;

    }
    return false;
}
Yeah and I can understand why that might take a while because they want you to learn specific lessons, based on those hints I can tell there's a certain data structure they're giving you which makes sense here too. These are important lessons.

IMO, it eventually gets easier -- and a lot more fun -- when you're designing something from scratch, because you can make a solution to an overall problem like this (this whole voter preference tallying thing) that makes sense to you, at least at first, and then alter it, improve it, etc.
 
  • Hug
Reactions: Le Pertti

EdwardTivrusky

Good Morning, Weather Hackers!
Dec 8, 2018
7,404
12,494
113
A wild and possibly inappropriate and possible tangent so forgive me but i'm not sure where else to post it but does anyone else here use Unreal Engine and Visual Studio integrations in a multi-user environment? As in multiple users on a single PC all of whoim use UE5 & VS?

Epic are full of super clever people but their actual installation and engineering are definitely geared towards "one spod, one machine".

We have an issue where UE5 and VS create files and folder within the Unreal Enging folders and set the permissions to the user who first created the project meaning the next user to login and try to use UE5 gets an error as windows security says they have no rights to the files.

Does anyone know of a way to tell UE5 or Visual Studio NOT to touch our compile files within the UE5 folder and instead maybe copy them to the project instead?

Is there a different compilation option we can set instead of me writing a powershell script to run at logoff which find and identify files that have been changed and set windows permissions on them so other users can use UE5 & VS?

Please contact me via PM if the answer will derail the thread.
Or tell me if there's a better place to put this for visibility and i'll move it gladly! :)
 
Last edited:
  • Like
Reactions: lashman
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
I finally finished the last problems on that weeks set of problems! It only took me two weeks lol, I had to use chatgpd at the end because I didn't fully understand what wasn't working.

What was the biggest was to add a break command to this function and everything work. I think I understand why but also I dont fully understand? Doesn't the break close the whole function? Wouldn't that make the function misbehave, but now it is like it just restarts the loop but with correct i value.

C:
void tabulate(void)
{
    int i = 0;
    int j = 0;
    int c = 0;
    while (i < voter_count)
    {
        while (j < 3)
        {
            c = preferences[i][j];
            if (candidates[c].eliminated == false)
            {
                candidates[c].votes++;
                break;
            }
            j++;
        }
        j = 0;
        i++;
    }
    return;
}
}
 
Dec 5, 2018
1,749
4,328
113
Doesn't the break close the whole function? Wouldn't that make the function misbehave, but now it is like it just restarts the loop but with correct i value.
The break exits the closest loop.

A more elegant solution is to either do the (opposite) condition with an && in the loop OR to store the result of the condition in variable and check it in the loop (both things are the same but it's more a matter of style).
 
OP
Le Pertti

Le Pertti

0.01% Game dev
Oct 10, 2018
8,620
22,144
113
45
Paris, France
lepertti.com
Phew struggling so much with the course Im taking, it's the last C exercise and help! Had to use chatgpt to even know where to start. I have to do structs, hash tables, linked lists and such. Im so lost in all of that.

Thankfully next is Python and should be little breather.

I do also realise that using chatgpt is not helping me at all to learn, that I'm just cheating myself. :crying-face:
 
Last edited:
  • Hug
Reactions: lashman

Parsnip

Riskbreaker
Sep 11, 2018
3,253
7,243
113
Finland
I do also realise that using chatgpt is not helping me at all to learn, that I'm just cheating myself. :crying-face:
I suppose it depends a bit on what exactly you are asking from it.
I would expect that some people would benefit greatly from having some programming concept "talked out" with them instead of just reading them from a documentation or something. A conversation with someone can help even if the other side of the conversation is a LLM bot.
 

low-G

old school cool
Nov 1, 2018
912
1,745
93
I suppose it depends a bit on what exactly you are asking from it.
I would expect that some people would benefit greatly from having some programming concept "talked out" with them instead of just reading them from a documentation or something. A conversation with someone can help even if the other side of the conversation is a LLM bot.
Very true, I dunno if this is known everywhere but it's called 'rubber ducking'. Being forced to explain something to someone or something forces you to pay attention to every aspect of your problem and what resources you have -- that's something people almost never do naturally. It's a skill that you build up.
 
  • Like
Reactions: lashman