Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Comment Re:Very relevent for small target embedded stuff. (Score 1) 641

Heh, when I did embedded development we were always forbidden from using bitfields. Load, operate, store is the correct way to access a hardware register. "Let the C compiler do something probably based on the assumption the target address is in RAM" is the wrong way to access a hardware register :p

Load, operate, store is the correct way to access a hardware register, except when it's not. Some hardware has side effects when reading from or writing to a hardware port. On some devices, using bit-manipulation instructions is the correct way to do things.

Comment Re:Very relevent for small target embedded stuff. (Score 1) 641

The thing is, if you use structures with bit fields, C will not optimize the manipulations with them correctly. So you end up doing a lot of hand-holding in driver development in C. You have to be very much aware of the code being produced. It is not uncommon that you check specific inner loop sections to see exactly how they are being compiled and then based on the result and number of instructions might need to rewrite the C part or even just insert the assembly code directly.

No, the C standard does not guarantee that bit fields are implemented in a portable way, but if a compiler is not optimizing correctly, that's the fault of a broken compiler, not C.

If you are accessing hardware registers using bit-mapped structures, then yes, you need to understand the machine code being spit out by the compiler.

Comment Re:C is very relevant in 2014, (Score 1) 641

Because bug-free automatic memory management is silly, who would want that?

Actually, it's still possible to have some bugs if you improperly use auto_ptr and shared_ptr, etc, but it's still much better than the classic method of allocation.

To be bug free, it has to be on-par with something like Java, where you can't break memory management no matter how hard you tried. This won't happen as long as there's the need to deal with raw pointers or if you have to dodge misaccessing elements (e.g. bounds checks...)

"It's harder to shoot yourself in the foot with C++, but if you do, you blow your whole leg off."

Really? Are you saying it's not possible to have a Null Pointer Exception in Java? Hmm...

Comment Re: C is primordial (Score 1) 641

Yes but you would not be able to actually empress this in C. Not possible! The best you could do would be something like:


void set_class_to_blue(Element* ele)
{

        set_class(ele, "blue");
}

foreach(dom, "a", set_class_to_blue);

Any if you inline the code, you can see what it does line for line and translate it to ASM.

That's not C. What is this "foreach()" you speak of?

Comment Re:In my experience - (Score 1) 488

Because maybe the evolution team realized that top-posting is an abomination? Sometimes people refuse to actively support people at doing something wrong.

+1 to the evolution devs for not implementing this.

Well then kudos to the evolution devs for sticking up to their principles, and a reminder to myself to have no sympathy for the lack of adoption of their product.

Very apropos; this is a perfect example of the type of self-righteousness that drives people away from a FLOSS project.

Comment Re:I must be the outlier (Score 1) 234

This is my exact experience as well. I couldn't convince the customer service rep that their "system" also showed that I was an Internet customer for 2 years before they started trying to charge me a modem rental fee. How was I receiving service before that time? Did their system show me ordering a modem? Did their system show them shipping me a modem? All of these questions fell on deaf ears.

After cancelling service with them, their automated phone service would no longer recognize my account number as an active account, but then 4 months later the attempted billings for not returning this mystery modem began again.

The very helpful person I chatted with on their website last month assures me the problem is fixed. We'll see about that.

Comment Re:I must be the outlier (Score 1) 234

I wouldn't consider your journey done just yet.

If your experience pans out like mine has, in about 4 months you will start getting e-mails and letters from Comcast attempting to bill you for the equipment you haven't returned yet.

Attempting to explain that you don't have any more equipment to return, will get you empty promises that they will fix the error in their computers, along with another e-mail and bill next month.

In my case, they continue to attempt to bill me $70 for a cable modem that I have never rented from them. Their system still shows a credit of $42 they owe me, but no one seems to know when that money will be returned to me, 6 months after cancelling.

If I never hear from them again, I'll consider it $42 well spent.

Comment Re:I guess they won't need any more foreign Visas? (Score 1) 383

