Ah np. I've actually had the same problem when I was doing my first few projects in C++...
I think depending on the IDE/compiler you use, some will actually warn you about using = vs == in some places, but it's definitely something to watch out for in general.
if( 1 == current_size ) {
First let me preface my post by saying that I am not a fan of php at all, and I think python is great. I also love mvc for web apps (django is an mvc framework).So I want to get into web development and programming. What would be the best way to start learning how to do this? I know a little bit of php, but have been reading that django (python) is a better language that is more cleaner for bigger scale projects and that such.
What do you recommend? I would like to be able to eventually make a small scale "social network" like site for myself for fun.
Edit: Or Ruby on Rails?
You should turn the expression around:
Code:if( 1 == current_size ) {
If you only type a single = here for some reason you will always get an error because you cannot assign a value to a non-variable.
Some of my fondest college memories include staying up all night to finish a programming assignment, going in to school to submit it and then immediately leaving to go home and sleep.Best advice I can ever give anyone after the program I just turned in:
NEVER
WAIT
UNTIL
THE
LAST
MINUTE.
EVER.
I hate myself right now.
Best advice I can ever give anyone after the program I just turned in:
NEVER
WAIT
UNTIL
THE
LAST
MINUTE.
EVER.
I hate myself right now.
One of my professors basically made this a rule of his class. We had to putty in to the university unix server to do most of our work. He checked who was logged in every night. If you weren't logged in regularly he would give you no leniency in grading. By the end of the term we realized he was looking out for us and not just being a hard ass.
That's dumb. Professors should leave that hand-holding shit for high school. If I want to do it on my own machine and upload when I'm done, that's my business. If I want to do it the night before, that's my business. Metrics like that used as part of grading is absolutely ridiculous.One of my professors basically made this a rule of his class. We had to putty in to the university unix server to do most of our work. He checked who was logged in every night. If you weren't logged in regularly he would give you no leniency in grading. By the end of the term we realized he was looking out for us and not just being a hard ass.
That's dumb. Professors should leave that hand-holding shit for high school. If I want to do it on my own machine and upload when I'm done, that's my business. If I want to do it the night before, that's my business. Metrics like that used as part of grading is absolutely ridiculous.
That's dumb. Professors should leave that hand-holding shit for high school. If I want to do it on my own machine and upload when I'm done, that's my business. If I want to do it the night before, that's my business. Metrics like that used as part of grading is absolutely ridiculous.
That's dumb. Professors should leave that hand-holding shit for high school. If I want to do it on my own machine and upload when I'm done, that's my business. If I want to do it the night before, that's my business. Metrics like that used as part of grading is absolutely ridiculous.
I really like the schools that have automatic testing submission systems, where you can submit your program at any time to the system and it will run it through some tests and tell you which tests it fails. And you can do this before submitting it for a grade. Those are pretty great, because it helps with the ambiguity that a lot of cs assignments unfortunately exhibit.
This might not be the right question (I'm still new to Assembly), but are you using something like Easy68k or programming for a Motorola 68000?
+1 older dude going back to school.
Ahhh, sorry! I'm sure someone around here knows what's up.ah - i'm just using microsoft visual studio 2010. it's done in c++ with the assembly done like so:
int main (){
_asm{
//some code
}
return 0;
}
I just wish it worked with or made (database table) entities more apparent.Ruby on Rails is full of magic, and it is a little confusing.
Are you getting a second bachelor's or first?
Ahhh, sorry! I'm sure someone around here knows what's up.
I'm in a similar situation. I got a BA in a different field, but I want to go back to school.i got my BS in finance back in 2008, worked on wall street for nearly 5 years and then lost my job.
now i'm back in school at the age of 27 getting my MS in comp sci - but i need to take a handful of pre-req classes first, including assembly.
I'm in a similar situation. I got a BA in a different field, but I want to go back to school.
What are you focusing on with the MS? And how did you get into a program without having the BS in CS, or what do you mean that you need some pre-req stuff?
well when i applied for my MS i made sure i:
-got 2 solid recommendations from ex-colleagues (one hedge fund manager, one ceo of an investment firm)
-i had a decent GPA in college
-i had a good GRE score
-i already took a few high level math courses and low level coding courses back in undergrad
now i am accepted to my MS program but cannot take MS level classes until i finish 2 semesters worth of undergrad courses: 2 math courses and 6 programming courses.
What math courses do you have to take? I'm thinking of going for an MS too without a BS.
First let me preface my post by saying that I am not a fan of php at all, and I think python is great. I also love mvc for web apps (django is an mvc framework).
When somebody says language X is better than Y, you should take it with a grain of salt. Most of the time it's like arguing flavors of ice cream when at the end of the day they'll all get you equally fat. The differences are very minor in reality.
If you just want to get something done and you're not working with a team or anything, you need to choose your language based on a combination of:
1) whatever you're already comfortable with
2) the right tool for the job. Some languages are just not suited for some things. I wouldn't write a website in C++ for example (but hey, OkCupid was done that way!)
Given that php is absolutely fine for making websites, you have the right tool for the job part down. And if that's what you know best, then you might as well leverage that knowledge to help you get stuff done faster.
Don't get me wrong, I think learning new things is awesome. I am currently writing a website in Go even though it's kind of crappy, just because I want to learn about it. Python is great. If you have the time, by all means learn it. But there's nothing wrong with php unless you're a programming snob.
So which language do you think would be more valuable to learn? Should I learn python with django because I might have more options with python than php?
And why do programming snobs say bad things about php?
So which language do you think would be more valuable to learn? Should I learn python with django because I might have more options with python than php?
And why do programming snobs say bad things about php?
+1 older dude going back to school. perhaps you guys can help me out with this problem i've been trying to solve:
using c++ / assembly:
move 'ABBA' to the EAX register. write code to rearrange it to BABA.
mov eax, 'ABBA'
mov ebx, 00000000000000000100001001000001b
and eax, ebx //eax = 00BA
shl ebx, 16 //ebx = BA00
or eax, ebx //eax = BABA
now i've got BABA into the eax register, but i can't get it to display or move it to a string. how on earth do i do this? i've been googling around but there appears to be no elegant solution i can think of.
I just wish it worked with or made (database table) entities more apparent.
What lorebringer said about ability to copypasta being an advantage of PHP, I find is a big disadvantage. People who stupidly copy/paste from one thing to another without understanding the code makes code a pain to maintain and terrible to debug.
You said you already knew php. So my advice was to not learn anything new, just get things done with what you already know.So which language do you think would be more valuable to learn? Should I learn python with django because I might have more options with python than php?
And why do programming snobs say bad things about php?
Have you tried:
mov foo,eax
?
where foo is a stack variable in your C++ function.
i did, didn't work. what i did was just move each register to a character, then display each character in a row.
i asked the prof and he said he fucked up - moving eax to a string is a huge process and isn't what he was trying to teach in class. he didn't mean to word the problem like he did. it is now considered extra credit. thanks for the help, though!
Yeah he put up test scripts so you could test before the deadline. If you didn't get an A in his class it was basically your fault, but the course was still very challenging.
Been thinking about this some more and I still say screw that
When I was lecturing Python (which I'm not any more because of budget cuts - I really enjoyed it) my main assignment required the students to write their own unit tests for the application code they'd written (the API was meticulously defined.) Markers then ran submitted applications against my tests and their unit tests against my application.
And yet I still had students requesting (quite forcibly) that I supply them with a test script to run against their application.
He was smart about it. He didn't actually give you test scripts or tell you what he expected results were. You submitted it to a directory, executed a command, and it ran the program with his test data and told you whether or not it executed correctly and on which step it had failed. His sample data was also not the same as his final test data as I recall. He certainly didn't make it easy, he just was more lenient with people who worked hard and started early than he was with people who only started a few days before the project was due. The nice off shoot of this was you basically got an instant grade.
Pretty much learning this tonight. First year java student who left my bigass assignment till the night before. I suck so bad tooBest advice I can ever give anyone after the program I just turned in:
NEVER
WAIT
UNTIL
THE
LAST
MINUTE.
EVER.
I hate myself right now.
It's just that it's a mess and I feel bad that people have to use it.
<?php if(isset($foo))
{
?> <i>Foo</i> <?php
} else { ?> <b>Bar</b>
<?php } ?>