• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming |OT| C is better than C++! No, C++ is better than C

Somnid

Member
I think of the stored procedures more like an API. Sure you can just not have an API and give everyone access to all the internals of your library and hope they use it in a supported way, or you can construct a well defined, well designed API that limits the ways you can use the library

You aren't wrong to think that but they are kinda of an older and less flexible way to do it. Generally you're either going to have a database that's specific to an application and this is not necessary or you have a database that many consuming applications are going to use. It made a lot more sense when this sort of software was desktop based with direct access but now the general good approach is to roll it into a web service. There's a ton of benefits to doing it this way including better user management especially for public exposure (oauth etc), api versioning (so you don't break downstream applications when you upgrade), input validation and error messaging, and just that those services are easily consumed by just about anything on any platform. It also frees you from implementation. You could tear out one database and replace it with another or do any sort of sharding or replication without impacting consumers. So I'd say that the service that sits on top of the database is really where you want to be doing all the logic stuff (or at the very least a code layer that does this for simple scenarios) and let the database just be structured storage.
 

msv

Member
So I'd say that the service that sits on top of the database is really where you want to be doing all the logic stuff (or at the very least a code layer that does this for simple scenarios) and let the database just be structured storage.
This is how I do it as well. The workflow is also simplified when you do this compared to stored procedures.
 
What's it called when you create a class and you have the = in the constructor?

I can't think of it for the life of me.

Like:

Code:
// constructor
className (int id = 0, String name = "")
{
}


I forget if there's a way around not having to do this basically (instantiating the class with or without parms, using only 1 constructor, instead of...):
className()
{
}

className(parms)
{
}
 

The Victorian

Neo Member
So I've decided to get a bit into C/C++ programming, having not done any real programming since learning Java in first year computer science.

Now, back in high school, I remember writing Pascal programs that would play all sorts of sounds out of the PC speaker (and annoy the hell out of everyone else in the classroom). So I thought I might go about recreating these in a C app.

Well, it turns out that it's easier said than done. Windows includes as "beep()" function, but that plays the beeps out through the normal sound output device. So it would seem that accessing the PC speaker would require sending data to it via I/O ports. Unfortunately, from I've been able to learn, user-mode programs cannot access I/O ports; only kernel-mode (i.e. Ring 0)programs can do that.

Yet I was determined to make some code that would play annoying sounds through the PC speaker. To that end, I ran Borland Turbo C++ in DOSBox, then used it to create my program as a 16-bit MS-DOS executable:

Code:
#include <stdio.h>
#include <stdlib.h>
#include <dos.h>
#include <time.h>

void PlaySound(int Frequency)
{
	int Div;
	char tmp;

	Div = 1193180 / Frequency;
	outportb(0x43, 0xb6);
	outportb(0x42, (char) (Div) );
	outportb(0x42, (char) (Div >> 8));

	tmp = inportb(0x61);
	if (tmp != (tmp | 3))
	{
		outportb(0x61, tmp | 3);
	}
}

void NoSound()
{
	unsigned char tmp = inportb(0x61) & 0xfc;
	outportb(0x61, tmp);
}

int main()
{																														
	int freq;
	int x;

	srand(time(NULL));

	for (x = 1; x < 1000; x++)
	{
		freq = rand() % 5000 + 1;
		PlaySound(freq);
		delay(50);
		printf("Now playing: %u Hz\n", freq);
	}
	NoSound();
	return 0;
}

The plays 1000 sounds up to a frequency 5000 Hz with a brief delay between them, creating a wonderfully irritating beep boop beep beep boop cacophony. Of course, since it can only run in DOSBox, it still doesn't use my computer's actual PC speaker.

I have no idea what I'm doing, do I?
 

Ambitious

Member
Does anyone else have issues with a customized prompt with oh-my-zsh? My prompt consists of two lines, and for some reason the second line disappears after a few seconds. It only happens a finite number of times, though:

shell26jry2.png


I launched the shell, and the second line disappeared. I pressed Enter and it happened again. I pressed enter another time, and it did not disappear. Neither did it the next few times. Sometimes, it happens a few more times before the second line stays visible. Sometimes, the issue doesn't occur at all.

But what's with these square brackets showing on the sides? There has to be something wrong with my prompt, no? This is how it's defined:

Code:
PROMPT='%{$fg[blue]%}%n%{$reset_color%} in %{$fg[blue]%}%~%b%{$reset_color%}$(git_time_since_commit)$(check_git_prompt_info)
> '

RPROMPT='%(?.. %{$fg[red]%}%?%{$reset_color%} - )%T'

However, I haven't touched my zsh settings in months. The only thing that changed recently is that I updated oh-my-zsh, so this is likely the cause of this issue. I was wondering whether anyone else here is affected by this.

Not a bad idea, actually. I'm gonna reset my prompt and reassemble it piece by piece until I find the problematic part.

Uh, it keeps happening even if I completely remove both custom prompts. How strange. I have to check oh-my-zsh's commit log and issue tracker one more time. There has to be something.

It kept happening. Even with the default prompt, even with the default theme. Wasn't able to find anything on oh-my-zsh's Github page. I gave up, tried to live with it and hoped that one day, an oh-my-zsh update would fix it. None of the recent updates did, and this issue was annoying the hell out of me, so I had a look at my configuration again.

Nothing out of the ordinary. No dangerous hacks. Just a few aliases, a few functions and a few environment variables. The only things that could potentially affect the prompt are the zsh plugins I've enabled. So I disabled them one by one, and indeed - the yeoman plugin was causing this issue for whatever reason. Well, I don't need it anyway, so I removed it. Phew. Finally. This was really getting on my nerves.
 

Snipes424

Member
I would do this a little differently. I would make another sheet or something that has 2 columns. A is barcode number and B is times scanned. Your VBScript detects when a barcode is scanned, finds the corresponding row in this table, and adds 1 to the number of times that barcode has been scanned (or adds a new row if it wasn't there yet).

Then in the data above, do 25 - VLOOKUP() on the barcode table, to subtract the number of times it's been scanned.


Next you're going to ask how to detect when a barcode is scanned and update that table. And i have no idea, because that's pretty domain specific and depends on what excel library you are using to communicate with your barcode scanner

Ok I decided to do this a little differently.

What I want to do is scrap the whole barcode scanner idea and jut click on a button. This button will prompt a question and depending on what you type in, it will subtract n-1 from the cell. For example, "What length did you use?" and if I select 3 then it will subtract 1 from the correct cell. I've been messing with msgbox but I don't think that is the correct object to use. Can anyone think of a different solution? Google is not coming back with much so I'm not sure if it's possible.
 
Ok I decided to do this a little differently.

What I want to do is scrap the whole barcode scanner idea and jut click on a button. This button will prompt a question and depending on what you type in, it will subtract n-1 from the cell. For example, "What length did you use?" and if I select 3 then it will subtract 1 from the correct cell. I've been messing with msgbox but I don't think that is the correct object to use. Can anyone think of a different solution? Google is not coming back with much so I'm not sure if it's possible.

In my experience, spreadhseets are not good at doing stateful calculations. They just aren't designed for this kind of thing.

What I mean is that you should try to avoid having any cells whose value is determined from the previous value of the same cell. You lose data this way. Your spreadsheet should have a very limited set of inputs, and everything on the sheet should be computable from this one set of inputs.

Why not make a new sheet called Data Entry that has some columns you need. One of those columns could be "Length" or whatever you want to call it. Then that other cell where you said you want to subtract n-1, instead just count the number of 3's in your Length column, and subtract that value from the cell.

TL;DR - If you need buttons, you're probably doing something wrong.

Feel free to make a google spreadsheet with a few sample columns illustrating what you want to do, and share it here.
 
Man, I thought learning the DPDK API was going to be a fairly straightforward process, but it's anything but. I knew it was an extremely powerful toolset, but I didn't expect to have to deal with so many layers to just implement a simple client/server architecture on some 10GbE NICs. It'll all be worth it though; I'm looking forward to having very low latency packets.
 
Gaf'ers I have a question about getting experience. Doesn't' pertain to just programming but IT in general. I want a job where I can learn and get the experience to get further in the field but it's proving difficult trying to just get in. Was wanting to know if anyone minds sharing how they got into their fields early on. Luck, perseverance or just lots of studying to get there?

I always hear that some certs are useless but I'm thinking they might help because I lack job history. Currently have around 40 credit hours and am trying to get an AAS in IT.
 
Gaf'ers I have a question about getting experience. Doesn't' pertain to just programming but IT in general. I want a job where I can learn and get the experience to get further in the field but it's proving difficult trying to just get in. Was wanting to know if anyone minds sharing how they got into their fields early on. Luck, perseverance or just lots of studying to get there?

I always hear that some certs are useless but I'm thinking they might help because I lack job history. Currently have around 40 credit hours and am trying to get an AAS in IT.

For me the route was pretty much school -> internship -> entry level job. The school part was useful for getting the work practice slot, but most of the stuff I learned up to that point was by myself or during the internship by myself.

My actual suggestion? Start building an open source portfolio and I don't mean a portfolio in a PDF format that's open source. Go to GitHub or similar, find open source projects you like, find entry level bugs, features requests or other things that you can try your hands on with. Most open source projects welcome beginners and you get tons of feedback: absorb, adjust and rewrite. You get to learn de-facto tools in your field, you get to learn good coding practices, you'll get to learn tons of code written by others, you get to write tons of good code. Or go to StackOverflow and start answering questions. Or both.

Every time I get contacted by recruiter or an employer the message starts with "I saw your profile at GitHub and I think that you would make a good addition to our team X. Would you like to discuss more" instead of "I saw your impressive school history on LinkedIn" or "I liked your work description at company X". Obviously some of the recruiters are just shooting everywhere and trying their luck, but I have gotten many interesting job opportunities just by doing stuff that I like in on my free time.
 
Gaf'ers I have a question about getting experience. Doesn't' pertain to just programming but IT in general. I want a job where I can learn and get the experience to get further in the field but it's proving difficult trying to just get in. Was wanting to know if anyone minds sharing how they got into their fields early on. Luck, perseverance or just lots of studying to get there?

I always hear that some certs are useless but I'm thinking they might help because I lack job history. Currently have around 40 credit hours and am trying to get an AAS in IT.

Like PetriP-TNT said, the fastest way is to have a github with either contributions to projects or your own projects.

Of course, this only helps with programming/webdev, if you want to get into say database administration its not going to help much. In that case, certifications might help.
 
Some non technical talk, slight ranting, unsure if this is the most appropriate thread:

So I just graduated with my B.S. CS degree and I'm getting into a job hunt. I don't expect to get anything for weeks (months?), I'm wondering what the best use for my time is. I suppose I consider myself a Java developer but I feel that what I got out of my degree isn't nearly enough to land a job yet. While I learned a lot about the foundation of Java, C++, web, design patterns, I feel like I've learned absolutely nothing about what sells right now, what is practical. My classes hardly covered anything with Java EE, Applets, Asp.net, or practically any modern web technologies.

So far I've been spending time brushing up on stuff I've already learned but haven't used in some time and reading some books on interview questions, which I've been dreading, stuff I haven't really ever used in most of my programs, like binary trees and recursion (was essentially taught this is awful in terms of performance cost). Setup my LinkedIn and Github and have been working on my website (which is basically a modified bootstrap at this point) and doing some personal projects which aren't really mega impressive, just fooling around with new languages and doing tutorials.

I'm already kind of pessimistic looking for jobs because almost all the positions are looking for 5+ years of experience, and the entry level positions are non existent. I live in central Florida, somewhere between Tampa & Orlando. I am really eager to start working and continue learning but I just don't know what it is I should be focusing on.

TL;DR looking for insight from people who have recently graduated and found a job.

Some questions:

1. What job titles should I be looking for? I'm currently using programmer, developer, and computer science, but I really want something that gets my foot in the door and to go from there.
2. Is it better at this point for me to dive deep into one language in hopes of finding a job that is based on it, or to dip my hand into everything?
3. Should I bother participating in github projects or just continue doing my own work and publishing it on github? I feel like I'm stumbling into a lot of projects not knowing what needs to be added.

For me the route was pretty much school -> internship -> entry level job. The school part was useful for getting the work practice slot, but most of the stuff I learned up to that point was by myself or during the internship by myself.

My actual suggestion? Start building an open source portfolio and I don't mean a portfolio in a PDF format that's open source. Go to GitHub or similar, find open source projects you like, find entry level bugs, features requests or other things that you can try your hands on with. Most open source projects welcome beginners and you get tons of feedback: absorb, adjust and rewrite. You get to learn de-facto tools in your field, you get to learn good coding practices, you'll get to learn tons of code written by others, you get to write tons of good code. Or go to StackOverflow and start answering questions. Or both.

Every time I get contacted by recruiter or an employer the message starts with "I saw your profile at GitHub and I think that you would make a good addition to our team X. Would you like to discuss more" instead of "I saw your impressive school history on LinkedIn" or "I liked your work description at company X". Obviously some of the recruiters are just shooting everywhere and trying their luck, but I have gotten many interesting job opportunities just by doing stuff that I like in on my free time.

I'll have to get on this starting tomorrow, though my linkedin really hasn't gotten much hits despite having a ton of (key skills) information.

edit: Was your internship online? Curious if onlines ones have any less credit to them than local ones.
 
I've been given the prospect of making a simple app listing the commercial activities in the area. How much should I ask for this kind of job? is it better to ask for a fixed fee or a hourly wage? Consider that around here cost of life is VERY low, rent costs about 350€/month on average.
 
I'll have to get on this starting tomorrow, though my linkedin really hasn't gotten much hits despite having a ton of (key skills) information.

edit: Was your internship online? Curious if onlines ones have any less credit to them than local ones.

Actually my internship was at my own school in a department that does professional grade projects to local companies (not just mom-and-pop shops, but with brands with large international recognition). After my mandatory internship ended I was there leading the next years patch as the project manager and doing other coding work for a year or so.

Internships are a whole different beast in US for example (I think) than they are in Finland though, so it's hard to comment.

For the questions

1. What job titles should I be looking for? I'm currently using programmer, developer, and computer science, but I really want something that gets my foot in the door and to go from there.
2. Is it better at this point for me to dive deep into one language in hopes of finding a job that is based on it, or to dip my hand into everything?
3. Should I bother participating in github projects or just continue doing my own work and publishing it on github? I feel like I'm stumbling into a lot of projects not knowing what needs to be added.

1. I don't really know how to comment this one. I think the biggest part of getting your foot in the door is actually getting your foot in any door, so any job that contains programming or programming related activities would be a start. Especially when most of the job applications are the regular "+5 years of Java experience needed" type of stuff.

2. IMO diving deep is a good option: pick a language you like (that has at least some prospect of finding jobs: being a Brainfuck master is neat, but most likely pretty hard to get job for), study it and the concepts behind it. When you grasp the general concepts within one language, it usually isn't too hard to jump around within similar languages (and eases jumping between totally different kinds of).

3. You should participate in other projects! At least as soon as you feel confident enough to do so. Doing your own projects is always good, but that can easily leave you in a vacuum where you aren't learning anything new or getting better at something because most of the participants will be just you. Reading other peoples code and writing something that fits the old code is a huge part of the "programming thing" in general. If you are too scared to contribute right away (which is understandable), you can at least fork something and try to do something that improves the experience.
 

Nelo Ice

Banned
Actually my internship was at my own school in a department that does professional grade projects to local companies (not just mom-and-pop shops, but with brands with large international recognition). After my mandatory internship ended I was there leading the next years patch as the project manager and doing other coding work for a year or so.

Internships are a whole different beast in US for example (I think) than they are in Finland though, so it's hard to comment.

For the questions



1. I don't really know how to comment this one. I think the biggest part of getting your foot in the door is actually getting your foot in any door, so any job that contains programming or programming related activities would be a start. Especially when most of the job applications are the regular "+5 years of Java experience needed" type of stuff.

2. IMO diving deep is a good option: pick a language you like (that has at least some prospect of finding jobs: being a Brainfuck master is neat, but most likely pretty hard to get job for), study it and the concepts behind it. When you grasp the general concepts within one language, it usually isn't too hard to jump around within similar languages (and eases jumping between totally different kinds of).

3. You should participate in other projects! At least as soon as you feel confident enough to do so. Doing your own projects is always good, but that can easily leave you in a vacuum where you aren't learning anything new or getting better at something because most of the participants will be just you. Reading other peoples code and writing something that fits the old code is a huge part of the "programming thing" in general. If you are too scared to contribute right away (which is understandable), you can at least fork something and try to do something that improves the experience.

Speaking of partcipating in projects, is there a good tutorial on how to contribute to open source?. Been wanting to help out with places like freecodecamp but have no idea how to contribute. Like I actually know the guys behind the site and I told em about an error in the template for one of the projects they used so they told me to make a pull request. I checked the GitHub and had no idea how to find the template then how to fix it.

Besides that I do have some limited experience with working on a team and using git through those projects. But in general my git experience is still limited to my own work and only 1 branch. Basically I'm only comfortable doing git add, git commit -m, and git push origin master lol.
 

Ambitious

Member
Some non technical talk, slight ranting, unsure if this is the most appropriate thread:

So I just graduated with my B.S. CS degree and I'm getting into a job hunt. I don't expect to get anything for weeks (months?), I'm wondering what the best use for my time is. I suppose I consider myself a Java developer but I feel that what I got out of my degree isn't nearly enough to land a job yet. While I learned a lot about the foundation of Java, C++, web, design patterns, I feel like I've learned absolutely nothing about what sells right now, what is practical. My classes hardly covered anything with Java EE, Applets, Asp.net, or practically any modern web technologies.

So far I've been spending time brushing up on stuff I've already learned but haven't used in some time and reading some books on interview questions, which I've been dreading, stuff I haven't really ever used in most of my programs, like binary trees and recursion (was essentially taught this is awful in terms of performance cost). Setup my LinkedIn and Github and have been working on my website (which is basically a modified bootstrap at this point) and doing some personal projects which aren't really mega impressive, just fooling around with new languages and doing tutorials.

I'm already kind of pessimistic looking for jobs because almost all the positions are looking for 5+ years of experience, and the entry level positions are non existent. I live in central Florida, somewhere between Tampa & Orlando. I am really eager to start working and continue learning but I just don't know what it is I should be focusing on.

TL;DR looking for insight from people who have recently graduated and found a job.

Some questions:

1. What job titles should I be looking for? I'm currently using programmer, developer, and computer science, but I really want something that gets my foot in the door and to go from there.
2. Is it better at this point for me to dive deep into one language in hopes of finding a job that is based on it, or to dip my hand into everything?
3. Should I bother participating in github projects or just continue doing my own work and publishing it on github? I feel like I'm stumbling into a lot of projects not knowing what needs to be added.



I'll have to get on this starting tomorrow, though my linkedin really hasn't gotten much hits despite having a ton of (key skills) information.

edit: Was your internship online? Curious if onlines ones have any less credit to them than local ones.

I'm in a similar situation.

I finished my BSc about two years ago; now I'm just over halfway through my MSc. I might be able to graduate this year if I manage to write my thesis, but I don't even have the slightest clue what kind of subject to tackle. When I browse the Open Topics lists of my uni or also the list of finished theses, all I see is stuff that's way over my head. I don't consider myself capable of writing a thesis like that.

Anyway, what I actually wanted to talk about was my job situation. After living from my savings for a while, it's now time to get a job. Similar to you, I learned the foundations of many general topics. Java, mainly (including Java EE and web stuff), a bit of UX, web engineering, logic programming, functional programming, systems programming, network programming and so on. A bit from everything. A few more specialized/exotic technologies here and there.

So here I am, having a least touched a truckload of technologies and tools, but I wouldn't consider myself competent with most of them. People say you should add to your resume by working on open source projects on Github, but I never did that. My Github/Bitbucket repos just consist of a bunch university assignments, nothing to showcase. Not a single non-uni project of my own (which I'm certainly not proud of).

Obviously, I'm gonna have to look for an entry level position. But even the ads of those usually require familiarity or even expertise with a lot of technologies I've never used. I'm actually scared of applying. Who would even accept me, when there are so many skilled and talented professionals studying alongside me?

And the worst of all is that I'm still not sure what kind of IT work I'd like to do. Programming, yes, but specifically? Web? Frontend, Backend? Enterprise? Mobile? I don't know.

I'm 26 now. I graduated from an IT highschool, I graduated from my university, I'm over halfway done with my Master's. And I don't know what job to pursue. It's ridiculous.

I never planned it to be this way. By this time, I hoped to be a member of some small startup full of talented developers, working on smart, high-quality software for end users. I hoped to have a sizable portfolio of useful tools and apps that people actually use and love. Well, I failed.

Sorry for the rambling. Or rather whining. I just got up and felt like I had to get this off my chest.
 
I'm in a similar situation.

I finished my BSc about two years ago; now I'm just over halfway through my MSc. I might be able to graduate this year if I manage to write my thesis, but I don't even have the slightest clue what kind of subject to tackle. When I browse the Open Topics lists of my uni or also the list of finished theses, all I see is stuff that's way over my head. I don't consider myself capable of writing a thesis like that.

Anyway, what I actually wanted to talk about was my job situation. After living from my savings for a while, it's now time to get a job. Similar to you, I learned the foundations of many general topics. Java, mainly (including Java EE and web stuff), a bit of UX, web engineering, logic programming, functional programming, systems programming, network programming and so on. A bit from everything. A few more specialized/exotic technologies here and there.

So here I am, having a least touched a truckload of technologies and tools, but I wouldn't consider myself competent with most of them. People say you should add to your resume by working on open source projects on Github, but I never did that. My Github/Bitbucket repos just consist of a bunch university assignments, nothing to showcase. Not a single non-uni project of my own (which I'm certainly not proud of).

