The Lounge is rated PG. If you're about to post something you wouldn't want your
kid sister to read then don't post it. No flame wars, no abusive conduct, no programming
questions and please don't post ads.
I'm sure it's just a joke - but for some (and I've seen these guys' code before) who might think it a good idea.
Since the act of converting to string in decimal is probably also using multiple mod 10's. If so not even the unequal mod optimization's possible, not to mention it would do one mod for each decimal digit (instead of only one mod 5). So before you can even compare the last character to "5" or "0" you've already made the code run a lot slower just to get to that point, never mind fractions.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering.-Wernher von Braun Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
I personally have never believed that one "can't beat the compiler." But I will say that in most cases the amount of time to beat the compiler will never be repaid.
When writing your own code, this is a non-issue. Some people take pride in having the fastest time possible. But when doing this for pay, it should always be considered. And we should consider all of the costs. This would include the amount of time one spends finding the fastest way. (And will expense of paying someone to wait that time would be more then the expense of paying the developer.) But also needs to include the extra time it takes the next guy to know what you did, why and decide if it is right or wrong.
I personally have never believed that one "can't beat the compiler."
With you on that. The compiler usually optimizes the best for any general case. Seldom would it optimize for a specific case.
In this scenario it might be that optimizing for 5's divisibility check could be done faster than the compiler's more generalized method. Or it might be a situation of some compilers using that trick about unequal devisors, but not others. You can't just assume the compiler will optimize to the best possible efficiency.
I think the point about this is to go with a middle ground approach: Don't always try to out-perform the compiler, 99% of the time you're wasting effort. But know a bit of what the compiler does, so you can more easily pick-up what might be of use to look further.
In college I was good at asp.net. Then I failed final year. Then it took me 2 years to complete it. In these 2 years I lost hands on from asp. So when I got first interview cleared from a IT sector, I took it irrespective of the fact that its a support profile not programming. One thing led to another and hence completed 2 years in the support profile in the same company. A couple of months ago the programming bug got me again and i started to re-learn what was lost. Today I can design a website. To prove that I am not just boosting I even programmed a e commerce website that is live. The problem is that in programming this support experience won't be counted. If I start as fresher, it wouldn't be enough to pay off my bills and loan. I recently gave an interview, when the person heard that I am working on support profile since 2 years and not worked on programming in the office, he didn't even give me a chance to boost about the website that I created and kicked me off. Assuming it was that employer specific, I gave another interview, result was the same.
Now I am stuck in a situation like dll hell. Its a deadlock. Suggest, help or simply offer a job...but give a solution please. My mind has stopped working over this.
Well, maybe the way you present yourself to potential employers is not good enough to highlight your programming skills.
Experience is experience, you have to make clear that when you worked in "support" it will help you help them make better software (web site,... ) by knowing problems that others reported to you.
When looking for a job, you have to sell yourself, not just for yourself, but how it will help your future employer make more money because you will help them create better software (web site) that will need less support in the future.
Of course your resume/CV has the support experience on it when they called you in to interview. If they are so set against that type of a position in your past, then why did they bring you in to talk in the first place?
I agree with Maximilienm that you can spin it as a good thing as well.
Looks for a new or emerging market, that way there will be less competition in the market place. Does it have to be asp.net? A real programmer can use any languag, it's all about aptitude if you've got that you should be have to turn your hand to any language and framework. Try and long beyond the the horizon and catch the next big wave... Android?
Start doing jobs in your spare time, build up your "portfolio", and then you can have more experience to put on your resume.
Any delusions though about this not taking a couple years should be expelled from your brain, having a non-programming degree and trying to break into a saturated job market with people who have been programming professionally is especially difficult. This isn't the .COM era anymore where we had a hard time finding talent, people are working for peanuts just to have a job near code.
--- To add to that, realize that there are thousands of programmers coming out of school right now with a degree in programming (Computer Science or Software Engineering) that can't get a job. These are highly qualified individuals who lack experience, its an employer market right now, meaning the favor is on the employer to get exactly what they want. The job market is still recovering and we employers can be very picky.
On top of that, if you are applying for a programming job and you mis-represent yourself on your resume to get your foot in the door (talking up your skills, experience, etc) this is usually where the interview immediately ends. It doesn't take long for a good recruiter to figure out how much bullshit you put on your resume.
It is not an employers' market in the whole country; there are developer shortages in the major Texas cities (and, from what I hear, also in East Coast cities). Since 2011 or so, employers have been outbidding each other to get experienced candidates to join them.
It might not be quite that good for entry level employees, and there might be parts of the nation where the demand is low, but it's far from an employer's market right now.
Also, on another note, I never found any rent-a-code sites to be worth the time it takes to read the postings. Trying to get experience any way you can is generally a good idea, but those rent-a-code sites are among the worst ways of going about it.
Often the problem in job searching with little experience is "over-reaching". There are entry level jobs out there but what you want is a non-entry level job without the background to support it. You would really have to ace an interview to make that happen. The truth? If you Ace an interview, background is not an issue otherwise you would have never been interviewed in the first place.
The problem is that in programming this support experience won't be counted. If I start as fresher, it wouldn't be enough to pay off my bills and loan.
Seriously, after 2 years of support you are making that much more than entry level development? Having been there, highly unlikely. Also, why should your support years count towards development experience. If I took a support guy that has been here 10 years, he would be entry level in development.
My path: support -> performance testing -> automation/simulation development -> development