Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
DEAL: For $25 - Add A Second Phone Number To Your Smartphone for life! Use promo code SLASHDOT25. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. Check out the new SourceForge HTML5 Internet speed test! ×

Comment Re:Wow! (Score 1) 262

Take the effect of the media into account. They thrive on drama. They're the experts at slanting coverage to make a civil discourse seem as vicious and dramatic as they can make it. Even skeptics have a hard time figuring out what to believe. I have come to realize the media has reported the Right's philosophy in ways that make it appear more extreme and ugly than it really is. Sadly, that hasn't been hard to do, as there seems to be no shortage of lunatics and total hypocrites among the Right. One could easily get the impression that the entire Right has gone off the rails to crazy town. The Right has not helped matters, and as far as I can tell, really has spoiled somewhat. This denial of fact, science, and climate change, what's with that? That so does not fit the Eisenhower Republican model. They respected science as a means to win wars, if for no other reason. Bipartisan respect of science was what got America to the moon. But now? You hear an echo of that respect in calls to put a man on Mars. But mostly, the Right looks to have abandoned fact for propaganda. The Right and the media seem to be stuck in a negative feedback loop.

Possibly a new low for media cynicism was all the free coverage they gave Trump when he was a candidate, because his outrageousness was good for ratings. Just read what Les Moonves had to say about it. The impression I have is that a great many who voted for Trump did so out of desperation to find someone, anyone, who didn't seem to be a creature of the status quo, an establishment politician, totally owned by entrenched corporate interests. They didn't vote for the crazy nonsense Trump says. They voted to upend the system that is unfairly diverting most of our wealth to the 1%, or more like the 0.01%.

Comment Re:Kids these days... (Score 1) 315

For one example, consider tail-end recursion. CALL stores a return address on the stack, which is not needed in tail-end recursion. So if you use CALL and RET, you will either have to waste lots of stack space, which will make the program more likely to run out of memory and crash, and which will be slower, or do some extra work like POPing the unneeded address to stop the stack from growing, then when it is time to RET, putting it back on just to give RET something to pop. It's just better to use jumps.

For another example, many subroutines are very short, do not use all the registers, and are not recursive. Better to copy the instruction pointer into another register of the programmer's choice, then jump. When the subroutine is done, just do an indirect jump to the address contained in that register. Further, to save the contents of the registers it does use, either you have to do a PUSHA and save them all, even the ones it wasn't using, which wastes space and time, or you have to do individual PUSHes of the several registers it does use, which is very bad. Each PUSH instruction updates the stack pointer. It stalls the execution pipeline to update the same register repeatedly. Why not just update the stack pointer once? PUSHing 6 registers is the equivalent of writing MOV and ADD SP,4 6 times. Better to do 6 MOVs and one ADD SP,24, unless size of the code is more important than speed, as PUSH is a shorter instruction than MOV.

As for using the stack to pass parameters, yuck. Same problem, you're updating SP multiple times instead of once, or not at all, as all that will happen is the routine will just POP the parameters right back off the stack. Whenever possible, use registers to pass parameters.

Additionally, if you don't use the stack instructions at all, then you free up the SP register (and the SS register) for whatever you want. A longstanding criticism of the x86 architecture was the small number of general purpose registers. Intel has done a lot to address that, and these inherent inefficiencies, so those problems are not as bad on a modern x86 CPU as on a 386 or 486.

Comment Re:Kids these days... (Score 1) 315

You know you can load a binary into a debugger and view the assembly code?

There's really not much to basic assembler. You have main memory, registers, and flags. You can move bytes (1, 2, 4, or 8 at a time, usually) between memory and registers. You can do basic arithmetic and bit operations in the registers, and those set the flags. You can make jumps (gotos) based on whether the the flags are set or not. That's pretty much it. The hard part is putting such basic instructions together to accomplish things. It takes a lot of assembler to do even the simplest things.

Be warned that the x86 instruction set is loaded with all kinds of obsolete crap and dumb ideas. Like, it has instructions for doing basic arithmetic on packed decimal representations of numbers, as well as straight binary representations. Nothing uses packed decimal these days, it's all done in binary. Then there's the stack stuff, PUSH, POP, CALL, RET, and a few others. They're excellent examples of instructions that are less useful and general than they could be, because they do a little too much.

Comment Re:WTF!!! (Score 1) 513

Since you're playing Devil's advocate here, I've a few questions. Would you like to work for BAE's HR department?

And, don't you believe in the 40 hour work week? That the position required 24/7 availability in addition to 40 hours is already too much. He should not have had to beg to be allowed to work from home for any hours beyond the 40. He had done his duty to arrange to be able to work 40 hours a week at the office. Yet you're talking like it's perfectly acceptable and normal for a company to ask more of their employees.