Obviously, I'm gonna have to look for an entry level position. But even the ads of those usually require familiarity or even expertise with a lot of technologies I've never used. I'm actually scared of applying. Who would even accept me, when there are so many skilled and talented professionals studying alongside me?

And the worst of all is that I'm still not sure what kind of IT work I'd like to do. Programming, yes, but specifically? Web? Frontend, Backend? Enterprise? Mobile? I don't know.

I'm 26 now. I graduated from an IT highschool, I graduated from my university, I'm over halfway done with my Master's. And I don't know what job to pursue. It's ridiculous.

I never planned it to be this way. By this time, I hoped to be a member of some small startup full of talented developers, working on smart, high-quality software for end users. I hoped to have a sizable portfolio of useful tools and apps that people actually use and love. Well, I failed.

Sorry for the rambling. Or rather whining. I just got up and felt like I had to get this off my chest.

I think it's partially imposter syndrome at work, but I also feel the job market is being tilted toward trying to take talent from other companies rather than spend time training new people and focusing on fostering company loyalty. I don't think we're in as bad of a spot as a lot of other degrees though, but it feels like an academic degree isn't sufficient by itself anymore, which wasn't (of course...) relayed in my school's program. The nature of the profession is that it's always changing, and many professors haven't held a non academic position in decades.