If you are not making $45 or more an hour you are being robbed. Programmers are massively underpaid compared to the skillset we need to do our jobs. Why the hell do we tolerate deflating the job down to the level of a factory worker?

First off, $45 per hour is not too high. After factoring in benefits that probably equates to a salary of about $65k per year. So while I agree that making less than $65k per year is low for all but junior developers (or those working in very low cost areas), I'm not sure I agree with your assertion that most developers are underpaid. The average salary of a developer is about $90k per year, which is an incredibly high salary.

$45/hour * 40 hours * 52 weeks = $93,600/year. I'm sure where your message goes from there... is $45/hour "not too high", or is $90k an "incredibly high" salary?

Comment Re: Amen, brother Amen! (Score 1) 522

"Name 1 way to back up her emails and pictures on a remote server that requires fewer mouse clicks than forwarding them herself with email."

Dropbox - drag, drop, done. Single click.

You forgot the following steps:
0a: Learn what Dropbox is.
0b: Find Dropbox on the web without being suckered into look-alike advertisements and link farms.
0c: Download the installer from Dropbox's website.
0d: Execute installer and navigate Windows' UAC restrictions.
0e: Create Dropbox account, along with reading/skipping EULA. (Optional: Visit DropBox's website every 90 days to stay on top of any changes to their EULA, verify they haven't had any new breaches that might require a password change, or that the free account quota hasn't been exceeded.
0f: Learn how to create a folder to sync with Dropbox.
0g: Learn how to find said folder again.
0h: Learn to using Windows' file search functions to glean the cat videos from the grandkids e-mails which now all live in one folder.

Other than that, yeah, pretty much single click. I'm really not trying to be snarky here; my dad's on about this level. About three times a year I have to walk him through the differences between single-click, double click, shift click, and right click. Also why files that he's dragged from a folder to the desktop are no longer in the folder.

Comment Re:Do you have the time? (Score 1) 309

Amen to this. Don't look at this as the last chance to be a child, look at it as the first chance to be an adult. Instead of looking at college as your last chance to avoid responsibility, use it as a chance to learn a little responsibility and ease into the idea of being a Grown Up.

Working during college is a reasonable thing. If you have a scholarship or the Bank of Mom & Dad is funding your education, bully for you; but having even a part-time job during school means that priorities must be set and time must be managed.

Much better to hit the ground running after graduation and not be shocked at the idea of needing to be at work 8-5 every day.

Comment Re:BS (Score 1) 309

I just got my haircut from a lady whose 23 year old son just got a consulting gig making 120,000 a year! He started 2 years ago making websites and turning them into smart phone applets.

No offense but I do not believe that advice as employers and HR can not find anyone with 2 - 3 years of HTML 5 and css 3 experience. Coca cola and others hired this kid and keep paying him $50/hr to code.

Just picking nits here, but $50/hr != $120,000/year.

It is the Java jobs that require 10 years experience because the old timers all have that and can simply demand it. Web and mobile app positions do not have as much experience which means lower barriers to entry and more cash to make.

I'm not sure what you're saying here... that web and mobile app positions, with their lower barriers to entry, should be paid more?

Comment Re:So basically... (Score 1) 287

I would, simply because people learn at different rates and different ways. I dropped out of college after 3 semesters, best decision ive ever made. now it wasnt all flowers and roses but I learned more in the next 4 years actually working and researching things on my own then they were ever going to teach me in school.

You don't know that. If you're convinced your self-directed learning over those four years was more productive than a four-year degree could have been, there's two possible reasons for that: 1) Your school was not well-managed, or 2) you have an incredible drive and a knack for picking the right things to learn.

Of course, the boatload of money you would have spent on the degree is worth considering too. Glad it worked out for you.

Slashdot Top Deals

"Poor man... he was like an employee to me." -- The police commisioner on "Sledge Hammer" laments the death of his bodyguard

Working...