• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

The Coder's Lounge

string555

Banned
1,373
Posts
6
Years
Venia Silente said:

Wow, thank you. XD

I guess I'm still having trouble not carrying over perl habits to C. it's common in perl to use a function by itself in an if, since just about every return value can be considered to be a boolean value.

C Knowledge++ :P
 
Last edited:
23,230
Posts
11
Years
  • Age 34
  • Seen today
Anyone ever had to deal with so called "AnsiString"? They're an relict of ancient Delphi versions only kept around for compatibility. Before the advent of UTF-8 in the Delphi world, they were pretty much the standard in any Delphi version, up to a point where normal Strings were actually just AnsiStrings, but with a different name. Later on Strings became UTF-8-Strings.

Now imagine you work at a company that is migrating code from an old Delphi version to a newer one and your company made the decision to continue using AnsiString.
 

string555

Banned
1,373
Posts
6
Years
Anyone ever had to deal with so called "AnsiString"? They're an relict of ancient Delphi versions only kept around for compatibility. Before the advent of UTF-8 in the Delphi world, they were pretty much the standard in any Delphi version, up to a point where normal Strings were actually just AnsiStrings, but with a different name. Later on Strings became UTF-8-Strings.

Now imagine you work at a company that is migrating code from an old Delphi version to a newer one and your company made the decision to continue using AnsiString.

Considering my username, you would think I could help you with that problem, but sorry. :P

I'm still suppose to be focusing on studying C programming, but the other day I dumped the contents of one of my executables to examine what assembly code looked like. After staring at it and not really knowing wtf it was doing, I decided to go off on a wild tangent for a bit and learn some assembly. So here's a sample written in Ubuntu 64-bit Intel Assembly:
Spoiler:

Since I haven't learned how to accept user input in Assembly yet, this is the most I've been able to do with it so far. XD
 

string555

Banned
1,373
Posts
6
Years
<p>Man that code needs some formatting. It totally broke lmao.</p><p>I did some x86 assembly using a library from school, but I have been wanting to get back into coding it. I had a lot of fun with doing it despite being so low-level and I'd really like to do it again. I kinda wanted to do code tutorials here but I don't know how much people would want to do it, and considering there's so many tutorials I'd rather do a generalized example rather than be language-specific.</p>

The formatting on that code looked fine on both my laptop and the desktop computer at my work, did you view it on a phone or something? :X

If you have Ubuntu on a system, you could get NASM for doing assembly. It has been fun, and for some reason it makes a lot of sense to me on how it works. I also heard someone say once that "Writing assembly code is as close as you can get to talking to your computer without taking acid". :P

That might be interesting to do code tutorials, but as you said you would need to collect up enough people that are interested in it.
 
23,230
Posts
11
Years
  • Age 34
  • Seen today
Considering my username, you would think I could help you with that problem, but sorry. :P
You should change your name to string[555]. And afterwards explain to me what String needs to have a fixed size of 555 Characters. :P

I kinda wanted to do code tutorials here but I don't know how much people would want to do it, and considering there's so many tutorials I'd rather do a generalized example rather than be language-specific.
If you need some encouragement: if I wanted to do a tutorial, I'd just do it anyway, regardless if there's people who care about it or not. If there are: fine, goal accomplished. If not: fine, at least I practiced my presentation skills a little.

It's also nice to have a thread with a little bit of depth from time to time.
 
296
Posts
11
Years
Hi everyone! I saw the announcement on the bulletin board for this thread, and thought I'd pop in and check it out. I'm in my first year of Software Engineering, currently learning C and Python as part of the program. I've also dabbled in HTML/CSS and Java. I'm still more-or-less a beginner just because I'm not good at self-teaching (I get easily distracted by shiny new things), but I've got a knack for logic and algorithms. Looking forward to learning from some more experienced coders :)
 