Thank you for the advice, kpetri. I suppose I'll focus on learning C# (which seems absurdly easy given I already know much VB .net & Java) and ASP, making projects and finding stuff on github to contribute to. I might look into doing an internship online as well if my job search doesn't turn up anything soon.
 
Speaking of partcipating in projects, is there a good tutorial on how to contribute to open source?. Been wanting to help out with places like freecodecamp but have no idea how to contribute. Like I actually know the guys behind the site and I told em about an error in the template for one of the projects they used so they told me to make a pull request. I checked the GitHub and had no idea how to find the template then how to fix it.

Besides that I do have some limited experience with working on a team and using git through those projects. But in general my git experience is still limited to my own work and only 1 branch. Basically I'm only comfortable doing git add, git commit -m, and git push origin master lol.

GitHub has extensive tutorials at https://guides.github.com/

Checkout https://guides.github.com/activities/hello-world/ which introduces you to GitHub Essentials: Repositories, Branches, Commits, Issues and Pull Requests.

Then check out https://guides.github.com/activities/contributing-to-open-source/


The repositories usually have contributing guidelines, for example FreeCodeCamp has one:

https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/CONTRIBUTING.md

They also have a small guide on finding a bug:

https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I've-Found-a-Bug


Small self-ad, I just released a SASS linting extension for Brackets at https://github.com/petetnt/brackets-sass-lint. Feel free to contribute ^^
 