In the 19th century, 80 hour work weeks in the factories were not uncommon. You worked 12 hours a day, 6 or 7 days a week. Employers were not convinced to reduce to a 40 hour week by arguments of humanity, work/life balance, or union pressure. What convinced them were facts and studies showing that people are more productive if worked less hard. It was a tough sell, because it is so easy and simple to equate hours worked with production, and of course some were never convinced. In particular, such thinking was a threat to the institution of slavery, so of course slave owners rejected it out of hand. It became more possible to accept it once slavery was abolished.

Comment Re:Patreon for porn (Score 2) 259

This is what I've been saying for years. There is no way to stop or regulate people swapping data among themselves. DRM does not work and no one, no matter how talented, is going to find a way to make it work.

What is sad is how producers have failed to understand the issue. They want to believe they can produce and sell data same as any other material good that is subject to scarcity. They've gone to great lengths to try to turn this dark fantasy into reality, and have of course completely failed. Their efforts were doomed, like any effort to create an actual flying horse, a pegasus, would be. With advances in genetic engineering technology, we could possibly create a horse with wings. But no way would it be able to fly.

Further, they haven't understood that even if success was possible, and achieved, it would be a setback for society. Because then, it would be possible to lock down and control information, and the power to do that could only be abused to impose tolls on the public in exchange for the same basic information, over and over. Imagine how "profitable" it would be to own the secret of "2+2=4", and no elementary school child could learn that until they paid the owner for the privilege. As it is, the secret of the birds and the bees is guarded entirely too zealously, and the more successful adults are at keeping teenagers in the dark about that, the worse the outcomes tend to be for all concerned. Nudity in Playboy was ever so slightly educational. I bought one for that purpose when I was around 14. The clerk at the bookstore frowned at me-- I was obviously underage, and he wasn't supposed to sell X rated things to minors-- but he didn't ask for my age, just took my cash in exchange for the zine.

Comment why another curly brace lang? (Score 1) 339

Why dud you make Swift a curly brace language, especially as it seems you admire Python? One thing Python shows is that C style syntax is not the ultimate. I suppose you were in a hurry to get to the interesting stuff and just grabbed onto curly brace syntax?

I'd like to see a real programming language that can be taught to elementary school students, not toy stuff like Logo or Scratch. These days, seems Python comes the closest to that ideal. Some still seriously recommend C/C++ for the kids.

Comment Need to be able to leave that job (Score 2) 433

I've experienced gaslighting. Many of us in IT have experienced hostile work environments. There are many options for dealing with it. By far the easiest, fastest way is to simply leave. You're not leaving just for your own mental well being. Another reason to leave is to take their power away, gives them less room to maneuver when abusing your former colleagues.

Unfortunately, many employees don't position themselves to be able to do that without prohibitive loss. And employers encourage that! Ever have your boss suggest you should buy a new car and house? I have, more than once. I didn't understand why that was any of their business the 1st time. Now I know that's why. They think of you as a "flight risk", and like the idea of you feeling chained to your job by debt up to your eyeballs. Lose that job and your life blows up. You lose your house, spouse, car, the respect of your friends, your credit rating, etc. They have code phrases for this, stuff like "showing team spirit" and "commitment". There are sick managers out there who enjoy bullying and abusing hapless underlings.

If you are determined to hang on for financial reasons, pride in your successes, don't want to leave under a cloud of failure, don't want to be labeled a quitter and a wimp, feel like there are still worthy people you can help, or the environment isn't completely horrible and has its redeeming qualities, and whatever other reasons, there's still much else you can do. There will always be some crap to handle at any job, and it is impractical to walk out on every employer unless you're independently wealthy and can retire at the age of 30 or some such. Still improve your financial situation. Next, keeping records is huge. Get all the gaslighters' crap down in writing. Ask them to email or text you, not just give you verbal instructions which can be denied later. Do it smoothly too, don't be verbally demanding, just be firm and put your time to use on other duties until they give you written instruction. What may very well happen is that they get cold feet. They don't want a paper trail showing what scumbags they really are. They'll foam at the mouth with rage and frustration, but they will back down if they have any brains. They may not, they may indeed give it to you in writing. They may try to weasel around with their written instructions. If they threaten to fire you, call them on that. Tell them you're waiting, hurry up and fire you already. It usually is a bluff, but it may not be, and if so, that's okay too. Being fired is not the end of the world.

A big problem is assessing management demands. It can sometimes be very hard to tell if they really are asking for too much. Asking for perpetual motion is too much. Asking for the moon might not be. Likely they have no idea either. It's their job to work that out, not come up with a schedule out of thin air but get input from their experts and work it out. But sometimes managers are lazy on that and try to compensate by bullying their underlings. Ask you for a schedule, then behind your back alter it to cut the time way down, and throw in a few simple little extras that aren't so simple or little. In any case, it's not good to declare some demand is impossible and unreasonable and walk out, if it wasn't.

