In that case, gcc needs to have its ANSI handling fixed. I got compile errors using the ANSI flag and// with gcc, but worked fine without the ANSI flag.
Given the choice between VB's interface designer and Glade (or Stetic), I'll take VB. It lets you just put things where you want them. Glade gets ornery about how many items are in each other item and whatnot. For the actual programming part of it though? Yeah, I'm with you.
He was being facetious by making such a long list. I forget the full list, but from what I remember and my coding experience:
Hungarian Notation: that's when the first couple letters of the variable name tell what type it is. It's how I first learned to name things when I started VB. In VB a label for the total number of dollars would be named something like lblTotalCash and the button that corresponded would be btnTotalCash. In C, it's often done that you have dPencils. The d is because in C when it's an int and you want to put it in a printf(), you use %d, so this keeps you from trying to do non-integer operations on an integer (3 / 4 = 0 in integer division, remember?). It can make it easier to avoid having variables all with slightly different names which you can't keep straight (like the label v. button), and to avoid treating it as the wrong data type, but it can be a pain to read if you're not someone who uses it. Thanks to VB, I use it for names of parts on interfaces (makes sense to me, likely to have the same name as most things need a label to be attached to them...radio button....and then the label for it), but I don't use it for backend code. Also, some people prefer variables_that_look_like_regular_words with the underscores acting like the words have spaces. It makes it more English-like. Others use the way I did above--crazyCaps. That's a personal preference thing, but the underscores are probably easier to read.
Pre and post position operators: i++ and ++i will both increment i by 1. That's fine on a line by itself. TFA says to not write code that requires knowing the technical difference--so don't use it on the same line as anything else. I tend to agree with that because it does make it harder to read. The technical difference, however, is something you should know in case you come across it. The GP is saying "don't assume, as the author says, that other people won't know the difference because all good programmers do," and that makes sense to an extent. If it won't be that hard to read, why not put it on one line? If your code's complicated, anyone enough of a newbie at programming not to know the difference isn't likely to look anyway (and that line will be the least of their worries). On the author's side though, for maximum readability, setting the incrementing on its own line is most legible for most people. If you don't know what's going on anyway, here's a chance to learn. If a line says "x=y++" that does "x=y" and THEN "y=y+1". If it says "x=++y" it does "y=y+1" and THEN "x=y" (with the new value of y). So if x=3 and y=5, after "x=y++" you have x=5, y=6. After "x=++y" you'd have x=6, y=6.
#define: the general idea, yes, agree. When there is a value which you are likely to want to change but will not change during runtime and which applies to the whole program, make it a constant, and make it stand out and be in a place that's easy to find to change if you need to do so. As the article-author did, use ALL CAPS FOR CONSTANTS because it makes them stand out more and easier to find. Like the GP said, though, the pre-processor isn't really necessary. You can just declare it as a constant (I believe it's the keyword "const" in C). In Java it's the keyword "final", for instance "final int SCREEN_WIDTH = 300".
Error checking: the article-author is right here. I've had teachers say I don't need to parse strings that are being entered because they won't put in bad data. BS! ALWAYS parse the strings, especially if you asked the person to enter a number. A letter in there would screw it up, and punctuation is really bad. How do you think SQL injection happens? A nice thing about C's pre-processor is that you can use #ifdef & #define. You have a line at the top #define DEBUG. Then all your error-checking stuff happens between lines that say "#ifdef DEBUG" and "#endif". When you are debugging, put in that line at the top that says "#define DEBUG". Your debugging output/tests will then happen so you c
"Some public stations, as well as commercial stations, program the 'Neighborhood' at hours when some children cannot use it. I think that it's a real service to families to be able to record such programs and show them at appropriate times. I have always felt that with the advent of all of this new technology that allows people to tape the 'Neighborhood' off-the-air, and I'm speaking for the 'Neighborhood' because that's what I produce, that they then become much more active in the programming of their family's television life. Very frankly, I am opposed to people being programmed by others. My whole approach in broadcasting has always been 'You are an important person just the way you are. You can make healthy decisions.' Maybe I'm going on too long, but I just feel that anything that allows a person to be more active in the control of his or her life, in a healthy way, is important."
--Mr. Roger
SONY CORP. OF AMER. v. UNIVERSAL CITY STUDIOS, INC., 464 U.S. 417 (1984)
What browser was that? Since it suggests IE or FF, does that mean KHTML (Konqueror, Safari) isn't supported? Lynx definitely isn't (just tried, same error).
Monopoly doesn't mean no competition at all. It means no substantial competition. Gates does not live in fear that he'll wake up tomorrow with only 10% of the market. Linux and MacOSX are not substantial competition. They're minorities. Windows is on 90% of computers, and that qualifies as a monopoly. Also, as the other responder noted, the software you buy off the shelf is usually for the Windows API. I've never seen software at Best Buy that said it was Linux compatible. I've downloaded plenty of free stuff from the repositories, but most commercial games are Windows-only. Most very-high-end specialty software is too. MacOSX can compete when it comes to running specialty software. It can't on commercial games. Linux can't compete on either of those unless developers start paying attention to it. It can only compete on "general computer use" by which I mean things like chatting, email, web-surfing, writing up reports, balancing a checkbook, tracking a family tree, listening to music, etc. Most people only do that (or a subset of it), and could get along with Linux just fine. Try finding a Linux box on the shelf at a computer store though. They're all running Vista (or MacOSX if you go to an Apple Store). You have to order online if you want a Linux box, and most people don't do that. Yeah, Dells are almost always online, but even if they're the largest retailer (not anymore, HP passed them), when you split that even 5 ways (Dell, HP, Gateway, Toshiba, IBM, for instance), that just means "more than 20%," and that doesn't account for all the other retailers.
One BIG difference is the fact that if you're a loan inventor trying to sell something, it costs you a lot every time you re-make that thing to sell it, until you can sell enough to get bulk pricing on parts. Invent (write) a new piece of software, and it costs virtually nothing to copy infinitely (if they want it on a disk, it costs 50 cents; if they're fine with downloading, free if you find a free web host which isn't hard).
Like the summary said, nothing in there about activated licenses. How many people are replacing Vista with XP or Linux or BSD? How many still cling to 98SE? Dell had to start offering XP again because no one wants Vista. I highly doubt all of the licenses sold are actually in-use or even wanted.
I have a *fiber* connection at school and 99% of the time it's 50kb/s downstream. Every once in a while I'll get over 1000kb/s, but that's rare ("wow it's going fast" usually means it's over 200kb/s).
Agreed. I hate flash for use as the whole website. It's just wrong. It can do videos or games, sure, but text should be text, not images of text. I don't want to see a "loading..." bar when I visit a website. I just want to see the text. Stuff like Dreamweaver and Frontpage is also partially to blame for slow-loading sites. They put so much extra code in there for no good reason. A plain text editor and some hand-coding are all you need. You'll end up with leaner code with much faster load-times. Frames and tables do not load any faster than css (and frames load just plain slower).
You just described one of my friends. He's upset he didn't get into Stanford for law school and therefore can't study with Lessig.
All that stuff up there with the if/then/except/unless/provided is that you need a really BIG truth table or a well-nested set of if or switch statements and lots of continue & break.
It's not necessarily that the patches introduce bugs. I've heard it before, and it makes sense, that some hackers look and see what patches have been released. Then they know what was exploitable, and they can generally make a fair bet that a good chunk of users haven't patched their systems, so they can use the patch as a map to the eX(marks-the-spot)ploit
I'm with you. I mean, I know everyone doesn't do that. They use Frontpage and Dreamweaver and whatever, but I'm with you in that it's how it *should* be. I'm supposed to do my cousin's company's website (though "make it blue" isn't much to go on, so until she gives me something like "I need these categories: __, ___, __" not much is happening), and I do it by ssh-ing into the server, starting up vim, and typing out a bunch of php files. The php isn't for programmy stuff (though dynamic navbar is something I'm working on), just saving me from retyping the footer, header, and navigation bar every time I decide to change something (or add a link). Frontpage/Dreamweaver unfortunately output independent files, so making one change still requires editing every page and re-uploading, even if it's considereed slightly less tedious to do it that way (really, copying and pasting the modified HTML sounds less tedious than navigating menus over and over, but that's just me). They're full of XHTML, and they use links to style sheets (because what's the point of using ? You have to change it on *every* page then, and that sucks). The files do the "proper" thing where the XHTML is all
and
with text, and the CSS controls all of the style & position, so it's easier to read, and using CSS for the layouts means better flow and load-time than if you used tables or frames. Drop-down navigation menus load a lot faster in CSS than Javascript too.
For that matter, given the statistic that says that if a page takes more than 4 seconds to load, the visitor clicks "back" and goes elsewhere, why are so many still using editors that produce such bloated code? A site that would take 10 seconds to load done in Frontpage (okay, that'd be a big site) would probably clock in under the 4 second mark if you hand-coded it to be nice and lean. At the very least, could an editor that produces non-bloated code be made? It'd be nice to have one that you can put in "template" mode and it outputs a bunch of php & css files (with css layout, not tables!) then makes each page include those files with just little "content" divs. It'd probably be the first time I used a WYSIWYG since I was 10 or 11 and they said we had to learn to use Frontpage in school (though now I think about it, I used the "HTML" tab and not the WYSIWYG tab in that class...probably for the sake of getting faces like O_o from teachers/students because that's fun).
That scared me for a second....well, until I got to "magical boxes." I still support "this computer is in terrible shape. For the sake of my inbox can I please install Spybot S&D, AdAware, and AVG Free? Please?" I've heard of people doing free computer cleanup workshops where people bring their slow virus-infected computers to be fixed up. The owners don't know what to do, and the geeks know that the more computers they clean up, the better off they likely are too in the long run but that anyone who considers AV low-priority enough to let it get that bad also probably doesn't see the value in fixing it, so they're not likely to take it to Staples and pay for a fix-up either.
WTF are you talking about? If you get an OSX disc (yes, you can, for cases where you need to format/reinstall or get a new hard drive on your Mac), you can install it on commodity hardware just dandy. My ex's home-built x86 computer ran OSX for a while. That was how they tested their x86-ifying of Macs. They ran it on normal hardware.
OpenMoko was demoed at the last Ubucon. It's very nice if you like touchscreens. I don't. I hope the next one has real buttons with real tactile feedback (unlike Razrs which sort of have buttons but have no feedback at all). Can't dial n drive with a touchscreen.
Uh, looks the same as Photoshop on OS X. They use the good old "well a WM is for managing windows, so why put them in a container window?" way of thinking, just like the GIMP uses on all platforms. There's always Gimpshop if you want them all in one box. I just put multiple desktops to use.
Blackboard. It's so obsessive about the "okay" button that if you send a message to the teacher saying "I'm sick and will be absent" it'll say "message sent" and you think "okay it's done" and exit your web browser. It wasn't really sent though. You had to hit "ok" AFTER it said it was sent. There's also that whole "hook a laptop up to a vending machine, claim you're Bb's Access server, and get free food" thing, but I doubt any student sees that as a downside.
Uh, Unices aren't that easy to hack if you set it to block connection attempts from outside sources that get the root password wrong say..5 times. You can't password crack in that time. Then again, Macs and Ubuntu disable root by default so they have to guess username AND password. So, no, Vista's probably not more secure than Unices. Linux and Vista have the SAME problem. Drivers for both are in limited supply.
Oh, wait sorry, there's one place computers teach communication skills. The loner nerdy geeks who are afraid to talk to people in real life learn to communicate in groups on IRC. They probably already know how to write and know multiple languages (probably programming though). They definitely do not need someone else to teach them about technology. They already know more about computers than any teacher in their high school anyway.
In that case, gcc needs to have its ANSI handling fixed. I got compile errors using the ANSI flag and // with gcc, but worked fine without the ANSI flag.
Given the choice between VB's interface designer and Glade (or Stetic), I'll take VB. It lets you just put things where you want them. Glade gets ornery about how many items are in each other item and whatnot. For the actual programming part of it though? Yeah, I'm with you.
--Mr. Roger
SONY CORP. OF AMER. v. UNIVERSAL CITY STUDIOS, INC., 464 U.S. 417 (1984)
nt
What browser was that? Since it suggests IE or FF, does that mean KHTML (Konqueror, Safari) isn't supported? Lynx definitely isn't (just tried, same error).
Monopoly doesn't mean no competition at all. It means no substantial competition. Gates does not live in fear that he'll wake up tomorrow with only 10% of the market. Linux and MacOSX are not substantial competition. They're minorities. Windows is on 90% of computers, and that qualifies as a monopoly. Also, as the other responder noted, the software you buy off the shelf is usually for the Windows API. I've never seen software at Best Buy that said it was Linux compatible. I've downloaded plenty of free stuff from the repositories, but most commercial games are Windows-only. Most very-high-end specialty software is too. MacOSX can compete when it comes to running specialty software. It can't on commercial games. Linux can't compete on either of those unless developers start paying attention to it. It can only compete on "general computer use" by which I mean things like chatting, email, web-surfing, writing up reports, balancing a checkbook, tracking a family tree, listening to music, etc. Most people only do that (or a subset of it), and could get along with Linux just fine. Try finding a Linux box on the shelf at a computer store though. They're all running Vista (or MacOSX if you go to an Apple Store). You have to order online if you want a Linux box, and most people don't do that. Yeah, Dells are almost always online, but even if they're the largest retailer (not anymore, HP passed them), when you split that even 5 ways (Dell, HP, Gateway, Toshiba, IBM, for instance), that just means "more than 20%," and that doesn't account for all the other retailers.
One BIG difference is the fact that if you're a loan inventor trying to sell something, it costs you a lot every time you re-make that thing to sell it, until you can sell enough to get bulk pricing on parts. Invent (write) a new piece of software, and it costs virtually nothing to copy infinitely (if they want it on a disk, it costs 50 cents; if they're fine with downloading, free if you find a free web host which isn't hard).
Like the summary said, nothing in there about activated licenses. How many people are replacing Vista with XP or Linux or BSD? How many still cling to 98SE? Dell had to start offering XP again because no one wants Vista. I highly doubt all of the licenses sold are actually in-use or even wanted.
I have a *fiber* connection at school and 99% of the time it's 50kb/s downstream. Every once in a while I'll get over 1000kb/s, but that's rare ("wow it's going fast" usually means it's over 200kb/s).
Agreed. I hate flash for use as the whole website. It's just wrong. It can do videos or games, sure, but text should be text, not images of text. I don't want to see a "loading..." bar when I visit a website. I just want to see the text. Stuff like Dreamweaver and Frontpage is also partially to blame for slow-loading sites. They put so much extra code in there for no good reason. A plain text editor and some hand-coding are all you need. You'll end up with leaner code with much faster load-times. Frames and tables do not load any faster than css (and frames load just plain slower).
I'm not British. I'm a Pittsburgher (you know, like the Steelers?). I just like using odd types of phrasing.
There's a whole pile of us if you go look at linuxchix.org. We have a right fun time proclaiming our womanishness.
You just described one of my friends. He's upset he didn't get into Stanford for law school and therefore can't study with Lessig.
All that stuff up there with the if/then/except/unless/provided is that you need a really BIG truth table or a well-nested set of if or switch statements and lots of continue & break.
It's not necessarily that the patches introduce bugs. I've heard it before, and it makes sense, that some hackers look and see what patches have been released. Then they know what was exploitable, and they can generally make a fair bet that a good chunk of users haven't patched their systems, so they can use the patch as a map to the eX(marks-the-spot)ploit
with text, and the CSS controls all of the style & position, so it's easier to read, and using CSS for the layouts means better flow and load-time than if you used tables or frames. Drop-down navigation menus load a lot faster in CSS than Javascript too.
For that matter, given the statistic that says that if a page takes more than 4 seconds to load, the visitor clicks "back" and goes elsewhere, why are so many still using editors that produce such bloated code? A site that would take 10 seconds to load done in Frontpage (okay, that'd be a big site) would probably clock in under the 4 second mark if you hand-coded it to be nice and lean. At the very least, could an editor that produces non-bloated code be made? It'd be nice to have one that you can put in "template" mode and it outputs a bunch of php & css files (with css layout, not tables!) then makes each page include those files with just little "content" divs. It'd probably be the first time I used a WYSIWYG since I was 10 or 11 and they said we had to learn to use Frontpage in school (though now I think about it, I used the "HTML" tab and not the WYSIWYG tab in that class...probably for the sake of getting faces like O_o from teachers/students because that's fun).
That scared me for a second....well, until I got to "magical boxes." I still support "this computer is in terrible shape. For the sake of my inbox can I please install Spybot S&D, AdAware, and AVG Free? Please?" I've heard of people doing free computer cleanup workshops where people bring their slow virus-infected computers to be fixed up. The owners don't know what to do, and the geeks know that the more computers they clean up, the better off they likely are too in the long run but that anyone who considers AV low-priority enough to let it get that bad also probably doesn't see the value in fixing it, so they're not likely to take it to Staples and pay for a fix-up either.
Linux gamers are an edge case because it's too hard to game when your graphics look like $*&#!
WTF are you talking about? If you get an OSX disc (yes, you can, for cases where you need to format/reinstall or get a new hard drive on your Mac), you can install it on commodity hardware just dandy. My ex's home-built x86 computer ran OSX for a while. That was how they tested their x86-ifying of Macs. They ran it on normal hardware.
OpenMoko was demoed at the last Ubucon. It's very nice if you like touchscreens. I don't. I hope the next one has real buttons with real tactile feedback (unlike Razrs which sort of have buttons but have no feedback at all). Can't dial n drive with a touchscreen.
Uh, looks the same as Photoshop on OS X. They use the good old "well a WM is for managing windows, so why put them in a container window?" way of thinking, just like the GIMP uses on all platforms. There's always Gimpshop if you want them all in one box. I just put multiple desktops to use.
Blackboard. It's so obsessive about the "okay" button that if you send a message to the teacher saying "I'm sick and will be absent" it'll say "message sent" and you think "okay it's done" and exit your web browser. It wasn't really sent though. You had to hit "ok" AFTER it said it was sent. There's also that whole "hook a laptop up to a vending machine, claim you're Bb's Access server, and get free food" thing, but I doubt any student sees that as a downside.
Are there more games available on Linux or Mac? Wine exists for both, but isn't Cedega Linux-only? There's a lot of open source games out there too.
Uh, Unices aren't that easy to hack if you set it to block connection attempts from outside sources that get the root password wrong say..5 times. You can't password crack in that time. Then again, Macs and Ubuntu disable root by default so they have to guess username AND password. So, no, Vista's probably not more secure than Unices. Linux and Vista have the SAME problem. Drivers for both are in limited supply.
Oh, wait sorry, there's one place computers teach communication skills. The loner nerdy geeks who are afraid to talk to people in real life learn to communicate in groups on IRC. They probably already know how to write and know multiple languages (probably programming though). They definitely do not need someone else to teach them about technology. They already know more about computers than any teacher in their high school anyway.