Nelo Ice

Banned
GitHub has extensive tutorials at https://guides.github.com/

Checkout https://guides.github.com/activities/hello-world/ which introduces you to GitHub Essentials: Repositories, Branches, Commits, Issues and Pull Requests.

Then check out https://guides.github.com/activities/contributing-to-open-source/


The repositories usually have contributing guidelines, for example FreeCodeCamp has one:

https://github.com/FreeCodeCamp/FreeCodeCamp/blob/staging/CONTRIBUTING.md

They also have a small guide on finding a bug:

https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/Help-I've-Found-a-Bug


Small self-ad, I just released a SASS linting extension for Brackets at https://github.com/petetnt/brackets-sass-lint. Feel free to contribute ^^
K awesome thanks for the links. I'll start contributing after I finish some contract work for a friend.

Also nice I love brackets and all its extensions.
 
So I started reading the C# language specification and this is a lot more fun than I thought it would be

You should look into trying to write some sample applications with the stuff you're learning- it's awesome to learn the stuff you can do with a language, but it's more fun to actually do it!

If you're enjoying this and you're in college, you should take a compilers class. You'll learn a ton.

I wouldn't recommend taking a compilers course right after starting C#, especially if that's your only coding experience. That's like trying to swim a mile after only a couple weeks of swimming around in a small pool you can always stand up in. I'd recommend taking some basic programming courses first, and at least one computer architecture course to learn some assembly before attempting a compilers class.
 