So there it is. Free yourself from your own desperation. Whichever way things work out, years later you'd like to be proud of the decisions you made and the manner you handled yourself. No job is worth breaking laws you respect and treacherously throwing colleagues under the bus. There are bigger things in life than that. No job is worth your self respect. Being unemployed is hard, but it is not The End.

Comment Re:"Despite"? (Score 1) 142

McDonald's is also losing sales to Burger King, Wendy's, Whataburger, and so on, and the venerable grocery store. Maybe we should outlaw grocery stores and close all other burger restaurants for copying McDonald's ideas?

Private book, record, and movie sellers have always had to compete with the public library and the used book and record store. And now there's another competitor, the (relatively) new kid on the block, the Internet. Big Media would of course prefer that these alternatives be shuttered, and if they can persuade the public to go for that idea, accept their propaganda that competition is so unfair to poor starving artists, that would be a major setback to us all.

By far the biggest slant is the movie industry's. Cheap, easy, fast copying is in the hands of the masses now. There's no putting that genie back in the bottle.

Comment Re:Idiots lacking nuance (Score 3, Insightful) 88

You too may be falling for that trick. Lot of the discussion here runs with the implication that while downloading is not as heinous a crime as stealing, it is still sort of unfair to the artists.

Should downloading be a crime at all? Nothing was hurt except a tired, broken, obsolete and extremely inefficient business model that needs to be killed off. If you buy from the grocery store, did you just hurt the fast food industry business model? If you drive a car, did you hurt buggy whip manufacturers? Yes, yes you did! Why aren't those actions crimes, why does the music industry get such special status, get to cling to their business model of choice, when there are other perfectly viable models they could use?

Comment Copyright Alert Sys (Score 1) 88

If only! Choices of Internet providers are few. Do you want provider A or provider B, both of whom are in the Copyright Alert System?

My ISP texted me a CAS notice once. I was plenty angry about the accusation, the system, and the premises the whole thing is built on, as well as their choice of communication medium, but what could I do? Who could I switch to? I looked for alternatives and found nothing but another member of the CAS, though I am in a major metropolitan area.

Comment Re:Unfortunately no and I have a reason (Score 1) 381

CLRS is no picnic for people who aren't very good at math

That's true. The first chapters wade into big O notation, in ways that don't match the standards of clarity of the rest of the book. You shouldn't need calculus to understand big O. It's good to show how to apply calculus to these problems, and calculus is a natural fit for the necessary math, but the student shouldn't be pushed into a refresher course in calculus to comprehend the basic concepts. The authors try to fill in some of the mathematical knowledge they apply in the next sections, rather than restrict themselves to basic algebra.

Comment Re:Unfortunately no and I have a reason (Score 1) 381

How about a car analogy? Algorithms is like engine and transmission design. That the driver can easily drive the car over a cliff or into a wall, that driving takes considerable skill and constant attention to keep the car on the road, is not the concern of the motor designers, nor should it be.

About as far as engine design can go to enhance safety, apart from ensuring that the engine doesn't blow up or make an oil slick on the highway and cause an accident, is stuff like limiting the maximum output, and therefore speed, and add means for mechanical and computerized control that can be used by safety features, but need not be.

Comment Re:Unfortunately no and I have a reason (Score 4, Interesting) 381

CLR is Introduction to Algorithms by Cormen, Leiserson and Rivest. The S in CLRS is for Stein, who joined the team for the 2nd edition. When CLR came out in 1990, it was hailed as the best algorithms textbook ever, and what an algorithms textbook should be, a huge jump in readability and clarity over the not wholly satisfying existing algorithms textbooks. It uses pseudocode, instead of a real programming language. Allowed the algorithms to be presented cleanly, without any boilerplate code, overhead, or worries about limitations, no need for tedious checks for array out of bounds, numeric overflow, or out of memory, or invalid input. Don't have to declare any variables, or figure out how many elements an array needs.

The Abelson and Sussman textbook, Structure and Interpretation of Computer Programs, uses LISP (actually Scheme). There are quite a few LISP fanatics who passionately feel it is still the best programming language made, citing such reasons as the simplicity of writing an interpreter for it. However, that textbook is pretty difficult. The authors didn't appreciate how hard recursion can be for many students to understand, and LISP and functional programming in general uses recursion so heavily it's the proverbial hammer for every nail of a programming problem.

Since then, programming languages have improved. Still not good enough for the textbook, but closer.

Slashdot Top Deals

Intel CPUs are not defective, they just act that way. -- Henry Spencer

Working...