Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Quite sad how bloated everything is (Score 3, Insightful) 487

First, you only have to have ONE person in your org write that custom string class that does exactly what you want, no unpredictable side effects, no bloat.

That 15 minutes pays itself back almost immediately, both in easier debugging (less code to debug) and quicker compile times,

I wouldn't say it's less code to debug, but more, because now you have to maintain your string class.

Second, 3rd party libraries are always going to be a problem, but usually you just give them a pointer to (a copy of) the data structure, never to your class. No big deal. I null-terminated string (c-style string) is a null-terminated string. A string with the first n bytes giving the actual size (a pascal-style string, can also be used for BLOBs) is a string with the first n bytes giving the actual size. These are the two standard ways of modeling string data.

These are the standards, but Crazy Ass Corp Super Deluxe Hyper-whatever Library is going to do whatever you're not doing, and in a way that you can't just point to the internal C string. Never underestimate vendors: instead of your nice, 1960s style null terminated array of 1-byte characters, they're going to an array of 64-bit integers where they've packed in multiple 8-byte characters, but have decided to leave the last byte of each 64-bit integer as 0xFF for future use and they use EBDIC. Yes, this example is highly contrived and nonsensical, but never underestimate the inability of your colleagues to write software.

This doesn't even touch on the STL's various algorithms to e.g. loop over all characters in a string and perform a function. Again, it's easy to write it yourself, but the STL is written in a nice, general fashion that makes it easier to interoperate, makes it easier to understand what is going on, and doesn't require you to continuously reinvent the wheel. Yes, once you write your BetterString class, you can reuse it, but over time you will keep adding functionality to it until it becomes std::string, and your office on the other side of the country may not know and may have written their own, etc.

... because you can either pay for that optimization ONCE, at coding time, or forever at run-time. And that "forever" gets propagated to any other code that exercises that code, either as a separate routine, or compiled in as part of the program.

But you don't pay for it over and over again: your target audience is running machines with at least 512MB of RAM, very likely 1GB of RAM at least, and many will have at least 2GB of RAM. Saving, say, 100K of RAM by not using the well defined library string class is not a useful optimization, outside of more specialized problem domains. Outside of your underpowered embedded type systems or extreme high performance game with custom memory allocation or massively parallel real time trading application where each 0.000001 nanosecond of delay costs you trillions of dollars, that 100K is dwarfed by every other facet of your program for anything nontrivial. Grandpa's PDP-11 can't even run your target OS(es), why do we care that our program might be RAM-lean enough to fit in its memory?

Comment Re:Quite sad how bloated everything is (Score 3, Insightful) 487

Then again, today's programmers would rather import the whole STL just to be able to use one String, rather than take 15 minutes to write their own class. (oops, they couldn't write one in 15 minutes ... oh well ...)

Now everyone is writing their own String class, you have to pay them for that effort. That 15 minutes may not seem like a lot, but if everyone is doing shit like that all the time, the costs will add up. Also, at some point you will want to interoperate with some third party library. Wouldn't it be great if there were some sort of standardized String class so you don't have to convert from your String to their (inevitably screwy) String class? Repeat this for many datastructures and third party tools and libraries.

Higher level languages didn't arise for the hell of it; if we needed to be worried about 128k of RAM, we'd still be writing code like we did in the old days. Now, we don't have to (minus certain domains), so why not trade space for time / money? We make all kinds of optimization trade offs already; ease of maintenance tends to not be one we often think of.

Comment Re:Why ignore US? (Score 1) 349

One reason it's "only on AT&T" is that AT&T is GSM while Verizon is CDMA. The two technologies are incompatible, and unless you want each phone to also have a CDMA radio (which is pretty much only used in the US and in another form Japan, IIRC), it's AT&T /T-Mobile only.

What really sucks is that even an unlocked phone will not reduce your monthly, unlike most other places. I would love for that model to be here.

Comment Re:Why ignore US? (Score 1) 349

The problem is only about one percent of those sales are in the windows 7 ecosystem according to figures I've read.

Its like trying to release a new flavor of Nutella... Its mostly going to sell to current customers... so do you do that in Italy or Wyoming... I'm thinking... not the US.

I was under the impression WP7 sales were just as terrible in Europe as in the US. Am I mistaken?

Comment Re:Oh ffs (Score 2) 622

What Schmidt did was a legal form of corporate espionage. Using patents to hinder large companies or trample small companies is a legal form of sabotage.
 

Patents have no power to do anything but hold up your competition (or make their products more expensive than your own). That's their entire purpose: legal monopoly on using a certain idea.

Comment Re:Err ... (Score 1) 990

No, it's been known since at least sometime in the 30s that there would be less and less need for labor in the future. What wasn't foreseen was the willingness of the working class to allow wealth to collect at the top and the increased consumption of things that people don't particularly want or need.

If people don't want things, why are they consuming them? It's not like this stuff rains from the sky, they have to go to the store and buy it.

Comment Re:How's about this... (Score 1) 569

One: It never worked. People still fucked even when the priests all said not to.

Two: Average age of puberty has fallen quite a bit. In the 1840s, depending on the country the average age of first period was around 15-18. It is now considerably less than that: 9-13.

Because puberty is when sexual maturity happens, wouldn't it make sense that a population that is now sexually mature at a younger age would also be having sex at younger ages? This of course assumes that the average age of loss of virginity has in fact fallen (I wouldn't doubt it).

Comment Re:One company (Score 1) 461

In my experience the local bookstore duckweed quite a bit. There was a terrible selection of books, almost as bad as the likes of Walmart and Target. Nothing technical at all, terrible sci fi section. Borders, Barnes and noble, and the like were a massive step up in quality. Perhaps in a city a local store would be great, but here they were more expensive for worse quality, worse selection, and worse ability to order anything.

Slashdot Top Deals

Living on Earth may be expensive, but it includes an annual free trip around the Sun.

Working...