I wouldn't recommend taking a compilers course right after starting C#, especially if that's your only coding experience. That's like trying to swim a mile after only a couple weeks of swimming around in a small pool you can always stand up in. I'd recommend taking some basic programming courses first, and at least one computer architecture course to learn some assembly before attempting a compilers class.

Hmm, I didn't mean jump right in, I was just saying if you enjoy reading a language specification, it would be a good class to take, after taking the prerequisites (of course).
 
Some non technical talk, slight ranting, unsure if this is the most appropriate thread:

So I just graduated with my B.S. CS degree and I'm getting into a job hunt. I don't expect to get anything for weeks (months?), I'm wondering what the best use for my time is. I suppose I consider myself a Java developer but I feel that what I got out of my degree isn't nearly enough to land a job yet. While I learned a lot about the foundation of Java, C++, web, design patterns, I feel like I've learned absolutely nothing about what sells right now, what is practical. My classes hardly covered anything with Java EE, Applets, Asp.net, or practically any modern web technologies.

So far I've been spending time brushing up on stuff I've already learned but haven't used in some time and reading some books on interview questions, which I've been dreading, stuff I haven't really ever used in most of my programs, like binary trees and recursion (was essentially taught this is awful in terms of performance cost). Setup my LinkedIn and Github and have been working on my website (which is basically a modified bootstrap at this point) and doing some personal projects which aren't really mega impressive, just fooling around with new languages and doing tutorials.