Last edited:
5,654
Posts
11
Years
How could I miss this place?
I've been programming for about 2 years now, mostly Python and Java. I also know basics from HTML/CSS and Javascript, but I didn't like them that much. This semester on university I also have Database Systems and SQL, which is fun.
I'm currently working on project for my Java class and probably will make my Bachelor's Thesis about usage of lambda in Java.
 
Last edited:
296
Posts
11
Years
C and Python are excellent places to start, honestly. C is a good way to work with pretty much any basic typing and expand from there, whereas Python teaches you strict code formatting (Or else it just breaks). Good choices, although I'm surprised that you're not starting with something higher-level like Java or C# so you can get a grasp on the general flow of programming before diving into something a bit lower-level like C. I wish you the best though! I tried self-teaching in programming at first and I didn't manage too well. It was once I had done some of it in school that I was able to expand and learn from that experience.

We do spend a lot of time writing pseudocode before doing anything in C, so we get the basic universal concepts of programming, and spend a lot of time on how things work "behind the scenes" which (for me anyway) really helps to solidify things. I think C was chosen because it's a lower-level language, and it's the one we're going to be using throughout the core programming courses (weeding out the weak? lol Really though, the professor and the (online interactive) textbook are both VERY good. So many students in the class complain about how hard it is, but they're almost without fail the same students who either talk through the whole lecture (it's a problem. I've never seen a professor have to stop a lecture so often to tell everyone to be quiet or straight up tell individual students to either stop talking or leave), or don't come to the lecture at all because "it's just the same stuff as what's in the textbook." Which is true in a sense, but I find I have a way better understanding after watching her physically write and trace code with pen and paper on the document cam than if I just used the textbook on its own).

(weirdly, my sister is also taking a course on C for her physics degree, but they're focusing specifically on things needed for physics research, so they're just plowing through it. Halfway through the semester she's asking me for help on things we hadn't even started to cover yet lol. So she knows more about the syntax and built-in functions, but I can write more complex programs and have an easier time debugging).
 

string555

Banned
1,373
Posts
6
Years
We do spend a lot of time writing pseudocode before doing anything in C, so we get the basic universal concepts of programming, and spend a lot of time on how things work "behind the scenes" which (for me anyway) really helps to solidify things. I think C was chosen because it's a lower-level language, and it's the one we're going to be using throughout the core programming courses (weeding out the weak? lol Really though, the professor and the (online interactive) textbook are both VERY good. So many students in the class complain about how hard it is, but they're almost without fail the same students who either talk through the whole lecture (it's a problem. I've never seen a professor have to stop a lecture so often to tell everyone to be quiet or straight up tell individual students to either stop talking or leave), or don't come to the lecture at all because "it's just the same stuff as what's in the textbook." Which is true in a sense, but I find I have a way better understanding after watching her physically write and trace code with pen and paper on the document cam than if I just used the textbook on its own).

So if you don't mind me asking, do you have an idea of what you want to do with that knowledge yet?

So far all my stuff has been self taught through books and lots of experimenting, but I bet when I (eventually XD) get into some actual schooling for it, that should really kick me into the next gear with things. Is anyone willing to be my sensei? :P
 
296
Posts
11
Years
So if you don't mind me asking, do you have an idea of what you want to do with that knowledge yet?

So far all my stuff has been self taught through books and lots of experimenting, but I bet when I (eventually XD) get into some actual schooling for it, that should really kick me into the next gear with things. Is anyone willing to be my sensei? :P

Well, I already have a degree in psychology (with a minor in anthropology). What I'd really love to do is put both degrees to work once I have software engineering and create software to help people with mental illnesses (and/or physical disabilities and/or chronic illnesses, etc.). Of course, it would be fun to work on things like games or visual effects engines now and then, but assistive software (which will likely also include AI to some extent) is definitely what I want to focus on.