I'm already kind of pessimistic looking for jobs because almost all the positions are looking for 5+ years of experience, and the entry level positions are non existent. I live in central Florida, somewhere between Tampa & Orlando. I am really eager to start working and continue learning but I just don't know what it is I should be focusing on.

TL;DR looking for insight from people who have recently graduated and found a job.

Some questions:

1. What job titles should I be looking for? I'm currently using programmer, developer, and computer science, but I really want something that gets my foot in the door and to go from there.
2. Is it better at this point for me to dive deep into one language in hopes of finding a job that is based on it, or to dip my hand into everything?
3. Should I bother participating in github projects or just continue doing my own work and publishing it on github? I feel like I'm stumbling into a lot of projects not knowing what needs to be added.



I'll have to get on this starting tomorrow, though my linkedin really hasn't gotten much hits despite having a ton of (key skills) information.

edit: Was your internship online? Curious if onlines ones have any less credit to them than local ones.

1. Anything with associate in it, ie associate programmer, developer, software engineer etc. People sadly use these titles interchangeably.

2. In my experience no. Popular languages and technologies change all the time. Problem solving and good computer science fundamentals never do. A better thing to do is decide what kinds of problems you want to solve and look into jobs in those areas.

3. The biggest thing I've learned about side project stuff is it provides people a way to evaluate you that might not come across in an interview and it allows you to show passion for a specific domain that you might be trying to get paid for eventually. I personally think its better to work on something you care about and feel strongly about even if you are the only one working on it.

I wouldn't recommend taking a compilers course right after starting C#, especially if that's your only coding experience. That's like trying to swim a mile after only a couple weeks of swimming around in a small pool you can always stand up in. I'd recommend taking some basic programming courses first, and at least one computer architecture course to learn some assembly before attempting a compilers class.

Yeah when I went to school it was a junior level course. They made it non required and I ended up not taking it but I briefly took the Coursera Stanford Compilers class last year. Low level stuff is really fascinating to me (even though I am not great at it) but in these days of people mostly writing web stuff fewer people seem to care.
 
Some non technical talk, slight ranting, unsure if this is the most appropriate thread:

So I just graduated with my B.S. CS degree and I'm getting into a job hunt. I don't expect to get anything for weeks (months?), I'm wondering what the best use for my time is. I suppose I consider myself a Java developer but I feel that what I got out of my degree isn't nearly enough to land a job yet. While I learned a lot about the foundation of Java, C++, web, design patterns, I feel like I've learned absolutely nothing about what sells right now, what is practical. My classes hardly covered anything with Java EE, Applets, Asp.net, or practically any modern web technologies.

So far I've been spending time brushing up on stuff I've already learned but haven't used in some time and reading some books on interview questions, which I've been dreading, stuff I haven't really ever used in most of my programs, like binary trees and recursion (was essentially taught this is awful in terms of performance cost). Setup my LinkedIn and Github and have been working on my website (which is basically a modified bootstrap at this point) and doing some personal projects which aren't really mega impressive, just fooling around with new languages and doing tutorials.

I'm already kind of pessimistic looking for jobs because almost all the positions are looking for 5+ years of experience, and the entry level positions are non existent. I live in central Florida, somewhere between Tampa & Orlando. I am really eager to start working and continue learning but I just don't know what it is I should be focusing on.

TL;DR looking for insight from people who have recently graduated and found a job.

Some questions:

1. What job titles should I be looking for? I'm currently using programmer, developer, and computer science, but I really want something that gets my foot in the door and to go from there.
2. Is it better at this point for me to dive deep into one language in hopes of finding a job that is based on it, or to dip my hand into everything?
3. Should I bother participating in github projects or just continue doing my own work and publishing it on github? I feel like I'm stumbling into a lot of projects not knowing what needs to be added.



I'll have to get on this starting tomorrow, though my linkedin really hasn't gotten much hits despite having a ton of (key skills) information.

edit: Was your internship online? Curious if onlines ones have any less credit to them than local ones.

You got a Bsc in computer science. Just look for jobs asking for a junior programmer or something like that. If it asks for 3+ years of experience? Still apply, most likely its not a hard demand.

What is important is that you find a place that has enough senior programmers to learn from. Dont take a job where you are the only programmer. During an interview, ask a lot of questions about training and personal growth and how they keep up to date and such. You dont want to end up at a place where they have been programming in Java 1.4 for the past 15 years.
 

Koren

Member
Low level stuff is really fascinating to me (even though I am not great at it) but in these days of people mostly writing web stuff fewer people seem to care.
At the same time, there's more and more embedded logic everywhere, and while it has never been as easy to use high-level languages on microcontrollers, people able to understand things down to the bare metal will probably see some use.
 
. Low level stuff is really fascinating to me (even though I am not great at it) but in these days of people mostly writing web stuff fewer people seem to care.

With things like the raspberry pi and arduino being relatively popular i would actually say that embedded might be on the rise again.
 

Somnid

Member
With things like the raspberry pi and arduino being relatively popular i would actually say that embedded might be on the rise again.

But that's the thing, these cheap and tiny systems are powerful enough that they run high-level code. Embedded seems like an area that will become very small but the ones in it will be very handsomely paid. We still need people to build the foundational systems but very few will want to write the software like that.
 
With the EU throwing a bunch of money at deploying what is projected to be billions (no, seriously) of active IoT devices by 2020, embedded systems programming is likely to be a widely relevant field for quite some time.
 