But at the same time, I enjoy programming in and of itself, regardless of what I'm working on, so if I end up getting a job doing something totally different, I don't think I'd be too heartbroken. If nothing else my old job kept joking about hiring me back when I'm done so I can fix their sales system lol (I used to work for a place that does smart homes and custom electronics, which is a little too complicated for most sales systems to handle. They found a new one a few months before I left that almost does what's wanted but it's a little... well, buggy would be an understatement. I unofficially found myself in the position of testing any bug we found to get the exact circumstances it occurred under (partly because I just learned the software really quickly, partly because I was weirdly good at finding and replicating completely unintended use patterns that caused the bugs) and calling customer support to get the problem fixed. I'm not sure if they loved me or hated me but it did get to the point that most of the developers recognized my voice lol)
 

string555

Banned
1,373
Posts
6
Years
Well, I already have a degree in psychology (with a minor in anthropology). What I'd really love to do is put both degrees to work once I have software engineering and create software to help people with mental illnesses (and/or physical disabilities and/or chronic illnesses, etc.). Of course, it would be fun to work on things like games or visual effects engines now and then, but assistive software (which will likely also include AI to some extent) is definitely what I want to focus on.

I've thought for a good while that an AI could be good as a therapist. Like if the person has really bad social problems and won't even talk to a therapist, an AI could be used in place to help them with communication skills. But on top of that, it does seem really cool to create these kind of assistants to help people with other disabilities too, kind of like a seeing-eye dog but with even more capabilities. Good Luck to you on that. :D

But at the same time, I enjoy programming in and of itself, regardless of what I'm working on, so if I end up getting a job doing something totally different, I don't think I'd be too heartbroken. If nothing else my old job kept joking about hiring me back when I'm done so I can fix their sales system lol (I used to work for a place that does smart homes and custom electronics, which is a little too complicated for most sales systems to handle. They found a new one a few months before I left that almost does what's wanted but it's a little... well, buggy would be an understatement. I unofficially found myself in the position of testing any bug we found to get the exact circumstances it occurred under (partly because I just learned the software really quickly, partly because I was weirdly good at finding and replicating completely unintended use patterns that caused the bugs) and calling customer support to get the problem fixed. I'm not sure if they loved me or hated me but it did get to the point that most of the developers recognized my voice lol)

lol, so you were already doing a bunch of debugging before you really even got into programming. You're ahead of the game! :P
 
296
Posts
11
Years
I've thought for a good while that an AI could be good as a therapist. Like if the person has really bad social problems and won't even talk to a therapist, an AI could be used in place to help them with communication skills. But on top of that, it does seem really cool to create these kind of assistants to help people with other disabilities too, kind of like a seeing-eye dog but with even more capabilities.

We actually had a special lecture early this semester by someone from the Bremen Ambient Assisted Living Lab which was very cool and exactly the type of stuff I want to do (if a slightly larger scale than I was thinking). They're not doing anything live yet because they want to make sure the system is as secure as possible before putting it into practice, but it's basically a smart home with the goals of (a) being adaptive enough to accommodate any mental or physical disability (including a mixed group with opposing needs) without the need for training the user, and (b) being as unobtrusive as possible (hence "ambient" assisted living) so that the people living there still feel that they're independent and/or able-bodied people also living there/visiting don't feel weird using the technology. They've come up with some very cool things: a sink and mirror that automatically adjust its height to the user; a closet that can suggest what to wear based on the weather and planned activities, as well as showing you where the clothes you're looking for are; a wheelchair or walker that you can tell to park somewhere out of the way when you don't need it, and then call back when you do need it; I think my favourite was an infrared camera that picks up your gestures and lets you define "switches" and "sliders" anywhere you want - so for example, you can define an area on a side table as a "switch" that will let you turn the lights on and off, or a "slider" that will let you turn the TV volume up and down.
 
Last edited:

string555

Banned
1,373
Posts
6
Years
We actually had a special lecture early this semester by someone from the Bremen Ambient Assisted Living Lab which was very cool and exactly the type of stuff I want to do (if a slightly larger scale than I was thinking). They're not doing anything live yet because they want to make sure the system is as secure as possible before putting it into practice, but it's basically a smart home with the goals of (a) being adaptive enough to accommodate any mental or physical disability (including a mixed group with opposing needs) without the need for training the user, and (b) being as unobtrusive as possible (hence "ambient" assisted living) so that the people living there still feel that they're independent and/or able-bodied people also living there/visiting don't feel weird using the technology. They've come up with some very cool things: a sink and mirror that automatically adjust its height to the user; a closet that can suggest what to wear based on the weather and planned activities, as well as showing you where the clothes you're looking for are; a wheelchair or walker that you can tell to park somewhere out of the way when you don't need it, and then call back when you do need it; I think my favourite was an infrared camera that picks up your gestures and lets you define "switches" and "sliders" anywhere you want - so for example, you can define an area on a side table as a "switch" that will let you turn the lights on and off, or a "slider" that will let you turn the TV volume up and down.

:O

That's pretty damn awesome. It seems like the future homes they always showed in fictional media are finally becoming a real thing.

Back on the AI side of things more, I have liked the idea of interacting and playing with an AI in some VR environment. I could imagine a VR setup where everyone has their own avatar and an AI. They all interact with each other in this environment, and the AI can learn from each other and the other people. Maybe even have a bot school where people can drop them off at so they can learn more, with specialized learning that's better suited for them. Sounds pretty sweet to me. :P
 
296
Posts
11
Years
Back on the AI side of things more, I have liked the idea of interacting and playing with an AI in some VR environment. I could imagine a VR setup where everyone has their own avatar and an AI. They all interact with each other in this environment, and the AI can learn from each other and the other people. Maybe even have a bot school where people can drop them off at so they can learn more, with specialized learning that's better suited for them. Sounds pretty sweet to me. :P

That's a cool idea! I'm on the "we need to be super careful with AI" side of the debate, but it would definitely be cool to have an AI companion of some sort. I read a really good book a few years ago called "Wonder" by Robert J Sawyer (which I didn't realize until part way through was actually the final book in trilogy whoops I still need to go back and read the first two books) but basically it was about an AI that developed on its own and becomes friends with a blind girl, helps improve an experimental technology that will let her see (ish), then eventually spreads out across the world. It was really cool, because it was the first time I've read a book with a super-advanced-AI that isn't malevolent and is actively beneficial to humanity.
 
Last edited:

string555

Banned
1,373
Posts
6
Years
That's a cool idea! I'm on the "we need to be super careful with AI" side of the debate, but it would definitely be cool to have an AI companion of some sort. I read a really good book a few years ago called "Wonder" by Robert J Sawyer (which I didn't realize until part way through was actually the final book in trilogy whoops I still need to go back and read the first two books) but basically it was about an AI that developed on its own and becomes friends with a blind girl, helps improve an experimental technology that will let her see (ish), then eventually spreads out across the world. It was really cool, because it was the first time I've read a book with a super-advanced-AI that isn't malevolent and is actively beneficial to humanity.

Heh, I got my inspiration in a similar way through Jane in the Ender's Game series and Yui from SAO. :P

Your Psychology degree will really tie into this stuff nicely. Since you already know that stuff, I'm sure your familiar with the whole reward system do action/get dopamine release/associate good feeling with action, and all that blah blah that you already know. So this concept is essentially the same with AI machine learning. For example, you could give an AI a maze setup, and every time they step on a new square, it's worth +1. Then every time it steps on an old square again, it's worth -1. So after the AI has exhausted every possible path to the end of the maze, it can then figure out which path gives the biggest reward. The funny part about that setup is that if you add in a bunch of extra squares, it will go and step on those in it's winning path just to get the most reward points. XD

So that's machine learning in a nutshell, will you crack it open? :P
 
296
Posts
11
Years
So that's machine learning in a nutshell, will you crack it open? :P

lol I probably won't be working on AI unless I need it for something, so don't count on any major advancements from me lol

<p>Debugging is definitely one of the biggest things in programming, next to actually writing the code itself. I've come to learn how to use a small number of debuggers and that while they don't point out the problems (In most cases anyway), it can give you enough information to give you test cases in which you can ensure your code is doing as you want it to so that when you go through it at the end of the day using some form of test suite, it'll pass. One thing I see you have from this is that you're able to test a lot of edge cases, which often contain the most bugs and can be the hardest to find and/or fix. Having the ability to find, replicate, and report on those bugs is a big thing to have.</p><p>I'm writing an app and I have a lot of test cases I'm working towards fixing, but they're really arbitrary bugs and I can't seem to find a fix for them, let alone any particular cause. There's a few other things I want to patch up as well, but I haven't had the time to focus on coding throughout the semester, so I'm really looking forward to next semester when I can start using my laptop again for class and work on some kind of code or something in a text editor, because I'm getting really sick of doing math that I know I won't use fully.</p>

Ah, math. That's (part of) why I'm in software engineering and not computer science - less math lol (we do software design instead, much more up my alley). Not that I particularly dislike math, I actually kind of enjoy doing algebra and basic derivatives, but once it got to the point where I was having to memorize a dozen different formulas and basically do guesswork (trig identities. I hate trig identities so much) it wasn't fun anymore.
 
Last edited:
296
Posts
11
Years
<p>Yeah, I'm doing Linear Algebra, which covers matrix math, and that's actually a suggested course for our computer graphics class. I won't be taking it, but it's a required course for first-year students so I kinda need it :U</p><p>This math isn't particularly challenging - it's about making sure the small things don't skew your calculations. That's where I lose marks the most. I'm also taking statistics, and while it's not actually needed, the college decides to give that course to almost everyone, and honestly it's a waste of my time right now. I'd rather do other courses.</p>

Yeah, I had to take a lot of courses on statistics and research methods in psychology. The first course I didn't mind because we did the math by hand, but after that it was all poorly designed statistics software and I hated it.

That said, I do think it's good that your university has everyone take statistics, I wish mine did. It seems like one of those things you'll never need, but it's actually a really good thing to have a decent understanding of out in the "real world". Makes it much easier to spot mis-represented statistics in the news etc. I can't count the number of times I've had to explain "correlation does not equal causation", significance levels, standard deviation, sample size, etc. to people who will just go ahead and take statistical facts at face value even when they're presented with little or no context. If there's one real-world everyday-skill I got from my psychology degree, it's how to spot good vs poor interpretations of statistics and studies in media (my favourite example is still one from a professor of mine who did a series of studies which found that emotional and physical pain are processed in the same area of the brain, then did a study to determine if painkillers would reduce emotional pain, found that they did, and theorized that this might be a contributing factor to drug addiction. Shortly after the paper was published, it was picked up by a newspaper... with a headline along the lines of "Feeling sad? Take an Advil!" *facepalm*)
 
Last edited:

string555

Banned
1,373
Posts
6
Years
lol I probably won't be working on AI unless I need it for something, so don't count on any major advancements from me lol

I think you would be good at it, but it's ultimately your choice. I would love to pull off the idea I mentioned of the AI VR environment, but there's other things I need to focus on that are more important.
 
5,654
Posts
11
Years
So, I'll have another Java exam next week and was wondering one thing... What do you all think about programming exams on paper? Like you get the task and you have to write it down on paper, without usage of the computer.
 

string555

Banned
1,373
Posts
6
Years
So, I'll have another Java exam next week and was wondering one thing... What do you all think about programming exams on paper? Like you get the task and you have to write it down on paper, without usage of the computer.

I used to pretty much religiously write out code on paper before ever bringing it onto an electronic device, so I think I would do fine with it. I still have several 'scrolls' of programs that are basically several pages of code taped together that I used to hang on my walls to examine all at once. XD

I don't have an obsession, I swear... >_>
 
Back
Top