JeTmAn81

Member
If you're enjoying this and you're in college, you should take a compilers class. You'll learn a ton.

You should look into trying to write some sample applications with the stuff you're learning- it's awesome to learn the stuff you can do with a language, but it's more fun to actually do it!

Oh, I already know the basics of compilers but I've never actually sat down and read through a language specification. I'm used to just picking up whatever I need when I sit down to write something. This is like browsing through the entire toolshed instead of just grabbing the thing I need and beginning work. But knowing compilers does make it satisfying to read through the grammar. It's also sparked my interest to check into what the .NET intermediate language which C# compiles to looks like.
 

Nelo Ice

Banned
So went to a hiring event the other night and I'm starting to believe someone may actually hire me despite my hilarious lack of experience and degree. At the very least I have an elevator pitch and most people actually listen to it lol. And now I've ordered business cards. So here's to hoping I can land a dev job far sooner than I ever expected to.
 

Somnid

Member
Is there some kind of inherent inaccuracy when using modulus with integers? I'm doing 420 % 25 and somehow getting 19. :l

What language? Context? Integer division is a completely different operation than floating point division, it should have no precision concerns. Are both operands actually integers?
 

upandaway

Member
Man algorithms is really kicking my butt. Everyone are struggling so hard with the homework haha. No clue how we'll do on the test. So freaking hard.
 
What language? Context? Integer division is a completely different operation than floating point division, it should have no precision concerns. Are both operands actually integers?

Language is C. I''ll throw my code down below.

Code:
int main(void) {
    int denominations[4] = {25,10,5,1}; //Arrays hold values for cleaner code
    int quantities[4] = {0,0,0,0};
    
    /* Ask user for change amount, convert to coins */
    float change_input;
    printf("How much change do you need? ");
    do {
        change_input = GetFloat();
    } while(change_input < 0);
    int change = change_input * 100;
    
    
    for(int i=0; i < 5; i++) {
            quantities[i] = change / denominations[i];
            change %= denominations[i];
            printf("%i\n", change);
    }
    printf("There are %i quarters, %i dimes, %i nickels, and %i pennies.\n"
, quantities[0], quantities[1],quantities[2],quantities[3]); 

    int output = quantities[0] + quantities[1] + quantities[2] + quantities[3];
    printf("%i\n", output);
}

It works for the most part, but breaks on integers divisible by 10. For example, 4.2 will give me 16 quarters, but only 1 dime, and then 1 nickel and 4 pennies. :l
 

injurai

Banned
Language is C. I''ll throw my code down below.

It works for the most part, but breaks on integers divisible by 10. For example, 4.2 will give me 16 quarters, but only 1 dime, and then 1 nickel and 4 pennies. :l

You're using Floats, so there is a rounding error. What you end up computer is 419 % 25 instead.
 
You're using Floats, so there is a rounding error. What you end up computer is 419 % 25 instead.

Any tips on how to account for that? I went back and checked and the error IS happening after the float gets converted to an int (I even ran it step-by-step through gde and somehow just missed that step happening. :l) . How can I change the code to get an accurate result?
 

injurai

Banned
I don't know the proper way to handle things like this, because Floats are basically an imperfect decimal representation, and accounting for errors is ultimately fudging and already fudged data type.

But it's essential truncating the decimal when you cast, thus rounding down. When you want it to round up. You could introduce code to round to the nearest integer when you cast, or something.
 
I don't know the proper way to handle things like this, because Floats are basically an imperfect decimal representation, and accounting for errors is ultimately fudging and already fudged data type.

But it's essential truncating the decimal when you cast, thus rounding down. When you want it to round up. You could introduce code to round to the nearest integer when you cast, or something.

I think I found a solution for.. well, 99% of cases at least. I just added .001 to the float before converted it over. It shouldn't ever affect things that were round accurately... I think. :l
 

Ahnez

Member
I think I found a solution for.. well, 99% of cases at least. I just added .001 to the float before converted it over. It shouldn't ever affect things that were round accurately... I think. :l

If you first multiply by 100, then add a number < 1, and just then cast into int, then it should always work

Code:
int change = (int) (0.5 + change_input * 100);

Btw, adding 0.5 and rounding down is a (very good) way to find the nearest integer
 
I'd say just use ceil.

That's not really going to work for him. He reads the number 4.2, and the value returned is less than 4.2 Ceil is just going to give you 5. If you mean ceil(4.2*100), then it might be represented as 4.19xxxx or 4.20xxxx, so you'll be calling ceil(419.xxxx) or ceil(420.xxxx) and if it's the latter then ceiling might give you 421.

(int)(x * 100.0 + 0.5) sounds best to me.

Edit: I'm stupid. Best solution is (int)roundf(x * 100.0f)
 
Top Bottom