Wednesday, December 19, 2007

Code's Worst Enemy

I'm a programmer, and I'm on vacation today. Guess what I'm doing? As much as I'd love to tell you I'm sipping Mai Tais in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Bahamas, what I'm actually doing on my vacation is programming.

So it's a "vacation" only in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 HR sense – I'm taking official time off work, to give myself some free time to get my computer game back online. It's a game I started writing about ten years ago, and spent about seven years developing. It's been offline for a while and I need to bring it back up, in part so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 players will stop stalking me. It's going to take me at least a week of all-day days, so I had to take a vacation from work to make it happen.

Why did my game go offline? Not for want of popularity. It's a pretty successful game for a mostly part-time effort from one person. I've had over a quarter million individuals try it out (at least getting as far as creating a character), and tens of thousands of people who've spent countless hours playing it over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 years. It's won awards and been featured in magazines; it's attracted cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 attention of game portals, potential investors, and whole schools full of kids.

Yup, kids. It was supposed to be a game for college students, but it's been surprisingly popular with teenagers and even pre-teens, who you'd think would be off playing some 3D console game or ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r. But I wrote it for myself, and apparently cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are sufficient people who like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same kinds of games I do to create a sustainable community.

I took cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game down for all sorts of mundane reasons - it needed some upgrades, work got busy, I didn't have lots of time at nights, etc. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 mundane reasons all really boil down to just one racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r deeper problem: cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base is too big for one person to manage.

I've spent nearly ten years of my life building something that's too big.

I've done a lot of thinking about this — more than you would probably guess. It's occupied a large part of my technical thinking for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 past four or five years, and has helped shaped everything I've written in that time, both in blogs and in code.

For cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of this little rant, I'm going to assume that you're a young, intelligent, college age or even high school age student interested in becoming a better programmer, perhaps even a great programmer.

(Please – don't think I'm implying that I'm a great programmer. Far from it. I'm a programmer who's committed decades of terrible coding atrocities, and in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 process I've learned some lessons that I'm passing along to you in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 hopes that it'll help you in your quest to become a great programmer.)

I have to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 assumption that you're young in order to make my point, because if I assume I'm talking to "experienced" programmers, my blood pressure will rise and I will not be able to focus for long enough to finish my rant. You'll see why in a bit.

Fortunately for me, you're young and eager to learn, so I can tell you how things really are. Just keep your eyes open for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next few years, and watch to see if I'm right.

Minority View


I happen to hold a hard-won minority opinion about code bases. In particular I believe, quite staunchly I might add, that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 worst thing that can happen to a code base is size.

I say "size" as a placeholder for a reasonably well-formed thought for which I seem to have no better word in my vocabulary. I'll have to talk around it until you can see what I mean, and perhaps provide me with a better word for it. The word "bloat" might be more accurate, since everyone knows that "bloat" is bad, but unfortunately most so-called experienced programmers do not know how to detect bloat, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y'll point at severely bloated code bases and claim cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're skinny as a rail.

Good thing we're not talking to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m, eh?

I say my opinion is hard-won because people don't really talk much about code base size; it's not widely recognized as a problem. In fact it's widely recognized as a non-problem. This means that anyone sharing my minority opinion is considered a borderline lunatic, since what rational person would rant against a non-problem?

People in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 industry are very excited about various ideas that nominally help you deal with large code bases, such as IDEs that can manipulate code as "algebraic structures", and search indexes, and so on. These people tend to view code bases much cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way construction workers view dirt: cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y want great big machines that can move cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dirt this way and that. There's conservation of dirt at work: you can't compress dirt, not much, so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir solution set consists of various ways of shoveling cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dirt around. There are even programming interview questions, surely metaphorical, about how you might go about moving an entire mountain of dirt, one truck at a time.

Industry programmers are excited about solutions to a big non-problem. It's just a mountain of dirt, and you just need big tools to move it around. The tools are exciting but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dirt is not.

My minority opinion is that a mountain of code is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 worst thing that can befall a person, a team, a company. I believe that code weight wrecks projects and companies, that it forces rewrites after a certain size, and that smart teams will do everything in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir power to keep cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir code base from becoming a mountain. Tools or no tools. That's what I believe.

It turns out you have to have something bad happen to you before you can hold my minority opinion. The bad thing that happened to me is that I wrote a beautiful game in an ugly language, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 result was lovely on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 outside and quite horrific internally. The average industry programmer today would not find much wrong with my code base, aside from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 missing unit tests (which I now regret) that would, alas, double cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of my game's already massive 500,000-line code base. So cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 main thing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y would find wrong with it is, viewed in a certain way, that it's not big enough. If I'd done things perfectly, according to today's fashions, I'd be even worse off than I am now.

Some people will surely miss my point, so I'll clarify: I think unit testing is great. In fact I think it's critical, and I vastly regret not having unit tests for my game. My point is that I wrote cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way most experienced programmers would tell you to write that kind of system, and it's now an appallingly unmanageable code base. If I'd done cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "right thing" with unit tests, it would be twice appalling! The apparent paradox here is crucial to understanding why I hold my minority belief about code base size.

Most programmers never have anything truly bad happen to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. In cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rare cases when something bad happens, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y usually don't notice it as a problem, any more than a construction worker notices dirt as a problem. There's just a certain amount of dirt at every site, and you have to deal with it: it's not "bad"; it's just a tactical challenge.

Many companies are faced with multiple million lines of code, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y view it as a simple tools issue, nothing more: lots of dirt that needs to be moved around occasionally.

Most people have never had to maintain a half-million line code base singlehandedly, so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir view of things will probably be different from mine. Hopefully you, being cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 young, eager-to-learn individual that you are, will realize that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only people truly qualified to express opinions on this matter are those who have lived in (and helped create) truly massive code bases.

You may hear some howling in response to my little rant today, and a lot of hand-wavy "he just doesn't understand" dismissiveness. But I posit that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 folks making cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se assertions have simply never been held accountable for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 messes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y've made.

When you write your own half-million-line code base, you can't dodge accountability. I have nobody to blame but myself, and it's given me a perspective that puts me in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 minority.

It's not just from my game, eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r. That alone might not have taught me cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lesson. In my twenty years in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 industry, I have hurled myself forcibly against some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 biggest code bases you've ever imagined, and in doing so I've learned a few things that most people never learn, not in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir whole career. I'm not asking you to make up your mind on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 matter today. I just hope you'll keep your eyes and ears open as you code for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next few years.

Invisible Bloat


I'm going to try to define bloat here. I know in advance that I'll fail, but hopefully just sketching out cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem will etch out some patterns for you.

There are some things that can go wrong with code bases that have a nice intuitive appeal to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m, inasmuch as it's not difficult for most people to agree that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're "bad".

One such thing is complexity. Nobody likes a complex code base. One measure of complexity that people sometimes use is "cyclomatic complexity", which estimates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 possible runtime paths through a given function using a simple static analysis of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code structure.

I'm pretty sure that I don't like complex code bases, but I'm not convinced that cyclomatic complexity measurements have helped. To get a good cyclomatic complexity score, you just need to break your code up into smaller functions. Breaking your code into smaller functions has been a staple of "good design" for at least ten years now, in no small part due to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 book Refactoring by Martin Fowler.

The problem with Refactoring as applied to languages like Java, and this is really quite central to my cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365sis today, is that Refactoring makes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base larger. I'd estimate that fewer than 5% of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 standard refactorings supported by IDEs today make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code smaller. Refactoring is like cleaning your closet without being allowed to throw anything away. If you get a bigger closet, and put everything into nice labeled boxes, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n your closet will unquestionably be more organized. But programmers tend to overlook cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fact that spring cleaning works best when you're willing to throw away stuff you don't need.

This brings us to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 second obviously-bad thing that can go wrong with code bases: copy and paste. It doesn't take very long for programmers to learn this lesson cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 hard way. It's not so much a rule you have to memorize as a scar you're going to get whecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r you like it or not. Computers make copy-and-paste really easy, so every programmer falls into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trap once in a while. The lesson you eventually learn is that code always changes, always always always, and as soon as you have to change cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same thing in N places, where N is more than 1, you'll have earned your scar.

However, copy-and-paste is far more insidious than most scarred industry programmers ever suspect. The core problem is duplication, and unfortunately cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are patterns of duplication that cannot be eradicated from Java code. These duplication patterns are everywhere in Java; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're ubiquitous, but Java programmers quickly lose cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability to see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m at all.

Java programmers often wonder why Martin Fowler "left" Java to go to Ruby. Although I don't know Martin, I think it's safe to speculate that "something bad" happened to him while using Java. Amusingly (for everyone except perhaps Martin himself), I think that his "something bad" may well have been cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 act of creating cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 book Refactoring, which showed Java programmers how to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir closets bigger and more organized, while showing Martin that he really wanted more stuff in a nice, comfortable, closet-sized closet.

Martin, am I wrong?

As I predicted would happen, I haven't yet defined bloat except in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 vaguest terms. Why is my game code base half a million lines of code? What is all that code doing?

Design Patterns Are Not Features


The ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r seminal industry book in software design was Design Patterns, which left a mark cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 width of a two-by-four on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 faces of every programmer in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world, assuming cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world contains only Java and C++ programmers, which cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y often do.

Design Patterns was a mid-1990s book that provided twenty-three fancy new boxes for organizing your closet, plus an extensibility mechanism for defining new types of boxes. It was really great for those of us who were trying to organize jam-packed closets with almost no boxes, bags, shelves or drawers. All we had to do was remodel our houses to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 closets four times bigger, and suddenly we could make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m as clean as a Nordstrom merchandise rack.

Interestingly, sales people didn't get excited about Design Patterns. Nor did PMs, nor marketing folks, nor even engineering managers. The only people who routinely get excited about Design Patterns are programmers, and only programmers who use certain languages. Perl programmers were, by and large, not very impressed with Design Patterns. However, Java programmers misattributed this; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y concluded that Perl programmers must be slovenly, no good bachelors who pile laundry in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir closests up to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ceiling.

It's obvious now, though, isn't it? A design pattern isn't a feature. A Factory isn't a feature, nor is a Delegate nor a Proxy nor a Bridge. They "enable" features in a very loose sense, by providing nice boxes to hold cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 features in. But boxes and bags and shelves take space. And design patterns – at least most of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 patterns in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Gang of Four" book – make code bases get bigger. Tragically, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only GoF pattern that can help code get smaller (Interpreter) is utterly ignored by programmers who ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 names of Design Patterns tatooed on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir various body parts.

Dependency Injection is an example of a popular new Java design pattern that programmers using Ruby, Python, Perl and JavaScript have probably never heard of. And if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y've heard of it, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y've probably (correctly) concluded that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y don't need it. Dependency Injection is an amazingly elaborate infrastructure for making Java more dynamic in certain ways that are intrinsic to higher-level languages. And – you guessed it – DI makes your Java code base bigger.

Bigger is just something you have to live with in Java. Growth is a fact of life. Java is like a variant of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game of Tetris in which none of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pieces can fill gaps created by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r pieces, so all you can do is pile cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m up endlessly.

Millions of Lines of Code


I recently had cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 opportunity to watch a self-professed Java programmer give a presentation in which one slide listed Problems (with his current Java system) and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next slide listed Requirements (for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wonderful new vaporware system). The #1 problem he listed was code size: his system has millions of lines of code.

Wow! I've sure seen that before, and I could really empathize with him. Geoworks had well over ten million lines of assembly code, and I'm of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 opinion that this helped bankrupt cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m (although that also appears to be a minority opinion – those industry programmers just never learn!) And I worked at Amazon for seven years; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y have well over a hundred million lines of code in various languages, and "complexity" is frequently cited internally as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir worst technical problem.

So I was really glad to see that this guy had listed code size as his #1 problem.

Then I got my surprise. He went on to his Requirements slide, on which he listed "must scale to millions of lines of code" as a requirement. Everyone in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 room except me just nodded and accepted this requirement. I was floored.

Why on earth would you list your #1 problem as a requirement for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 new system? I mean, when you're spelling out requirements, generally you try to solve problems racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than assume cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're going to be created again. So I stopped cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 speaker and asked him what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 heck he was thinking.

His answer was: well, his system has lots of features, and more features means more code, so millions of lines are Simply Inevitable. "It's not that Java is verbose!" he added – which is pretty funny, all things considered, since I hadn't said anything about Java or verbosity in my question.

The thing is, if you're just staring in shock at this story and thinking "how could that Java guy be so blind", you are officially a minority in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 programming world. An unwelcome one, at that.

Most programmers have successfully compartmentalized cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir beliefs about code base size. Java programmers are unusually severe offenders but are by no means cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only ones. In one compartment, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y know big code bases are bad. It only takes grade-school arithmetic to appreciate just how bad cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y can be. If you have a million lines of code, at 50 lines per "page", that's 20,000 pages of code. How long would it take you to read a 20,000-page instruction manual? The effort to simply browse cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base and try to discern its overall structure could take weeks or even months, depending on its density. Significant architectural changes could take months or even years.

In cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r compartment, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir IDE makes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size a non-issue. We'll get to that shortly.

And a million lines is nothing, really. Most companies would love to have merely a million lines of code. Often a single team can wind up with that much after a couple years of hacking. Big companies cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se days are pushing tens to hundreds of millions of lines around.

I'll give you cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 capsule synopsis, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 one-sentence summary of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 learnings I had from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Bad Thing that happened to me while writing my game in Java: if you begin with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 assumption that you need to shrink your code base, you will eventually be forced to conclude that you cannot continue to use Java. Conversely, if you begin with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 assumption that you must use Java, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n you will eventually be forced to conclude that you will have millions of lines of code.

Is it worth cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 trade-off? Java programmers will tell you Yes, it's worth it. By doing so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're tacitly nodding to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir little compartment that realizes big code bases are bad, so you've at least won that battle.

But you should take anything a "Java programmer" tells you with a hefty grain of salt, because an "X programmer", for any value of X, is a weak player. You have to cross-train to be a decent athlete cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se days. Programmers need to be fluent in multiple languages with fundamentally different "character" before cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y can make truly informed design decisions.

Recently I've been finding that Java is an especially bad value for X. If you absolutely must hire an X programmer, make sure it's Y.

I didn't really set out to focus this rant on Java (and Java clones like C#, which despite now being a "better" language still has Java's fundamental character, making it only a marginal win at best.) To be sure, my minority opinion applies to any code base in any language. Bloat is bad.

But I find myself focusing on Java because I have this enormous elephant of a code base that I'm trying to revive this week. Can you blame me? Hopefully someone with a pet C++ elephant can come along and jump on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 minority bandwagon with me. For now, though, I'll try to finish my explanation of bloat as a bona-fide problem using Java for context.

Can IDEs Save You?


The Java community believes, with near 100% Belief Compliance, that modern IDEs make code base size a non-issue. End of story.

There are several problems with this perspective. One is simple arithmetic again: given enough code, you eventually run out of machine resources for managing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code. Imagine a project with a billion lines of code, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n imagine trying to use Eclipse or IntelliJ on that project. The machines – CPU, memory, disk, network – would simply give up. We know this because twenty-million line code bases are already moving beyond cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 grasp of modern IDEs on modern machines.

Heck, I've never managed to get Eclipse to pull in and index even my 500,000-line code base, and I've spent weeks trying. It just falls over, paralyzed. It literally hangs forever (I can leave it overnight and it makes no progress.) Twenty million lines? Forget about it.

It may be possible to mitigate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem by moving cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base management off cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 local machine and onto server clusters. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 core problem is really more cultural than technical: as long as IDE users refuse to admit cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is a problem, it's not going to get solved.

Going back to our crazed Tetris game, imagine that you have a tool that lets you manage huge Tetris screens that are hundreds of stories high. In this scenario, stacking cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pieces isn't a problem, so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's no need to be able to eliminate pieces. This is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cultural problem: cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y don't realize cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're not actually playing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right game anymore.

The second difficulty with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 IDE perspective is that Java-style IDEs intrinsically create a circular problem. The circularity stems from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nature of programming languages: cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "game piece" shapes are determined by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language's static type system. Java's game pieces don't permit code elimination because Java's static type system doesn't have any compression facilities – no macros, no lambdas, no declarative data structures, no templates, nothing that would permit cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 removal of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 copy-and-paste duplication patterns that Java programmers think of as "inevitable boilerplate", but which are in fact easily factored out in dynamic languages.

Completing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 circle, dynamic features make it more difficult for IDEs to work cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir static code-base-management magic. IDEs don't work as well with dynamic code features, so IDEs are responsible for encouraging cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 use of languages that require... IDEs. Ouch.

Java programmers understand this at some level; for instance, Java's popular reflection facility, which allows you to construct method names on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fly and invoke those methods by name, defeats an IDE's ability to perform basic refactorings such as Rename Method. But because of successful compartmentalization, Java folks point at dynamic languages and howl that (some) automated refactorings aren't possible, when in fact cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're just as possible in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se languages as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are in Java – which is to say, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're partly possible. The refactorings will "miss" to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 extent that you're using dynamic facilities, whecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r you're writing in Java or any ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r language. Refactorings are essentially never 100% effective, especially as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base is shipped offsite with public APIs: this is precisely why Java has a deprecation facility. You can't rename a method on everyone's machine in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world. But Java folks continue spouting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 provably false belief that automated refactorings work on "all" cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir code.

I'll bet that by now you're just as glad as I am that we're not talking to Java programmers right now! Now that I've demonstrated one way (of many) in which cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're utterly irrational, it should be pretty clear that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir response isn't likely to be a rational one.

Rational Code Size


The rational response would be to take a very big step back, put all development on hold, and ask a difficult question: "what should I be using instead of Java?"

I did that about four years ago. That's when I stopped working on my game, putting it into maintenance mode. I wanted to rewrite it down to, say, 100,000 to 150,000 lines, somewhere in that vicinity, with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact same functionality.

It took me six months to realize it can't be done with Java, not even with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stuff cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y added to Java 5, and not even with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stuff cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're planning for Java 7 (even if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y add cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cool stuff, like non-broken closures, that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java community is resisting tooth and nail.)

It can't be done with Java. But I do have a big investment in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java virtual machine, for basically cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same reason that Microsoft now has a big investment in .NET. Virtual machines make sense to me now. I mean, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y "made sense" at some superficial level when I read cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 marketing brochures, but now that I've written a few interpreters and have dug into native-code compilers, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y make a lot more sense. It's anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r rant as to why, unfortunately.

So taking for granted today that VMs are "good", and acknowledging that my game is pretty heavily tied to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM – not just for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 extensive libraries and monitoring tools, but also for more subtle architectural decisions like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 threading and memory models – cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rational answer to code bloat is to use anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r JVM language.

One nice thing about JVM languages is that Java programmers can learn cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m pretty fast, because you get all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 libraries, monitoring tools and architectural decisions for free. The downside is that most Java programmers are X programmers, and, as I said, you don't want X programmers on your team.

But since you're not one of those people who've decided to wear bell-bottom polyester pants until cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 day you die, even should you live unto five hundred years, you're open to language suggestions. Good for you!

Three years ago, I set out to figure out which JVM language would be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best code-compressing successor to Java. That took a lot longer than I expected, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 answer was far less satisfactory than I'd anticipated. Even now, three years later, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 answer is still a year or two away from being really compelling.

I'm patient now, though, so after all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dust settles, I know I've got approximately a two-year window during which today's die-hard Java programmers are writing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir next multi-million line disaster. Right about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're putting togecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir next Problems/Requirements slide, I think I'll actually have an answer for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m.

In cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 meantime, I'm hoping that I'll have found time to rewrite my game in this language, down from 500,000 lines to 150,000 lines with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exact same functionality (plus at least anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r 50k+ for unit tests.)

The Next Java


So what JVM language is going to be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Next Java?

Well, if you're going for pure code compression, you really want a Lisp dialect: Common Lisp or Scheme. And cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are some very good JVM implementations out cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re. I've used cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. Unfortunately, a JVM language has to be a drop-in replacement for Java (ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rwise a port is going to be a real logistics problem), and none of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Lisp/Scheme implementors seems to have that very high on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir priority list.

Plus everyone will spit on you. People who don't habitually spit will expectorate up to thirty feet, like zoo camels, in order to bespittle you if you even suggest cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 possibility of using a Lisp or Scheme dialect at your company.

So it's not gonna be Lisp or Scheme. We'll have to sacrifice some compression for something a bit more syntactically mainstream.

It could cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365oretically be Perl 6, provided cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Parrot folks ever actually get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir stuff working, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're even more patient than I am, if you get my drift. Perl 6 really is a pretty nice language design, for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 record – I was really infatuated with it back in 2001. The love affair died about five years ago, though. And Perl 6 probably won't ever run on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM. It's too dependent on powerful Parrot features that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM will never support. (I'd venture that Parrot probably won't ever support cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r, but that would be mean.)

Most likely New Java is going to be an already reasonably popular language with a very good port to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM. It'll be a language with a dedicated development team and a great marketing department.

That narrows cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 field from 200+ languages down to maybe three or four: JRuby, Groovy, Rhino (JavaScript), and maybe Jython if it comes out of its coma.

Each of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se languages (as does Perl 6) provides mechanisms that would permit compression of a well-engineered 500,000-line Java code base by 50% to 75%. Exactly where cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dart lands (between 50% and 75%) remains to be seen, but I'm going to try it myself.

I personally tried Groovy and found it to be an ugly language with a couple of decent ideas. It wants to be Ruby but lacks Ruby's elegance (or Python's for that matter). It's been around a long time and does not seem to be gaining any momentum, so I've ruled it out for my own work. (And I mean permanently – I will not look at it again. Groovy's implementation bugs have really burned me.)

I like Ruby and Python a lot, but neicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r JVM version was up to snuff when I did my evaluation three years ago. JRuby has had a lot of work done to it in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 meantime. If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 people I work with weren't so dead-set against Ruby, I'd probably go with that, and hope like hell that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 implementation is eventually "fast enough" relative to Java.

As it happens, though, I've settled on Rhino. I'll be working with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Rhino dev team to help bring it up to spec with EcmaScript Edition 4. I believe that ES4 brings JavaScript to rough parity with Ruby and Python in terms of (a) expressiveness and (b) cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability to structure and manage larger code bases. Anything it lacks in sugar, it more than makes up for with its optional type annotations. And I think JavaScript (especially on ES4 steroids) is an easier sell than Ruby or Python to people who like curly braces, which is anyone currently using C++, Java, C#, JavaScript or Perl. That's a whooole lot of curly brace lovers. I'm nothing if not practical cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se days.

I don't expect today's little rant to convince anyone to share my minority opinion about code base size. I know a that few key folks (Bill Gates, for instance, as well as Dave Thomas, Martin Fowler and James Duncan Davidson) have independently reached cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same conclusion: namely, that bloat is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 worst thing that can happen to code. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y all got cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re via painful things happening to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m.

I can't exactly wish for something painful to happen to Java developers, since hey, it's already happening; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y've already taught cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365mselves to pretend it's not hurting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m.

But as for you, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 eager young high school or college student who wants to become a great programmer someday, hopefully I've given you an extra dimension to observe as your tend your code gardens for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next few years.

When you're ready to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 switch, well, Mozilla Rhino will be ready for you. It works great today and will be absolutely outstanding a year from now. And I sincerely hope that JRuby, Jython and friends will also be viable Java alternatives for you as well. You might even try cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m out now and see how it goes.

Your code base will thank you for it.

185 Comments:

Blogger John Siracusa said...

If you could snap your fingers and bring Perl 6 on Parrot's implementation up to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 level of Rhino's, would you still choose JavaScript?

7:07 AM, December 19, 2007  
Blogger piyo said...

I wish he could snap his fingers to get rid of his anti-Ruby collaborators. Ha. :-)

But, I'm training for decent athlete status myself.

And I'm hoping for a quick release of that Emacs + JavaScript IDE / byte-code compiler. :-)

7:46 AM, December 19, 2007  
Blogger Alec Lanter said...

I think you make a lot of good points in your post. I also, however, think you're confusing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem of codebase size with code duplication. I'm all for removing duplication from my code, and keeping it as small as possible in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 meantime. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's a point where making code smaller by using macros, terse languages and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 like actually harms cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 maintainability of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code as much as code bloat does.

Just so you know where I'm coming from, I've worked professionally only in C++ and Java. I think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're fine tools for a lot of jobs, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y do leave a lot to be desired as you've pointed out. My personal projects, however, range from Perl, Python, Java, C++, and Assembly all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way up to my most recent favorite language, which is Ruby. Ruby offers a lot of extra power, and I've got a personal project I'm working on right now that's using JRuby. (I agree wholeheartedly with you about VMs, by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way.)

But that doesn't mean that I like Ruby just for its terseness. As a good example of what horrors you can inflict on people in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same of reducing code size, go take a look at this MUD written in Ruby in only 15 lines of code. Would YOU want to try and add a feature to that? Granted, it's an extreme example, but I think it illustrates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem with your cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365sis. Yes, codebase size can be a problem. But reducing size by decreasing readability is just as big of a problem.

7:50 AM, December 19, 2007  
Blogger cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365mgt said...

Anyone dumb enough to have curly braces as a requirement is never never going to consider Javascript to be a legitimate language for developing "real" apps

Did you consider Scala at all? Ramming JRuby down people's throats still sounds like a good option too ;)

8:08 AM, December 19, 2007  
Blogger Justin D-Z said...

I tried to "learn programming" via Java 1.1 in high school back in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 day, self-taught. My plan was to build a MUD server and client and use XML for data storage. It was... fun. Years later, in college, I did it again in Java and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n in C#, always getting to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point of no longer liking what I was doing at pretty much cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same stage of functionality.

Recently, as a way of evaluating cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 true ninja-like qualities of Ruby, I decided to re-write it using Ruby and YAML.

My personal experience, to your point, was that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Ruby version came out 1) massively smaller in code size, 2) far easier to debug and pick up after long periods of awayness, 3) in at least 1/3 of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time it took previously and 4) had ass-loads more functionality in that time frame.

Now, you could argue that my first go was as a green programmer, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 college versions were written while I was earning a degree in software engineering and (WORSE) cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Ruby version was written after having worked in Marketing for a few years. Marketing!

I used Smultron. Not really scalability concerns, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re. It turned out that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 benefits of an IDE were only valuable because what I was doing was needlessly complex enough that an IDE became relevant. IDEs are not features of a lanaguage, in my opinion, but necessities of a language due to a lack of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r features - at least to some scale.

Good stuff. As a poet, I loved cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 camel metaphor.

8:08 AM, December 19, 2007  
Blogger Unknown said...

Can you say a bit more about why, exactly, you're up at 500,000 lines of code? I can guess, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 idea of one programmer working along and getting to that amount of code is a bit startling.

8:10 AM, December 19, 2007  
Blogger Vlad Patryshev said...

Good! Let's go with JavaScript, also known (to some) as Lisp/Scheme in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sheeps clothing.

And you have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right word to sell it: "Interpreter Pattern". You cannot sell anything to Java Community without first saying a spell from GoF book.

8:15 AM, December 19, 2007  
Blogger cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 thin man said...

What about SCALA?

I find SCALA to be a pretty easy language to get excited about. Great expressiveness and integration into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM.

8:18 AM, December 19, 2007  
Blogger Tim Gebhardt said...

What about something like JPype:
http://jpype.sourceforge.net/

For some stuff you can use Python when convenient (like string processing) and for ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r stuff you can use Java (like library support).

8:19 AM, December 19, 2007  
Blogger Dan Bernier said...

@Alec,

> Yes, codebase size can be a problem. But reducing size by decreasing readability is just as big of a problem.

Lots of people assume software's length and clarity are linearly correlated. But consider this:

"I think what is wanted with programming languages and programs intended for human consumption is something along cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lines of "cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 greatest meaning-based compression" (or "greatest semantic compression", to be more succinct). If greatest possible compression were cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 goal, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n all that would be needed to write succinct programs would be to run cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 final program through a compression program like gzip."

That comes from this post, succinctness = power. Since I originally found it from Steve Yegge's Ten Challenges, I think that's probably what he's going for.

8:49 AM, December 19, 2007  
Blogger zby said...

Just tossing an idea - beside reducing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dirt you could also ship it to someone else. I mean someone who would actually welcome it.

Hmm I think I'll stop being metaphorical now - how about
turning parts of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 program as libraries and publishing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m with some Open Source license?

8:52 AM, December 19, 2007  
Blogger Jonathan Turner said...

Sir C.A.R. Hoare agrees: "The price for reliability is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pursuit of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 utmost simplicity. It is a price which cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 very rich find most hard to pay." (cribbed from Dijkstra's EWD1304)

Count me in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 minority, too. Code size is a huge problem, and like you suggest, programmers who aren't familiar with templates, generics, lambdas, and tuples (I'd say macros, too, but I'll leave that for lispers) will be missing useful tools for compressing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir code.

OTOH, today you don't get checks for writing with languages that have strong support for those approaches. That is, unless you start your own company and sell it for a hefty sum because you got in before anyone else had a chance to finish ;)

9:06 AM, December 19, 2007  
Blogger baryon said...

Amazon has 100 million lines of code? Are you sure? Unbelievable!!! Windows is around 50 million, Solaris is ~ 35 million.

9:10 AM, December 19, 2007  
Blogger Jamie said...

I agree that size can be a big problem (I'm working on a very large Java project) but I'm not convinced that 200,000 lines of Ruby code really is more maintainable than 500,000 lines of Java. We programmers have a lot of experience in dealing with large Java/C/C++ codebases but has anyone got 200,000 lines of Ruby?

Jeff Atwood recently discussed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problems with Bugzilla and its large Perl codebase. Sometimes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 LoC is not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functional complexity of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system.

9:13 AM, December 19, 2007  
Blogger Dan Bernier said...

@Jamie,

> ...I'm not convinced that 200,000 lines of Ruby code really is more maintainable than 500,000 lines of Java...Sometimes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 LoC is not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functional complexity of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system.

Since ruby allows for greater semantic compression, I think a ruby system done well would take much longer to reach 200 kloc, than a Java system would to reach 500 kloc.

The trick is to maximize semantic compression, not just LoC.

9:22 AM, December 19, 2007  
Blogger Unknown said...

Most programmers are Javascript users cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se days. That should not be taken to imply any fondness for curly braces and semicolons. I love cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dynamicism and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 object model. Unfortunately, most people proposing changes to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language want to keep cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 syntax and scrap cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 object model.

9:28 AM, December 19, 2007  
Blogger Mike Weller said...

Just taken a look at Rhino. NBL is shaping up nicely.

9:36 AM, December 19, 2007  
Blogger Unknown said...

Before ruling out Scheme, try
SISC. http://sisc-scheme.org/

Maybe you did this already, but I
never saw you mentioning it in
your blog.

It is a *great* JVM Scheme
implementation, with good
documentation.

I also like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM and this
combination of Scheme and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM
is working very well for me.

SISCWeb (http://siscweb.sourceforge.net/)
is also very nice.

9:38 AM, December 19, 2007  
Blogger Michael Foord said...

That's a lot of words just to say "code is a liability". :-)

9:46 AM, December 19, 2007  
Blogger Srdjan said...

As opposed to everyone else here commenting on code size vs functional complexity vs blah, I really want to ask one question.

Can I join you in your venture of rewriting this game, or is this a solo effort?

9:52 AM, December 19, 2007  
Blogger Unknown said...

Agreed that code size is a problem, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language of choice can definitely lead to bloat.

That being said, I've worked with many smart folks - "good" programmers, who just don't raise cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir level of abstraction even when cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language allows it. And that holds doubly so when time is "of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 essence" - as it often feels when on a deadline.

10:28 AM, December 19, 2007  
Blogger casey said...

Anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r vote for Scala. I like Javascript and Rhino sounds interesting, but Scala is a much more powerful, expressive language.

10:38 AM, December 19, 2007  
Blogger Udi Dahan said...

Suppose you structured your code in such a way that you only had to look at under 1000 LoC at a time in order to do useful work. Would cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 500KLoC be as big a problem?

First of all I would agree that code-base size is as big a problem as you say. However, I would posit that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem be more of a function of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 structure/design of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code, than just cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of LoC.

The latest system I put into production had roughly 500KLoC. Developers would have only a couple thousand LoC in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir IDE open at a time. This came about as a result of a much architectural and design work.

[You can find some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 patterns and frameworks we used on my blog: http://udidahan.weblogs.us]

Thoughts?

10:45 AM, December 19, 2007  
Blogger casey said...

Also, I have a different take on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 'millions of lines of code' problem:

If I leverage 'millions of lines of code' from Apache projects, Eclipse, and a few ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r third-party modules in a small app with a Maven POM, is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same thing?

How about if I have a larger app, like a game, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game engine, logic, etc. are modularized in a similar fashion?

Maybe millions of lines of code are inevitable. But as long as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're well-defined to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point you don't have to pull cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m all into your head at once, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's no problem.

I agree that reorganizing into new containers and shelves won't solve anything. Its all about defining good modules and keeping those modules current and relevant in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 face of unanticipated changes that would cause cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m to otw grow strange appendages.

Why can't that be done in Java? Apache and Eclipse seem to pull it off well enough...

10:48 AM, December 19, 2007  
Blogger Jonathan Turner said...

@Casey

I get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 feeling that's why he chose cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM. He had existing code as well as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 multitude of code that makes up cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM supporting libraries.

10:53 AM, December 19, 2007  
Blogger Unknown said...

Steve, I'm stealing this quote: "Java is like a variant of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game of Tetris in which none of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pieces can fill gaps created by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r pieces, so all you can do is pile cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m up endlessly."

If you ever see it again (which is unlikely with my modest blog) you're welcome to retaliate.

11:01 AM, December 19, 2007  
Blogger Brian Slesinsky said...

I assume when measuring cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of your game, you didn't include cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JDK. That suggests anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r way to reduce lines of code: write code for a more featureful platform. The lines don't disappear, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y become someone else's problem.

11:13 AM, December 19, 2007  
Blogger keithb said...

You know that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fearfulness of bloat applies equally well to documents in natural language, too?

11:31 AM, December 19, 2007  
Blogger OneZeroZeroOne said...

Rhino is a Java implementation of an ECMA script interpreter, right?

How does it do speed-wise?

Are you envisioning a Java program that's just a thin wrapper around Rhino and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "real" program is written in ECMA?

Have you looked at Lua at all?

11:33 AM, December 19, 2007  
Blogger Prashant Rane said...

How about LISP on JVM? Have you looked at clojure?

http://clojure.sourceforge.net/

11:57 AM, December 19, 2007  
Blogger David Rupp said...

+1 Scala.

12:04 PM, December 19, 2007  
Blogger Unknown said...

"Its a poor workman who blames his tools." -- Anonymous

Highly structured languages make complexity possible. Scripting languages fall over before you get anywhere near cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same level of complexity. if you consider that a feature I suppose thats your business.

(And Yes, I've done a lot of Java and a lot of PERL in my day. And C, C++, Modula2... )

I think you probably missed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most important tool you could have used on this project, though now maybe its a bit late...


Effective Java

12:09 PM, December 19, 2007  
Blogger gwon said...

It seems to me that you've experience cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 power of Java and it's allowed you to create something much bigger than you imagined you could. It's probably bigger than you can manage to support. So, this is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point that you have to decide is it a multi-developer project or is it still just your little pet?

There was a lot of text and I skimmed a lot. Did you tell us what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 name of your game is and where to find it when you get it back on line?

12:18 PM, December 19, 2007  
Blogger Unknown said...

Wow, that was long...I read only cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first couple of paragraphs. But I was pleased that I found cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 word "garden" when I searched cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 text, as I believe it is a useful metaphor: If you only "plant" and never "weed", you won't have a pleasing result.

12:24 PM, December 19, 2007  
Blogger Unknown said...

"The Java community believes, with near 100% Belief Compliance, that modern IDEs make code base size a non-issue. End of story.
"

Actually, we believe that IDE's make us much more productive when we have to manage code bases of varying sizes. Big difference than making "code base size a non-issue". Code base size is always an issue in probably any language you write.

Finally, I don't think your 500,000 line Java game is a good example. Mainly because you are cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only one maintaining it and you're cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only one who has written cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code. Try dealing with an OSS project where code contributions come from volunteers who may or may not stick around to maintain cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir code. Coming from that perspective an IDE is invaluable to data mine, debug, and refactor code for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 OSS project leads. Reliable refactoring and code analysis are crucial.

Personally, I feel most of Java's problems lie not with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language itself but with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 libraries and frameworks within cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JDK and outside cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JDK. Rails, is IMO, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only reason Ruby has gotten any traction. Its filling cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 productivity void that EE has generally failed on.

12:36 PM, December 19, 2007  
Blogger gmalicki said...

you people seem to have missed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 coolest (and probably cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fastest) JVM language of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m all...

CLOJURE

google it.

functional programming, macros, software transactional memory, etc.

you can't lose.

1:03 PM, December 19, 2007  
Blogger Tomas said...

+1 Scala

1:06 PM, December 19, 2007  
Blogger Andy Norris said...

Right cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re with you. I have a seemingly smaller problem than you -- 250Klines of C# and a team of people -- but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base is just not as malleable as I'd like it to be.

Over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last 6 months, I've started attacking it from multiple directions.

For one thing, I'm integrating an IronPython interpreter. Initially, this is just for application scriptability, but long-term, I'm hoping we can replace enormous chunks of C# with it in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 upper layers. I picked IronPython because it's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 closest thing to a mature language out cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re that runs on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 .Net CLR.

On cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 flipside, I've started integrating F# (Microsoft's OCaml variant for .Net) in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lowest layers. Initially it's as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 back end for some DSLs that we're using to simplify some messy and complex code, but I'd like to see it start flatly replacing C# in a lot of places. So far, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only real problem with F# is that writing F# libraries to be used from C#, while better than using C# itself, is more cumbersome than writing F# that only has to be called from itself.

The early returns are that this is helping. It seems like a multi-language strategy is at least helping to keep our code's growth rate contained. If it gets proven, I may be able to make a push for using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 new languages to actually shrink cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base, which would be a nice win.

1:08 PM, December 19, 2007  
Blogger NoSalt said...

So what's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game??? I want to play.

1:19 PM, December 19, 2007  
Blogger Joel McCracken said...

I see where you're coming from, but I think you're seeing a symptom as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem. Large code is monstrously hard to manage, but I don't know that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fact that it is large code is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 issue.

Can you give more information about why exactly you think this is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem with your code? How did you reach this conclusion exactly?

1:20 PM, December 19, 2007  
Blogger Unknown said...

Let me prescribe you a better solution:

Java programmers will stop writing bloat codes if Author Stevey stops writing bloat article about bloat Java programs without giving any factual or statistical analysis to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cause (and why cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r P* languages will solve cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem.)

Oh... let's not blame cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 author. Let's just blame English being a bloat and bulky language.

1:24 PM, December 19, 2007  
Blogger PENIX said...

The code size of your rant is too big and bloated.

I tried to load it into my brain, but it just hung, indefinitely, until I force quit it.

1:40 PM, December 19, 2007  
Blogger Justin George said...

I believe cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game in question is Wyvern, which was hosted at http://www.cabochon.com/

It's sort of a mud but with a graphical interface as well.

1:48 PM, December 19, 2007  
Blogger Bob A said...

I think most technologies suffer in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir success - as more people participate in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 community, more competing (and complementary) thoughts/patterns/practices vie for our attention and we understand more about what problems cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 technology didn't solve well. We cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n focus on that and lose sight what problems cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 technology did solve well.

Good software designers need to carefully weigh both sides (instead of getting caught up in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 'throw it out' mindset) and calculate how to bridge cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 gap. On that very tactical point, I totally agree that selective application of dynamic languages in an existing JVM-based application is absolutely cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right way to go and achieve "semantic compression" without sacrificing too much existing investment. Furcá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r, such a decision needs to weigh factors like talent availability - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code most likely will be maintained by a third party.

I'm a Rails novice (and thus, in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 'honeymoon' period), but thoroughly expect cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 community to go through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same contortions in 5(+/-) years. Look at Perl. Look at JavaScript. Extrinsic factors drastically changed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fortunes of both languages in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 preceding 5 years.

Semi-related: http://icedjava.blogspot.com/2007/12/dear-java-thanks-for-complexity-of.html

1:49 PM, December 19, 2007  
Blogger Tim Kerchmar said...

Steve, you sure discounted Lisp fairly quickly considering that you have made no mention that ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r people will be using your code base. Are you unwilling to say that you yourself dislikes Lisp?

I am writing a pretty heavyweight game in Lisp, using real graphics middleware like Gamebryo. I fail to see what a lack of a VM provides, and I wonder if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 speedup from using sbcl/corman common lisp will outweigh cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 immediate performance hit from your application's dependance on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 jvm threading model.

1:50 PM, December 19, 2007  
Blogger Tom Dibble said...

I think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 core premise (your code is 500k lines; unit tests would double it; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is no hope!) is wrong.

Proper modularization, which really requires a good set of unit tests, would fix your problem by making one 500k project into, say, ten 10k projects, each of which acts somewhat independently. At that point, working on any of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 areas of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 application is working on a single 10k application with 9 additional libraries being used (in addition to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 many standard and third-party libraries you are already using).

There is a certain level of verbosity in Java, and much of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 required syntax doesn't do a good job of "fading into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 woodwork" leaving just your functional code. Likewise, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of defined language constructs makes cut-and-paste (which is what patterns are) necessary, and you are right that that is bad. So, point taken cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re. I just don't see that as a 2-5x differential in apparent code complexity. I'd gauge that more as a 10% differential, of course varying depending on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 particulars of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 project.

If dynamic typing is desired in your application hacking that into Java isn't cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best use of your time. Dead stop cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re. If you want/need dynamic types, move off Java.

Still, a 500k application need not be overwhelming, if it was designed "well" in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first place.

So, was cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re something keeping this from being modularly designed?

2:11 PM, December 19, 2007  
Blogger Ken Suda said...

I agree that code size or bloat is an issue, but what is being discussed is really compression. Think of a picture or a movie: Each as some discrete values that are displayed. You could create a file for each for each describing all attributes of each attribute. This cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n properly captures cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Meta data such as shapes and faces. What people have found over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 years is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se files is large. In order to reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size, you can do one of two things: 1) Reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of attributes saved (resolution, depth, etc). 2) Enable some compression method. Compression methods typically look for patterns, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r types as well. Sometimes you do both things at once. Can you take three different pictures and reduce all to a single bit and still tell cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 differences between cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 original images? Nope, not possible.

You can think of lines of code as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same thing. Yes, using macros or anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r language might reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lines of code, but it probably does not reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complexity. Not unless you are also reducing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functionality (as many scripty/webby languages tend to do).

Suppose you have two languages X and W. X has 20 tags and W has 100 tags (instead of tags, I could say functions or operations or syntax or…). You can presume that something written in W will be smaller than something written in X, particularly if W has all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tags of X. Does this make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 program less complex? Not really. Instead of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 developer having to learn 20 things, she now has to learn 100 and that does not include knowing anything about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 program itself, i.e. what it is suppose to do.

So you say cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 previous example does not apply, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n lets try this. Suppose you have languages X and Y. X has 20 tags and Y has 20 tags but lets you use macros. You can presume that something written in Y is smaller than something in X. But is it less complex to understand? Once again, macros are just adding more tags to language Y.

To make matters worse, when you start to combine multiple languages, especially if you count XML as a language (it is really a meta language), cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n not only does cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 developer have to learn all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 used parts of each language used, but has to learn how to use one over anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complexities of moving from one to anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r.

Am I Java Developer? Definitely. Is Java a perfect language for every situation? Definitely Not!! Not even in Most Situations. The same could be said for any language. Any language is going to have issues (proponents, detractors, snobs, and blind followers).

So I said I agreed that code bloat is an issue, yet I went and proved that solving it by using a different language (or yet anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r language) does not solve cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem. I think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 real problem is complexity. The more functionality you have, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more complex it becomes. If you have 500K lines that are easy to read (which your game is not), cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n 150K lines probably does not make it any less complex. Not unless you copied/pasted each line of code 3 times.

Lastly, developers should stop looking for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 “silver bullet” of development. There is no such thing. The next language is not going to solve your problems, nor is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next design book (GoF = GOOFS?), nor cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next management methodology (agile…make me walk instead of run).

2:22 PM, December 19, 2007  
Blogger Schnickschnack said...

Writing and maintaining a multi-million-line Java program is easy enough,
if you manage to split it up into a few hundred sub-projects (libraries)
that each have a very small "surface area" (public interfaces) that hardly
ever change.

Of course, definining cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se interfaces is hard, and keeping cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m non-"leaky"
is even harder. (In a sense, all that easy and obvious interface abstractions
have already have been defined and are now part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 runtime environment
(or event cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 operating system) -- hardly anybody has to implement cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir own
network stack, file system, or process scheduler anymore.

2:25 PM, December 19, 2007  
Blogger oddsocks said...

There are many factors in why a specific language is picked for a software project, my interpretation of what you're saying is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of resulting code base is not given enough priority in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 decision making process.

I understand that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 blog is a rant and so is more emotional racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than about rational analysis but I do think it might be nice to have a follow up where you look at specifics of how Java bloat is eliminated by languages with different features.

When cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 company that I work for did this we actually ended up creating our own language with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 feature list we wanted. Similar to you, one of our desires was to have it work on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM.

This language (called Cal) has now been open sourced and can be found here:
http://openquark.org/

2:33 PM, December 19, 2007  
Blogger Paul W. Homer said...

I've hit a few painful things over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 years, but more importantly I saw cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 light ages ago when I got to work on an incredibly elegant bit of code. The language has some effect, but more often it is using brute force to pound out your solution that produces fat and ugly code.

Bloat and artificial complexity don't have to be problems. They often stem from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 project's organization structure and/or its processes. Even a single developer can cause a problem. If you had been more disciplined, I bet your 500,000 lines could have easily been implemented in half, if not a quarter of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size. I've been ranting about that for years, but as you say nobody takes size seriously as an issue.

That said, I do find Java to be much fatter than languages like Perl or C. Some days it feels so close to VB that it makes me shiver.

Paul.

2:39 PM, December 19, 2007  
Blogger fog said...

Boo. Ok, its CLR, not JVM but at least you get JVM support with IKVM. And Boo should be tried once, just for its logo if not for anything else.

(Oh, completely agree on bloat. Sure.)

3:09 PM, December 19, 2007  
Blogger Antti said...

Dare I mention Fortress?

3:10 PM, December 19, 2007  
Blogger Chris Haseman said...

I'm a mobile developer so I feel your pain. Code base is a real problem for us...as every byte we put out in code is a byte less that we can use for heap memory. Systems are getting easier, but it used to be a real problem. Now just imaging having to write a Java program in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 least number of lines possible...and you start to see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem with mobile dev. :-)

3:20 PM, December 19, 2007  
Anonymous Anonymous said...

You know, Steve,

you kinda fail to explain why this is a problem in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 larger scheme of things and how it fits into that scheme. For example, in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 old days, car mechanics could take apart and fix an entire car by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365mselves. Same for television amateurs. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se days, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 amount of computer technology and integration in such machines makes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m into mere bystanders. You sound a bit like an old television amateur who bemoans cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 amount of complexity present day's devices represent, while not talking about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 greater picture and at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same time quite enjoying cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 extra functionality or performance his device offers him.

The only thing that can beat complexity is simplicity; does expressiveness elicit simplicity or is it just a way to shrink code? You do not make it clear. If you can shrink your code down to even 20%, just wait a couple of years, and you'll be back to where you started. There's a basic tendency in human culture that bespeaks of this motion, and it is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 desire for more and better. But in principle, size needs to be no enemy; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only requirement is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 amount of information you have to deal with at any level, is kept at a certain minimum. That is why OS X is so praised, and why Windows will for a long time be more popular than desktop Linux: cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 amount of options open to you at any point in time is so very limited and that is what makes it easy to use. The same holds for software. Compare cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 man page for 'rpm' with that of 'dpkg' and you'll see what I mean. Abstraction, small interfaces, limited options, modularisation, hierarchy, layering, you name it.

I am not speaking as a senior programmer, but as one of target audience, not yet familiar with scripting languages. But I also have a bit of a mental block regarding complexity: I cannot hold as many pieces of information 'in vision' and have a bit of a harder time digesting information than most people. Because of that, I'm perhaps a bit better qualified to speak of such things. And I will tell you this: most people - most programmers - do not appreciate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 difficulty people can have with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 digestion and navigation of information, and this applies to everyone. Introducing simplicity at every step and every boundary and every interface, and limited, self-contained areas of relevance for any given viewpoint, is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most important thing in making complex systems simple and manageable.

If you have a system of 7 layers each of which has seven more layers, and so on, into infinity, will it be hard to manage? No. You can easily understand cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 working of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system at any level from any viewpoint, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 levels/area's you cannot see are irrelevant to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 understanding of that part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system you can see at any time. You will need more people to do cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 management of course, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re may be more to manage than if you had not been so vigorous in modularizing, but it will be a lot easier to do.

Maybe my lack of experience with large projects is speaking through, but I just want to make a general point.

3:38 PM, December 19, 2007  
Blogger Unknown said...

I said as much here recently:

http://beust.com/weblog/archives/000462.html

ie, big code bases talk to maintanancea a lot more than your pet language's typing features

But now I see Bob Lee responding to my non-existent comment, so looks like it got pulled. Oh well.

3:46 PM, December 19, 2007  
Blogger Jay Levitt said...

@Udi and Tom:

I'd conjecture that in a way, modularity/limited visibility can make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code "size" problem worse, for a very simple reason: You don't know what's in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re that you aren't looking at.

It's a lot easier to make a small code base "modular", in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sense of orthogonality. If you suddenly realize that you should be abstracting out, say, your text-formatting routines into a text-formatting object or library, you can do that. If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 project is small enough, you can probably just scan through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 thing visually and find all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 text-formatting code. Or you can go tell cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 three ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r guys who work on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code to start using your new library.

When a project has millions of lines of code - you just can't do that. Nobody knows where to find all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 routines that use text formatting. Sure, search capabilities are helpful, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're not all-powerful.

This is a bigger problem with large dev teams, where cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are developers you probably don't even know exist who are, at this very minute, writing something that formats text. But even one-man teams can suffer from it, because you're not always going to remember something you wrote a few years back.

I had cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 recent joy of looking at code I wrote 15 years ago. The first thing I noticed was that I made extensive use of linked lists, but I repeated a lot of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code. At cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time, it was intentional; function calls were too expensive. But now we have fast computers, so I resolved to write myself a linked-list helper library.

A little furcá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 project, I was looking through some ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r code, and - what do you know! - found a linked-list helper library. It seemed like just what I needed. And that's when I realized - it ought to, because *I* wrote that. I just hadn't looked at it in 15 years, and neicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r had anyone else. So if I can't even remember to use my own abstractions, how can I expect cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 company to?

There's an anti-pattern I keep seeing, but haven't found a great name for yet. I call it "stratification".

Basically, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more you write high-level libraries that wrap lower-level ones, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 less you use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 low-level libraries. Thus, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 less you understand cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. At some point, you forget cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y even exist. At that point, you will - inevitably - write an even-higher-level library that recreates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lower-level functionality ON TOP OF cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 high-level library.

And if you've ever scanned in a document so you could use fax software to transmit it to a remote bank of faxmodems which will make a voice call over an IP-based, packet-switched telephone network only to reach anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r faxmodem in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same data center which will take cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fax, convert it to a PDF and send it via e-mail to your recipient, who reads it via a web-based mail interface that uses JavaScript to implement offline mail reading functionality... you know what I'm talking about.

3:52 PM, December 19, 2007  
Blogger deworde said...

Seriously, am I cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only one who wants to have a go at this game, bugs or no bugs?
Come on, stick it back up! Post a link. Post a linnnnnk.
It's in Java, it's not like it's going to wipe my hard drive. Well, maybe, but that'd be damn impressive.

3:59 PM, December 19, 2007  
Blogger Greg said...

I don't see how you prove your main point, that code size is an issue. You spend a lot of time saying it is, but offer up little in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way of proof or examples. (EG: what was cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bad thing that happened to you?) It's not hard to say "code size is a problem". It's hard to say why it's a problem and give examples of 1) code that is too big/bloated and 2) code that does cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same thing more succinctly.

Simple code-size reduction is not a silver-bullet. C and C++ are capable of very compact code that is almost as hard to read as Perl code. (see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ioccc - http://www.ioccc.org/ )

What I think you're getting at is code size reduction while maintaining readability. An altogecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r different beast and one that requires good design as much as language choice.

None of that should be taken as disagreement. Huge code-bases are beasts and have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir problems. I like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 idea of what you're attempting to show. I just think you've failed to adequately prove your point.

Tangentially, I wonder how much reduction is possible. This drive to write smaller code sounds very similar to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ideas behind cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 infamous programmer-induced rewrite. Namely, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "I can do it better!" syndrome. A noble idea, and not always misplaced. But rewriting code because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 original code is ugly/too big isn't a panacea eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r. Crufty, old code contains a lot of knowledge about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem being solved, earned over many years (through many nasty bugs and hours of debugging cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m) and encoded in usually inelegant ways. Tossing that and rewriting from scratch means you have to go through that learning process again.

There's a balance between good and good enough and simply assuming any code base over some number of lines of code is bad is near-sighted to say cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 least. Large problems sometimes need large solutions.

The simplistic solution, breaking cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 program into smaller programs that work togecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r to solve cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 larger problem, only masks cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem and pushes it to someone else's plate (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 poor schmuck that has to get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 programs to work togecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r correctly).

4:24 PM, December 19, 2007  
Blogger Eric said...

+1 Scala. Steve, could you please comment on your thoughts about Scala compared to Mozilla Rhino?

Thanks.

5:06 PM, December 19, 2007  
Blogger JimDesu said...

Amen! As a (currently)Java programmer, this frustration is what's driving me towards my own JVM language. Luckily, it has no due dates or constituency, so I can be very, very "patient" with it.

It boggles my mind that bigger is seen as better -- maybe what we need is APL for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM? :-)

5:16 PM, December 19, 2007  
Blogger X said...

+1 Scala. My guess is that Stevey just prefers dynamic typing. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's not much you'll need to do in practice that Scala's type system can't express. BTW, The Scala book is now out in PDF.

5:34 PM, December 19, 2007  
Blogger Dave G said...

Great post, I agree in principle with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code bloat argument. However, I notice Steve doesn't count cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lines of code comprising cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 OS, JVM, or cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java libraries he uses as part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code bloat.

I believe this is because a stable and well-designed (or well ... designed in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 case of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java libraries) and well-tested component doesn't require cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 mental overhead of a poorly-designed component.

Now, it is true that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se things tend to be services and infrastructure, not domain elements, and services tend to have much firmer interfaces over time than domain classes, which change as your understanding of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem domain and customer changes. However, I suspect that in any application a good portion of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code are value objects and services, not domain code. Anything to make that portion smaller is almost certainly a good idea.

Perhaps that is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 future: systems and infrastructure programming in C# or Java surrounding domain programming in your favorite scripting language, which is as mutable as domains tend to be.

5:42 PM, December 19, 2007  
Blogger Michael R. Head said...

So when are your tips for tech interviews coming up? I have one coming and could use some advice!

6:14 PM, December 19, 2007  
Blogger BitShifter said...

Could you explain why you think VMs are important and/or useful? I am curious about this.

6:17 PM, December 19, 2007  
Blogger Paul said...

I'm also going through a VM scripting language evaluation, but coming out with a different conclusion.

Coming from a Java background, Groovy is attractive in that it employs cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same type system, scoping rules, library, etc. as Java. All my Java knowledge is portable into Groovy. Its a far more symbiotic fit with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 VM than cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r scripting alternatives. One can migrate from Java to Groovy over time, mix and match Java and Groovy is no problem.

Not sure when you gave Groovy a whirl. If it was before 2007, suggest you give it anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r look. There is now a well run team that has produced 2 major releases this year. Latest Groovy 1.5.1 brings a lot of functional and performance improvements.

7:46 PM, December 19, 2007  
Blogger Jesse Kuhnert said...

Arghh!

Have any of you making all of your wonderful observations ever bocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365red to learn any of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dynamic languages mentioned? Do you think it's possible cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are things happening in those languages that you can't do in Java and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365refore can't know and make a clear argument about?

.............................

7:52 PM, December 19, 2007  
Blogger DF said...

I am surprised no one has mentioned cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 central tension: typing or no typing. I am leery of writing a very large system in a language with no typing (e.g., Ruby, Lisp, etc). A compiler can help catch so many simple mistakes, which are often cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ones we make. Two questions, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n:

1- Do you think strong typing is useful for code reliability (like I do)?

2- Do you think strong typing is inherently an order of magnitude more verbose?

'Cause I agree Java is verbose and I'm not happy about that.

Dan

10:05 PM, December 19, 2007  
Blogger Michael R. Head said...

@df

Surely you know of Stevey's opinions on static type systems!

11:11 PM, December 19, 2007  
Blogger Random Geek said...

Wyvern was a blast to play and I've missed it. Use whatever language or approach you have to, just hurry up and get it back out cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re!

... pretty please?

1:08 AM, December 20, 2007  
Blogger John Connors said...

If curly braces is all it takes, couldnt you just do a readtable hack in Common Lisp that changes (car x) to {car x}?

Sigh.

1:35 AM, December 20, 2007  
Blogger Ramzi said...

+1 Scala
even if it's statically typed, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 compression rate is very high :
- Type inference => eliminates verbosity
- Pattern Matching => eliminates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 need for Visitor DP and make you write decent recursive data structures
- closures => no more Kingdoms of Nouns
- implicit => an "equivalent" of Haskell type classes
- operators => just an example in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pi-calculus library: spawn < p | q | r >
this is object oriented code, spawn is a method that returns an object, < is a method, p is a process, | is a method, q is a process, r is a process, > is a method.
- support for currying
- support for mixins
- it also supports syntactic "tricks" that helps you write DSL (like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 a.m(b) === a m b, à la smalltalk).
- There's no code generation like in Ruby last time I checked (even if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's an obscure package where you can build syntactic terms at runtime)
- No loss in performance
- a good type checker

1:54 AM, December 20, 2007  
Blogger Unknown said...

I don't think that your opinion about code base size is necessarily a minority one,. As an experienced Java programmer, I've watched over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 years as developers have come along with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir non-emacs fancy graphical IDEs and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y've cheerfully generated all sorts of convoluted and unnecessary constructs in a few button clicks, with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 result that functionally mundane components are thousands of lines long, and virtually incomprehensible.

Having said that, I still think that at its heart, if you can remove all of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more idiotic and misjudged frameworks and libraries, that Java is still a good language and it is possible to produce elegant software using it. But, similarly to C++, it requires super-human discipline to do so.

I haven't used Java now for a long while: I simply don't require cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functional richness and syntactic rigour that it provides. Whenever I want to bash out a few web pages or interact with a database table, I go straight to a scripting language, and it's done within a few minutes.

4:25 AM, December 20, 2007  
Blogger Jarosław Rzeszótko said...

This is an interesting take on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 subject:

http://dspace.mit.edu/bitstream/1721.1/6064/2/AIM-986.pdf

I'm not sure if Lisp still has any chances to become relevant again, but I think that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 idea of having many layers of software, operating at different levels of abstraction and possible to understand seperately is very interesting. TeX is structured this way, and it certainly is big and complex.

5:57 AM, December 20, 2007  
Blogger Erik Engbrecht said...

Try Scala. It's compatible enough with Java that you wouldn't even have to start from scratch. You could just pick a section to rewrite in Scala and slowly convert.

6:24 AM, December 20, 2007  
Blogger DF said...

"Surely you know of Stevey's opinions on static type systems!"

No, I don't. Not everyone who reads a blog post has read cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 entire blog or knows cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 person.

Anyway, no matter what his opinions, it seems centrally tied to this issue -- Java, code bloat -- although I'm not sure what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right position is.

It seems to me static typing helps large projects .. and causes code bloat.

Dan

6:39 AM, December 20, 2007  
Blogger WInter said...

Man, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 people you work with like Javascript and not Ruby? Not that i'm some Javascript hater, but i didn't expect that!

Funny story. I "got religion" about code base size after a game i wrote grew to unmanageable levels, too! (Much smaller, but it was written in Hypercard(!) racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than Java, so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re weren't as many tools to manage cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size. It was one of my first projects, too!)

Ever since that point i sort of liked cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dynamically typed, elegant, and powerful languages--Ruby is pretty much my spec language. For a long time cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "real" language (Java/C/etc) people would sort of turn cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir noses up at that sort of thing (including Javascript, which i also liked--though not very much) and i just sort of nodded along and shrugged it off. I thought "Well, okay cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n. Maybe i'm just not interested in 'real' languages." Interestingly, i couldn't stand Perl eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r.

Then i found this blog and was like "Oh, so i'm not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only one who doesn't like 'real' languages!"

This post, here, made me think of my old game and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 like.

Incidentally:

"I mean, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y 'made sense' at some superficial level when I read cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 marketing brochures, but now that I've written a few interpreters and have dug into native-code compilers, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y make a lot more sense. It's anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r rant as to why, unfortunately."

I hope you'll write that some day! I'd be interested--i'm much more on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "made sense at some superficial level" understanding, so getting a shortcut to a more complete understanding would be nice...

7:01 AM, December 20, 2007  
Blogger mcherm said...

I can't believe I'm cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 _11th_ person to some along and suggest considering Scala. Now I'm beginning to worry that I'm part of a fad. Eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r that, or a group of people who understand language design and are seriously impressed with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design of Scala. For what it's worth, I am not jumping in just because everyone else is: I knew I was going to add a comment suggesting Scala even before I finished reading cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 post (unless Scala was what you picked).

One important suggestion. Regardless of what language you pick, make use of it's Java interoperability features to _convert_ your code base little by little racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than rewriting from scratch. Sure, you can refactor large chunks to make use of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more powerful features of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 new language -- that's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 whole point of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 exercise. But I'm sure you've read Joel's article on rewriting from scratch (http://www.joelonsoftware.com/articles/fog0000000069.html) and it's one opinion of his I think is born out by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 facts.

7:31 AM, December 20, 2007  
Blogger Boydbrain said...

I'm not young, but I am new to OOP and have experienced cycles of frustration and confusion with eclipse (and its complexity) as well as a handful of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r IDEs, Visual Studio notwithstanding.

The one question that wasn't answered by this blog is, "What does language/framework/IDE-specific bloat look like (examples?) and how do cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 solutions you propose solve this problem?" But to give you credit, I believe you forewarned readers that this question wouldn't be answered.

8:51 AM, December 20, 2007  
Blogger Scott Hickey said...

Wow - using Spring is considered bloat? I would say that you haven't really groked Spring. IMHO, managing large code bases becomes really challenging when code is not 1) testable 2) decoupled. Spring is a fantastic technology for enabling both of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se. If start without Spring, adding it in usually means writing negative lines of code.

9:00 AM, December 20, 2007  
Blogger matthias said...

Thanks for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rant. It is a timely reminder that people who do research on programming languages and those who construct cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m in 'cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wild' must revisit cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 'size' issue, and do so time and again.

I have put 'size' in quote because I don't think it is sheer size. If it were, we'd be programming in APL. (Yes, I am old enough to know that it existed.) I conjecture you mean some form of 'complexity' as in 'N pieces are related to N pieces in my code base, and I can't recall how cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are related when I maintain my code base.' And so on. I wish you took some more time nailing down what it really is about 'size' that bocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs you. In ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r words, blog again and describe cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 symptoms, describe what is bad with big code base.

Two comments: We (PLT Scheme) is confronted with a similar growth of our code base (mzscheme, drscheme, various tools, user contributions) but somehow sheer size hasn't done 'it' to us. We have no desire to rewrite it in JavaScript ;-)

I am one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 few serious mainstream PL researchers who has stood up to 'type research' (as in types are all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is to a PL) for two decades now. Having said that, I still think that a knee-jerk reaction to static type systems is improper. When you maintain untyped code, it does become difficult what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 three arguments to your method at line 123,765 represent: closures, objects, integers, and what 'invariants' cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y satisfy. I have watched a programmer struggle with just that issue, and it is a programmer whom I would trust with my life (as far as programming is concerned). If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 types are written down (and checked and sound), you can save yourself some 15 minutes with every method you touch. Sure it adds a few token pieces of type info to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 method header, but what's that compared to 20,000 methods touched times 1 - 15 minutes of 'manual type recovery.' And don't tell me about type inference for 'scripting languages'; I have also spent four dissertations and 20 years on this, plus a couple of years of trying to analyze Python, to know better. (It's kind of acceptable if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language is designed for it from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 scratch.)

-- Matthias Felleisen

9:03 AM, December 20, 2007  
Blogger rycamor said...

I used to think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re was something wrong with me, because I never, ever, ever managed to use any IDE without giving up in disgust hours later. I plain could not stand cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. To me cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y seemed like barriers to thinking racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than assistants.

10:00 AM, December 20, 2007  
Blogger Terrell said...

Good post. Jeff Atwood posted a "sorta" conflicting view on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same day no less! Both make for interesting reads.

http://www.codinghorror.com/blog/archives/001022.html

10:34 AM, December 20, 2007  
Blogger Carl Gundel said...

"Yes, codebase size can be a problem. But reducing size by decreasing readability is just as big of a problem."

Yes, but if he wanted to shorten his code and make it less readable he could just use two letter names for classes, methods and variables.

Language choice is very important. Java forces you to insert so much visual noise into your code that you have to read everything twice before you understand what it does.

11:39 AM, December 20, 2007  
Blogger Steve Lianoglou said...

It's been said already, but I'll have to say it again.

Scala FTW

12:10 PM, December 20, 2007  
Blogger Jon Harrop said...

If you want to massively reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of your Java code base and massively increase its maintainability cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n you need a language that supports functional programming. There are ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r benefits as well, e.g. concurrency is much easier.

As long as you're stuck with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM, your only technically-decent option is Scala but it has few users and little support.

If you can afford to ditch cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n you might like to look at more popular languages than Scala, like OCaml, Haskell, Erlang and F#.

12:17 PM, December 20, 2007  
Blogger rene said...

I agree with your opinion about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size.
But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are two types of code. First cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code you write by hand. And cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code you can generate. I'm speaking of power plant simulators. You have a subset of well tested functions and build cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 simulator with data from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 real plant.

Oh, and in my work I still use tcl/tk. Programs read and useable even after ten years.

Have a look at tclblend or jacl.

Regards

rene

12:37 PM, December 20, 2007  
Blogger rene said...

Have you read http://www.equi4.com/moam/fourth ?

12:39 PM, December 20, 2007  
Blogger paulk_asert said...

Groovy for me. I guess it has had a few rough spots in its past but now seems to have more momentum than cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r JVM languages - at least in my customer base which is historically Java focused and predominantly pro-agile.

12:55 PM, December 20, 2007  
Blogger Logwad said...

Have you looked at QBASIC?
I have been a professional QB programmer for many years, and can assure you that you have overlooked this gem.

It's use of SUBs is really quite fantastic.

Obligatory link: http://en.wikipedia.org/wiki/QBasic

1:09 PM, December 20, 2007  
Blogger Unknown said...

Reminds me of Paul Graham's http://www.paulgraham.com/power.html. Might be something to this code size problem after all :). Enjoyed your article.

1:34 PM, December 20, 2007  
Blogger Steven Johnson said...

Steve, I need no convincing here -- Java has its moments, but terseness is not one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m, while ES4 is shaping up to be pretty nice.

That said, I think your argument would probably be more compelling to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 general audience (ie, people who haven't been exposed to ES4, or ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r languages with similar features) if you provided some examples of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sort of code compression that's possible.

3:05 PM, December 20, 2007  
Blogger Russell said...

I first met Ruby after reading your NBL post. On queue I recoiled at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of curly braces (perhaps subconsciously primed by your post), at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 def keyword, which doesn't have an equivalent in Java, variables starting with @ symbols, and at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pipes used to delimit block parameters because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y're not a nice symmetrical pair. From where I sat on my high horse, I thought cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of regularity (nested curlies) would forever leave a bad taste in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 mouth.

Boy was I wrong.

A few days into playing with Ruby and I forgot all about curly braces. Now I wince whenever I see those redundant parencá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ses tacked on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end of every parameterless Java method call, not to mention cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 receding tails of closing curlies at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end of every method and class definition.

So you're right, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 populace has been conditioned with curly braces, but I don't think it's a show-stopper for adoption of sensible languages. The trance might be real, but it doesn't take much to snap out of it.

3:35 PM, December 20, 2007  
Blogger David Pollak said...

I walked a similar path, found Scala, and have been in love with it for more than a year.

I've written a number of 100K+ LoC code bases including cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Mesa spreadsheet (for NextStep, OS/2, and OS X) and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Integer spreadsheet (written in Java.) I understand cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code bloat problem and have experienced it first hand. There's an order-of-magnitude productivity decrease when cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 1 or 2 key developers in a project can't keep cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir head anymore. Your head must be darned large to keep a 500K code base in it.

In 1999-2001, I built a Java-based web framework that sidestepped cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 whole code bloat issue by allowing developers to define common web development tasks using much higher level semantics and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 high level semantics where compiled down into Java code. A 3,000 line object description file would typically bloat to 200,000 lines of actual Java code. The nice thing is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 developer didn't need to maintain cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java code... it was byte-code for most purposes.

In 2004, I started doing Ruby/Rails work. I wrote a bunch of commercial applications in Rails. I found that, even with reasonable test coverage, changing up code bases of 10K LoC became challenging. Additionally, because of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 weak performance aspects of Ruby and lack of good Unicode support, it was not useful for my projects.

In 2006, I needed a better answer than Ruby/Rails was offering. I cast about and asked many of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same questions that you've asked in your post.

I discovered Scala. It was love and first site and my passion about Scala cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Scala community has intensified over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last year.

I started working on a web framework for Scala: lift. lift's functionality is similar to Rails (a little more here and a little less cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re) and lift's code size is about have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size for Rails. More interestingly, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lift feature set has grown significantly over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last 6 months, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size has remained fairly constant.

You may ask how that bit of paradox has happened. It's like this... as my mind thinks more and more "functional", I am able to reduce code size. As I go through and work on older parts of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code that look and feel like Java programs, I'm able to re-implement pieces more efficiently such that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 core meaning of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most prominent part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 given code block racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "setup" of control structures (for/if).

While Scala does not have Macros, its combination of an advanced type system, traits (interfaces with code attached), and implicits, one can define amazing blocks of composition. I find that I don't copy/paste Scala code.

A number of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r folks have suggested looking at Scala. I'll one-up cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m... I'll happily spend a couple of days with you teaching you Scala and working on how to approach migrating your game to Scala. Just ping me.

Thanks,

David

3:36 PM, December 20, 2007  
Blogger René Dudfield said...

I wrote a fairly large game in python.

To keep cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size small every couple of months I would try and make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size smaller.

I would bring it down from 12,000 or so lines down to 7,000. Then I'd keep working, and repeat cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 process.

DRY is a good one to follow.

Also data driven programming. Putting complex things into data files, kind of like DSLs.

Separating out reusable libraries can help. Especially if you can add cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functionality to a library someone else maintains.

Putting things into separate libraries also forces you to decouple things. Making cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complexity smaller, because you can look at smaller pieces separately.


Look at your code and figure out how to make it smaller, and simpler.

Remove crappy features that take up space.

Stop using silly things like getters, and setters, and creating classes for all types of data.

Use data structures like lists, and dictionaries instead of classes. This can reduce code size amazingly.

How you structure events in games can mean that you get emergent behavior. This can save you *lots* of code. Think about how cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complexity of interactions and figure out ways to get that to scale with minimal code.


Keeping code small is a process, and a skill. If you keep practicing to keep your code simple you learn techniques to do it.



-- ps. check out pygame.org cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 simple game library for python based on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Simple Direct media Library (SDL). That's what I work on, and have fun with. Making games should be about fun.

5:47 PM, December 20, 2007  
Blogger Unknown said...

Steve, guys, I am looking for a piece of advice on a language to learn. I am torn between Haskell and OCaml, no surprise here. Doesn't necessarily need to be practical, it's more about deep culture and good taste. I don't care how steep cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 learning curve is, just about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ultimate intellectual payout. (I am a professional programmer, not a newbie).

6:11 PM, December 20, 2007  
Blogger Steven Atkinson said...

I hope Stevey is not reading cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 comments. It can't be good for his blood pressure.

7:19 PM, December 20, 2007  
Blogger Steve Yegge said...

Oh, I'm reading cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. Good stuff.

I'll comment on a few cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365mes I've noticed.

Scala folks and Groovy folks: you're not big enough yet. For something as big as my game, I want a proven mainstream language. I picked Rhino as a complicated multidimensional compromise; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 actual reasons are a full blog post. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 short answer is "you're not big enough." Sorry.

A slightly different answer for Scala, OCaml, Haskell and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r static languages: my game is a dynamic system. I was astonished to find, circa 1999, that I had effectively implemented JavaScript's prototype system in Java (with no syntax). For dynamic systems you need dynamic languages. If I were writing a compiler, I'd use an H-M language (probably Scala). This game is a different beast; it's one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most "living" systems in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world (notwithstanding its 1-year hibernation). You could do it in an H-M system, but it would be nearly as big as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java system.

Folks wondering if dynamic typing can work in "big" systems: cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 answer is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y don't get all that big, because of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dynamic typing. Unit testing becomes crucial, but you should do that anyway, regardless of language. Some good discussion of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 reasons for dynamic languages being so compressible can be found in http://www.amazon.com/o/asin/0262220695

Folks who wonder about how I could (re)write such a giant system without any "static" type annotations: http://tinyurl.com/26n2zq


Java folks who simply disagree with me: to paraphrase Nikita Khrushchev, "You will bury you."

Folks begging for Wyvern to come back: it'll happen before cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end of this month, promise.

Folks advocating JRuby: you're really twising my arm. I miss Ruby, and will always be jealous of JRuby, even after ES4 comes around. *sigh*

8:31 PM, December 20, 2007  
Blogger Oscar Picasso said...

+ 1 scala

I discovered it about 3 months ago and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more I know it, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more I love it.

If you come from a java world you tend to start coding a la java. Then you start to have some deeper understanding of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language, like thinking more functional, and you tend naturally to write shorter programs. And not only shorter are your programs, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are also more elegant and more readable.

With some ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r languages, making your programs shorter can lead to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m more cryptic. That's not my experience with scala.

I have a java background, have done a lot python, some C and ruby, and played happily with lisp. Scala combines cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nurture for a joyful mind and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tool to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 job done.

9:12 PM, December 20, 2007  
Blogger David Pollak said...

I don't want to start a flame-war (famous first words)... but (famous conjunction)...

I did a fair amount if meta-programming in Ruby. I even gave some presentations on Domain Specific Languages and have implemented a few in my time.

Scala's traits and type system give me cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same kind of power that I have with Ruby's meta-programing facilities, except that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 composition of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 classes happens at compile-time racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than run-time. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability to use a trait cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same way that a Rails developer uses acts_as_xxx is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re in Scala.

The ability to dynamically compose dispatch tables exists in Scala as well. Scala's Partial Functions (blocks of pattern matching) can be arbitrarily composed at compile time or run time. Scala's syntax is very flexible such that:

myobj ! ('my_message, param1, param2)

is a legal construct and would dispatch a message to myobj. You can use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Scala Actors library for asynchronous, Erlang style, dynamically dispatched components (yes, you can change cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dispatch table on a call-by-call basis). If you want lighter weight synchronous components, you can build those as well.

Put anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r way, you can have dynamic, proto-type style components in Scala without sacrificing type-safety.

I can't speak to your criteria of a language being big enough, but I do posit that Scala has cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 appropriate technical resources behind it. I agree with your assessment of Groovy. I do think, however, that you may not have a complete picture of what's possible with Scala.

You may also be interest in The JVM Languages group.

Thanks (again),

David

10:29 PM, December 20, 2007  
Blogger Unknown said...

Lua is big in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 gaming world, and I see that an interface exists to Java:

Lua Java

I am always amazed at how more productive a good dynamic language makes a programmer...still, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 jury is out on large systems where static type info is supposed to give you cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 edge. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se are exactly cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dogs that need more dynamic code ;)

4:37 AM, December 21, 2007  
Blogger Dan Weinreb said...

Very intersting post. The idea that a person can maintain a 500KLOC program single-handedly is pretty far-fetched. I am currently working on a code base that size, and our team consists of something like forty top-rank software engineers. Note: that's lines of Common Lisp, which is of course a lot less verbose than Java, so we are not comparing apples to apples exactly. And we use Lisp macros, which also helps save lines of code. Why so big? It's an airline reservation system and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are just a whole lot of things that it has to do.

The Lisp machine software (what Symbolics called Genera) could be looked at as one huge code base. Of course it was split up into pieces, which were split up into pieces, so it's hard to draw a line around some set of functions and methods and call it a "program". There must have been many millions of lines of code. We had a large team of awesome hackers developing and maintaining it.

I think having a Common Lisp running on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM, or cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CLR/DLR in .Net, would make a lot of sense. What we have now is Armed Bear Common Lisp, based on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM. (See my survey paper at http://common-lisp.net/~dlw/LispSurvey.html.) I've never used it. I have seen some benchmarks that make it look racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r slow, although that might not matter if you're spending all your computrons in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 libraries, which is very possible. On cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 CLR/DLR front, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re was an attempt called IronLisp, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y backed off because it was too hard and wrote IronScheme. Again, I know very little about it; you might want to track it down. I see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 comment from "Igor" about sisc-scheme; I had not known about that. I have heard about Clojure but don't know much about it as I have been focusing on Common Lisp.

I don't think refactoring makes cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code greater. Done properly, it has cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 opposite effect: you do something once, racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than over and over.

Regarding not being able to fit your program into Eclipse: have you tried IntelliJ? It scales better. At BEA, where I used to work on WebLogic Server (a large Java program), everyone used IntelliJ. Attempts to use Eclipse seemed to founder on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 WebLogic Server code base. (Sorry, I don't know cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of lines of code.)

-- Dan Weinreb, co-founder of Symbolics

5:38 AM, December 21, 2007  
Blogger Ray said...

Why did you obfuscate your code from yourself?

The fundamental you are missing is readability. Martin would suggest breaking up a large method into smaller ones because is makes it more readable.

Consider this:

String uc = "blah" or
String userComment = "blah".

Which is easier to read? Which is longer? Your programming style sacrifices readability against all ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs, including size. So you obfuscated yourself. Size doesn't matter. What matters is how long it takes you to understand a hunk of code. Usually, more lines means longer to understand, except for self obfuscators such as yourself.

You are a self-deprecating and self-obfuscating programmer. You are in a bad funk. I would recommend health care as your next career. Challenging but not to dynamic.

8:51 AM, December 21, 2007  
Blogger matthias said...

Steve wrote that "folks who wonder about how I could (re)write such a giant system without any "static" type annotations: http://tinyurl.com/26n2zq".

As a co-creator of gradual transformations from dynamically typed to statically typed languages (see DLS 2006), I am perfectly aware of this idea. The problem is that Ecmascript's implementation of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 idea is broken, unsound. So whatever advantages you would get from a sound system, such as ML's or even Java's, you won't get from ES 4. (The most you get is C's notion of types.)

Nobody has tested this notion on a big style. At PLT, we have ported some 10,000 lines to a sound system. Works like a charm and I firmly believe that soundness was important. When you get a type bug at run-time it's not in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 typed part of your code. With Ecmascript, this is not true. You will need to search cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 whole thing.

;; ---

One more comment on size: my experience in teaching a programming course with free choice of language is that Ruby, Perl, Python beat Java and C# by a factor of 3, C and C++ projects usually fail (due to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of experience), and Scheme projects are always shorter and more complete than all ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs. This may or may not reflect cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 personal bias of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 instructor, though.

-- Matthias Felleisen

9:08 AM, December 21, 2007  
Blogger Unknown said...

"... I'm a bit skeptical about building a large production system in a weakly-typed language, for lots of reasons: refactoring tool support..."

"If you feel I'm wrong, please don't mail me with a long rant; publish your thoughts as a blog somewhere!"

Or 'somewhen' apparently.

10:05 AM, December 21, 2007  
Blogger olmocc said...

I just think that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language flexibility has more impact over code bloat than static typing.
Ok, type things has some verbosity but C# 3.0 and F#, while still static, have very aggressive type inference mechanisms.
Comparing C#, especially C# 3.0, with java and putting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same group is just not fair. The new C# 3.0 is closer to ruby in verbosity, and is a Complete Language (you can write DX games, use pointers, windows applications, performant math libraries...).
About language simplicity vs code simplicity, I absolutely go for code simplicity. Having a complex language (as C#) has huge benefits over code simplicity, and you have to learn a language only once, while simplifying cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language means you will deal with cumbersome techniques and libraries different on each project.

11:48 AM, December 21, 2007  
Blogger Script Uncle said...

Thanks for writing anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r blog on a very important issue. Actually, I don't think it's about code base at all.

It is a language issue. There is a line drawn in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sand. You're trying, post after post to find good arguments as to why scripting languages in general - and js in particular - are better suited for most, if not all projects.

The size angle is very good, and was a reasonably good choice to get people thinking.

The problem seems to be that things that I take for granted, when you bring up this kind of discussion; That you have modularized your code as well you possibly can, and that you have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability to actually compare cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 experience of coding very large projects in Java and JavaScript; is completely lost on most people. (Not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Scala people tough. :) I'll definitely try it out over Agnosticmas).

What I would like to see more of, is people commenting on language issues who have at least two years of experience with each language and having a couple of large projects under cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir belt.

I'm mostly referring to having experience with JavaScript, here btw :)

For cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 400 pound Gorilla in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 room is actually that it is kind of hard to describe why it is better to code *anything* in js (or actually any modern scripting language at all) instead of Java/C#.

The codebase issue is good, but as many people pointed out we need firmer evidence, smoking guns, silver bullets and a lot of patience :)

It is a big issue. I'm not in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 honeymoon phase any longer (as far as I know), but I do my laps of pain in Eclipse fro customers every month, and as soon as I can get off to doing basically cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same thing, in just Kate, or vi, in (incidentally) less lines of code, I'm as happy as a (grease)monkey.

We need a plan.

12:48 PM, December 21, 2007  
Blogger Jeremy said...

Measuring programming progress by lines of code is like measuring aircraft building progress by weight.
- Bill Gates

1:12 PM, December 21, 2007  
Blogger George Jempty said...

If your use of design patterns makes your code base bigger, it's because you're misusing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pattern, or you didn't need it in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first place. I refactored a bunch of cut and paste code a couple of years ago using cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 template method pattern (without previously knowing of this pattern), and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 resultant code base was absolutely smaller

2:56 PM, December 21, 2007  
Blogger Bernd Paysan said...

My favorite language is Forth, and it addresses cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem of code bloat quite aggressively. Forth is not only terse, and allows to compress code in every way you can imagine, but it's essence for this is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 compiler itself is extensible. Forth was strong in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 early MUD game development, so it fits for that purpose.

BTW: I noted that one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 requirements you list for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java replacement is "must scale for large programs". Hey, NOT! It must NOT scale for larger programs (large in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of LoCs), because that will keep you disciplined, and experience cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 stopgap point where your program falls apart much sooner.

There was one comment which I can only second strongly: Keep your program around 10kLoCs. That should be some sort of upper limit - less is better, but more is awful. Think about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way your inner program logic works, and restart from scratch if you find too many verbose tasks.

My Forth system contains a GUI library, similar (I'd say superior) in functionality as e.g. Motif, but with just about 10kLoC code. It's build directly on Xlib and uses mostly gdi on Windows (and OpenGL for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 3D canvas), and that's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next "anti-pattern": Avoid unnecessary abstractions. If you interface some external component, do with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lowest level cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re, and do it right to what your task actually is. Interfaces impose some logic onto your program, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 higher level cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 interface is, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more likely is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 logic cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wrong choice.

The downside of Forth is that unless your system of choice comes with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 libraries you need, you eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r have to write cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m yourself, or you have to interface with foreign linkable libraries (e.g. written in C) that don't fit well to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 logic of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 main language. There's no abundance of public abstraction stuff as with Java, and it's partly because Forth isn't that widely used, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r part is because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se abstractions are shunned, anyway.

The ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r disadvantage of Forth is its strange syntax ;-).

10:28 AM, December 22, 2007  
Blogger Fredosaurus said...

Very nice post. You write well and you seem to like writing, and I suppose you code well and like coding. But it's this creative energy that is ultimately cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 source of your problems. Write less!

But writing less requires a basic change in your behavior, which is not as easy as loading cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next silver bullet into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 chamber.

Perhaps cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re will be benefits from a language change and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r refactorings, but "features" must be considered as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 primary cause of source code. Rip some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m out!

As good as this post of yours was, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 followup on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 results of your rewrite will be even more education for us. Thanks.

2:54 PM, December 22, 2007  
Blogger Brad Buchsbaum said...

I think this blog entry is quite possible an elaborate excuse to make a joke about a spitting zoo camel.

Here's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem with Mr. Yegge's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365sis. He identifies lines of code as a cause of complexity racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r than what it really is -- an effect, a symptom.

The solution to complexity is not reducing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of lines of code. Neicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r is taking an ice bath a solution to high fever. Nor does printing Finnegan's Wake in a smaller font make that work a more manageable read.

After all, if lines of code were a *cause* -- not an effect -- of complexity than Mr. Yegge should counsel everybody to rid cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir code base of all comments, make all variables public (eliminating accessors), and make heavy use of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ternary operator.

6:20 PM, December 22, 2007  
Blogger Andrew Kothmann said...

It's amazing how many people don't seem to understand what was said cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 main entry.
To those who keep saying: "You need static typing to manage a large code base." The point is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r way around: "Static typing makes you try to manage a large code base."
I haven't been in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 industry anything like long enough to be able to take an authoritative stand on this issue but from what I've seen of Ruby, JS, and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r dynamic languages this seems to be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way to go. From my own experience with a small-medium sized C# code base at work cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 points about code size and static typing ring true. I've found myself several times wishing I could call a method based just on its name without resorting to cumbersome reflection apis. I've got a few days off here around Christmas and I plan to play around with Ruby and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r dynamically typed languages. Maybe I'll even start a blog and post my experiences.

Oh, one more thing. For cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 people making condescending comments about how he just needs more modular code and several sub-projects are simply making his point about code size (more modular just moves cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dirt around) stronger.

12:50 PM, December 23, 2007  
Blogger Andreas Krey said...

Brad:

> make all variables public (eliminating accessors),

Good point actually. Why isn't cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re an @accessible modifier to a member that automatically creates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 accessors? Would save a lot of code and not lose cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functionality. Java is in dire need of a decent preprocessor.

> and make heavy use of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ternary operator.

Java semantics suffers from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 distinction between expressions and statements; see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 crazy way to only run cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 initializer of a final variable within a try.

Code size is a symptom, one of using a language with insufficient abstraction capabilities. This is just what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 article says. (For an elaborate distincion between abstraction and mere compression see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 recent stuff on weblog.raganwald.com)

12:55 PM, December 23, 2007  
Blogger Doug Clinton said...

Steve, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem isn't cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language, it's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 programmer.

I cannot even begin to imagine how you got anywhere near 500,000 lines of code for any single-person project. For cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 past couple of years I've been working on a system in Java for a government agency here in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 UK which does pretty sophisticated rules processing on XML documents. The codebase hit about 12,000 lines of code in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first release, including cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 hand-coded rules classes. Since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n we have expanded cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 functionality, added a system which compiles rules from Schematron into Java classes and dynamically loads cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 codebase is up to around 15,000 lines of code.

The only way you can get to 500,000 lines of code is by simply not paying attention along cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way. The way you dismiss patterns and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r useful ways of thinking about programming gives me some idea of why you've hit this problem.

Get off your high horse about Java and take a good look at how you can develop your programming skills to keep you from getting into this mess on future projects.

But hey, I'm just an 'experienced programmer' and your post wasn't aimed at people like me. After all, god forbid that some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 experience I've gained along cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way should have any bearing on writing software.

2:46 PM, December 23, 2007  
Blogger Matt said...

I almost always agree with you, which made today’s post doubly interesting. Thank you.

For cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sake of argument, let’s assume that you have to write an unreasonable amount of Java code to get anything done. Let’s furcá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r assume that Rhino is exactly five times more expressive than Java is – that is, 20 lines of Rhino do exactly cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same amount of work as 100 lines of Java.

Imagine that all your money is sitting in a big pile in your apartment. In pennies. Sucks, doesn’t it? Jars all over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 house, full of pennies. Want to go buy fifty bucks worth of groceries? I hope you like lugging 28 pounds of pennies through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 store. Everything you do with your money is slow and awful and stupid, and you will probably never even know how much money you actually have.

So you’re looking at this big mess of pennies, trying not to stand near it because you’re afraid cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 floor might give out, and you say, “God, what a mistake this was. I’ve got to convert all this to nickels!”

You’re right that nickels would make your life five times easier, but switching from pennies to nickels doesn’t actually attack cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 real problem, which is that all your money is sitting in a big pile in your apartment.

Switching gears: You say that you wrote 500,000 lines of code for your game, and that that’s way too many too maintain properly. So let’s say you switch to Rhino, and you knock it down to 125,000. Is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code really simpler now, or is it just shorter? It’s still expressing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same functionality and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same number of ideas, right?

Your game has way more than 500,000 lines of code. And those 500,000 lines of Java code are completely worthless without cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java library and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 operating system that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM is running on and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 god-knows-what that’s going on in your computer’s hardware. Oh, and your game is web-based, right? So let’s go ahead and count all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code that my browser uses to render it, as well as all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for my operating system, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for both our TCP/IP stacks, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code for all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 networking hardware between here and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re. I’m willing to bet that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are tens of millions of lines of code in play when your game runs, and that those same tens of millions of code (minus cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 relatively few that you wrote) are brought to bear on “Hello World”. It just really seems like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of your codebase can’t be your real problem.

It actually seems like you might be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem. I’m willing to bet that if you had access to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM code or to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 browser code, you’d be hacking away at that stuff, too, because that’s just your nature. God knows it’s mine.

Maybe if you want to make that codebase maintainable, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 real answer is to break off some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 back-end pieces and stuff cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m down into a black box somewhere you won’t be tempted to tweak cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. Get those pennies into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bank.

11:13 PM, December 23, 2007  
Blogger Dan Weinreb said...

If you can reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of lines of code from 500,000 to 125,000, I'm not sure whecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r it should be called "simpler" but I'm pretty confident that it would be easier to understand and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365refore to maintain, assuming that it was nice clean code (and not one of those silly examples written with single-letter variables and no whitespace).

In your analogy, you talked about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem of lugging 28 pounds of coins around. Well, in nickels, that's a lot fewer pounds. I'm not sure why you mentioned cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 28 pounds at all if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "real problem" is that your money is in a big pile in your apartment. In nickels, it's a much smaller pile.

I'm not sure I see your point in counting up cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "millions of lines of code" in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 operating system and so forth. The question is how many lines you have to maintain, don't you think?

4:49 AM, December 24, 2007  
Blogger Matt said...

@Daniel - Yes, intelligently reducing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of lines will make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code easier to understand, in exactly cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same sense that switching from pennies to nickels will make $50 less painful to lug around.

The Big Point I was trying to make is that if you are willing to compromise with yourself and not be a perfectionist about everything, you can reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of lines of code that you maintain without reducing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of lines of code total. You just tear off a big chunk of working low-level code and say, "I am not going in here again." It feels horribly wrong when you do it, but only because it's a choice. (In reality, we do it all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 time, unknowingly forcing tens of millions of lines of ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r people's code into horrible contortions, mostly because we just don't know what's down cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re.)

8:20 AM, December 24, 2007  
Blogger Alok said...

Seems like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re should be a limit not dissimilar to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Dunbar number, hitting which, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 codebase should be broken up or rebuilt. My personal limit seems to be around 25K. Once a code base reaches this number, I start to notice a few things like engineers specializing in portions of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 codebase, refactorings taking longer to apply and general tendency not to do anything drastic.

5:08 PM, December 24, 2007  
Blogger Steve Yegge said...

Ass that I am, I replied to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 comments without noticing that Matthias Felleisen had visited my uncultured backwater of a tech blog: an event equivalent to Gregory Chaitin stepping in and correcting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 math in an XKCD comic.

Matthias, I hope you'll forgive me for having grossly oversimplified my case, and for having wasted so much space for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sake of rhetoric.

I understand, of course, that ES4's type system cannot be sound. My decision to use ES4 (and back it, and promote it) is deeply pragmatic. The resistance to Scheme in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 industry is truly astounding. The ES4 designers (Schemers to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last, if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rumors are correct) are doing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y can with JavaScript. I believe, admittedly without any concrete practical experience to back me up, that ES4's type system may still prove quite useful. Of course it won't have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 guarantees of a sound type system, but I think it can still help catch errors, clarify code and offer some purchase for optimization. Time will tell.

As far as blogging with more concrete detail about code 'size' as a proxy for bigger problems, so to speak, well - it's something I've attempted many times over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 years, and I've never succeeded. The problem is that small examples fail to convince, and large examples are too big to follow. I've resigned myself to talking around cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 edges of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem.

And thank you for your wonderful books and your awesome work on PLT Scheme.

By cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way: http://www.amazon.com/o/asin/0262561158 - that was a great joke. I laughed from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first page to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 last. :)

2:13 AM, December 25, 2007  
Blogger Sergey Solyanik said...

Well, I think your "minority" opinion is shared by thousands of Microsoft developers who are saddled with a 90MLOC Windows code base.

90% of what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se devs do is maintaining it, day to day, year to year. A statistic: an average Windows developer writes 1500loc (yes, that's loc, in singles) per year, because most of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir time is spent fixing bugs in what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y aready have.

So cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size has a nature-imposed maximum :-) - at some point capabilities of dev org just tops out maintaining this max code base.

Anyway, I am not sure if fighting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base size problem by replacing a less expressive language with more expressive one would work. The problem is that in a more expressive language cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is higher potential to make a bug per line, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bugs are worse.

I can write (prototype) a solution in JavaScript faster than I can do it in Java, and I can do it in Java faster than I can do it in C++ (let's say on Windows, Linux C++ development is stuck in a stone age, so it's unfair to compare Java and C++ cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re. I have a post on it: http://1-800-magic.blogspot.com/2007/12/c-development-on-linux.html).

But when it comes to shippable code, when you actually have to get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 software to have reasonable startup time, performance, responsiveness, memory consumption, etc, etc, etc, you're suddenly hit by a bunch of problems that are extremely hard to debug, sometimes, impossible to debug on a higher-level language.

So cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n you start to introduce kludges, and your beautiful algorithm written so clearly gets its own memory management (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 very thing you were going to avoid in Java), and parts of it migrate into native code for speed... etc, etc, etc. And what used to be 2000 lines in a very expressive language now looks more like 5000 in a mix of languages, and it's as unreadable and hard to maintain as it was before :-(...

10:54 AM, December 25, 2007  
Blogger dimzzy said...

I wonder which language Steve will use after ES4 to rewrite cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game. My guess is that he will write a JMud DSL )))

12:47 PM, December 25, 2007  
Blogger Josh said...

Thanks for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 post Steve.

The complexity problem you describe is an area where service orientation would shine. It can simplify cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 coupling between subsystems and provide huge gains in maintainability and reusability.

The issue of duplicated code and coding patterns can be solved via a domain specific language. DSLs can eliminate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bad code created by copy & paste style coding. Just surface repetitive elements of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 architecture into a meta language oriented toward cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem space.

I believe that is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best way to combat code bloat & complexity.

7:43 PM, December 25, 2007  
Blogger Lurchgs said...

I can't say as I'd call myself a professional programmer - though I have had occasion to write tools for work.

I've railed for years against software bloat.

Xen - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 issue isn't complexity. The complexity of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 application isn't going to change significantly no matter what language you chose to use.

The issue is maintenance and resource consumption.

I could have used Java for my tools - in one aspect,it would have been better than PERL or Python.. but I ultimately opted against it because it would take me 30 lines of code to get somethign done that would take only 10 in Python.

As a result, my tool was ugly to look at in operation (I should care about this ... why?), but was a darn sight faster than an almost identical tool written by our Java guru.*

When we opted to add features .. er.. additional tasks .. to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tool, adding a thousand lines of code to my tool was a lot easier than adding 4 thousand to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Java tool.

Bug hunting or making planned changes is simply a lot easier when cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is more concise. This leads directly to less time involved, and, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365refore, to less cost of maintenance.


* why was cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re a second, identical tool? because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 powers that be wanted ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs to have cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tool, but didn't want one written in a "non-standard language like Python" running around cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 company. sigh

10:12 AM, December 26, 2007  
Blogger Bernd Paysan said...

Complexity:

Fred Brooks distinguishes "inherent" and "accidental" complexity of a problem (in "The Mythical Man Month" - a must read for any serious software architect). The inherent complexity is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 one you can't get rid off, even when you have a perfect solution. The accidental complexity however comes from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 environment and how you approach cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem.

So if you are good and use whatever trick is necessary to solve cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complexity should be more or less an invariant over different languages.

However, as David Pollak has already mentioned, domain specific languages are one key element to reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 accidental complexity of a language, and meta-programming is important to create a domain specific language.

So choose your complexity-avoiding tool by how good it supports creating domain specific languages. And actually try to create domain specific languages where appropriate.

3:33 PM, December 26, 2007  
Blogger Xah Lee said...

Hi steve,

i just read one of your blog:

Code's Worst Enemy, 2007 December 19, at
http://steve-yegge.blogspot.com/2007/12/codes-worst-enemy.html

Jesus, thru intricacies and excursions, from vacation preamble to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 enticement of a mysterious game to code size cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ory and IDEs, with over 5k words, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 bottom line is really just how java sucks and you were looking for anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r lang on JVM for your game?

Five thousand, two hundred, and fourty six words. I counted it.

If you said java lang bloats in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 outset and i'll just fullheartedly agree and be done with it.

Though, i gotta say it's quite effective writing — sucking in your readers and give cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m a clout on head before cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y can get away.

Lol! ^_^

My prediction is that low level langs (or cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 qualitity of such lang, such as statically typed, or compiled), such as Java, C++, C#, will continuously to have smaller users until maybe reaching as little recognization as assembly today in 2017.

This is a inevitability due to hardware's exponential growth. This is particular already noticable in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 past decade. Before 1995, people are still talking about C, Pascal, memory allocation, linked list, “data structures” in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sense of C's structs... cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se days, i bet that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 majority of professional programers don't know what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se are. They all work in PHP and Javascript or flash.

(majority = great than 50%. “Professional programer” is defined as those who write code as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir primary income source. This includes HTML, visual basic, or any specialized script in different areas, say, 3D modeling...)

High level langs, such as Javascript (and lots more based on it such as Flash etc), Python, Ruby etc will become more and more popular.

Lisps will probably just hang on, maybe a bit more popular. I don't see lisp will ever become mainstream. The parens is a problem, and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs due to age, but if i can just say one thing about lisp that i deem unsavable, is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cons business. (am aware many lisp experts here, also that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nature and brevity i stated my opinion about lisp problems are likely to make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m think am idiot. To express my opinion about paren and cons will require a page or more... which this isn't cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 place. (however, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 paren i've already expounded here: http://xahlee.org/UnixResource_dir/writ/notations.html ) )

Not sure about Haskell... on one hand it's high-level, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n it's compiled lang quality with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 types thingy which necessarily bring it down.

of all langs i know, i think Macá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365matica beat cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m all by far.

----------------------
some comment on your essay...

you wrote long, and it is a very skilled writing. But i think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 words/content ration is not very high, if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re can be any criticism at all.

for example, you discuss vacation, your game, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se are just long leads to your main content, about code size and looking for a replacement for java. But even cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code size cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ory, which you say are a problem, but i don't see much support or evidence. Code size is proportional to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 complexity of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 software in general. No matter what lang you use, its going to grow as your software grow. Games is one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 more complex software, especially if it is networked and graphical. Saying code size is a problem is like saying being too rich is a problem, or being too beautiful is a problem, or being big and powerful is a problem.

you say large code size cannot be solved by IDEs. But of course, when given a huge code size (and presume cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is lisp/macá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365matica/haskell written by top experts), really nothing can solve it.

So if i understand your essay's intention correctly, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n your writing about code size, design patterns, IDEs... are just side effects of getting to your main point: how java is verbose and you are looking for a java replacement for your game.

... cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 above is just some random thoughts. Of course you didn't intend cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 essay to be a formal exposition... etc.

Xah
xah@xahlee.org
∑ http://xahlee.org/

1:10 AM, December 27, 2007  
Blogger dimzzy said...

From cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 dirt point of view languages with strong typing imply structured dirt like houses and bridges while languages without type system imply just piles of dirt.

3:36 AM, December 27, 2007  
Blogger Dan Weinreb said...

Hi, Xah. I feel compelled to reply to your comments about Lisp.

Will it ever be "mainstream"? Probably not, but I hope we can make it more popular and acceptable than it is right now.

I read your paper on problems with parens. I find it quite interesting that in order to demonstrate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem with nesting, you resort to showing ugly examples in OTHER languages than Lisp! That's not fair. What, you could not come up with a Lisp example?

Your third point is that Lisp syntax "seriously discourages frequent or advanced use of inline function sequencing on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fly." I completely don't see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point of your argument. The Lisp functional notation looks perfectly clear to me, and much more uniform with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language.

So what do you mean by "cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cons business"?

P.S. Your web site is awesome!

4:47 AM, December 27, 2007  
Blogger Xah Lee said...

hi Daniel,

It is my honor to reply to you!

I started to write a reply about my thoughts about lisp's list problem (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cons business) but in my rambling nature it turned into 900 words.

am not sure i should spam steve's blog since it's slightly off tangent (and badly written). I put it here for now: http://xahlee.org/emacs/lisp_list_problem.html

Happy holidays,

Xah Lee

9:12 AM, December 27, 2007  
Blogger Jesse Kuhnert said...

Hey,

I did actually have a legitimate question - how can we track cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 progress of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rhino side of things without pinging you directly?

I've not been very successful thus far in turning anything up that I can directly attribute to being ecma4 by looking through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 mozilla repositories. (unless cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is a sekret key sequence that shows how to navigate to http://lxr.mozilla.org/mozilla/source/js/tests/ecma_4 )

=( Not fair. Are you just going to dump a magical ecma4 rhino patch on mozilla at some point in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 future when it's "perfect" or ...?

7:31 PM, December 27, 2007  
Blogger grant rettke said...

Steve your post was fun to read and very long. What is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 essence of your message? I keep hearing you say that if you are going to start a big project, you had better choose a language that lets you provide cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 best abstractions for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem you are solving. You really threw in a twist to your post when you start talking about JVM languages and code generation and build it all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way up to… choosing a language to make everyone else happy. Wow, I didn’t see that coming. That said, why don’t you just stick with Java but compile down to it in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 places that give you cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most bang for your buck? Your post seems to imply that you are already familiar with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se concepts.

7:43 PM, December 28, 2007  
Blogger grant rettke said...

ilume, DRY is a good idea but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 challenge folks face is not only to DRY, but to provide abstractions that make cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem easier to manage. Predominantly refactoring focuses on structure, not abstractions.

7:50 PM, December 28, 2007  
Blogger grant rettke said...

daniel, re "Will it ever be "mainstream"? Probably not, but I hope we can make it more popular and acceptable than it is right now."

Fame is fickle. The important thing is not that people use Lisp at work, racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r that Lisp removes barriers to folks learning and mastering techniques of abstraction that make our jobs easier. That way cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y can benefit from whatever language is currently in vogue.

7:52 PM, December 28, 2007  
Blogger Ryan said...

I'll start by disclaiming that I didn't read cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 entire post--damn it is verbose. Was that some sort of intentional ironic joke considering your position on LOC? I'll also speculate that you can probably code circles around me, as can most of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r commenters. And I never bocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365red to learn Java (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 horror).

I was a C++ programmer for about 7 years (back in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 90's), spent some years away from coding (with a very short stint dabbling in Objective C), and now a Ruby programmer for just under 2 years.

All that said, I'm not sure how you can make such a blanket statement that large LOC are bad. Some projects are bigger than ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs, and perhaps yours is not meant to be maintained by a single person! I like small lean teams--but doing it all alone isn't always realistic.

Also, refactoring almost always reduces my LOC (I can't think of a time when it didn't). It leads to my favorite style of coding, which I call cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "Select and Delete" style of coding. I find nothing more satisfying that deleting a bunch of code and having everything still work as designed.

10:43 AM, December 29, 2007  
Blogger Dan Weinreb said...

To Xah Lee: Oh, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem that lists are an emergent phenomenon instead of a collection object. Yup, no argument from me about that. It's all extremely historical.

5:58 AM, December 30, 2007  
Blogger Dmitriy Likhten said...

I had a similar realization recently. I though "Java is just awesome" and that I should implement stuff in java because I know it and it's easy.

Then I was introduced to Ruby On Rails... Then to Jython (Python)... And well... I don't like java anymore.

I noticed that a task which seemed "too much" for just me, writing a web site that uses some pretty complex and funky stuff, and is pretty dynamic while remaining HTML-based is not so difficult for one person to make on his spare times on some evenings for maybe 6 hrs a week if done in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right language.

I wrote functionality at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same speed as I would in java, except that I knew NOTHING about Ruby or RoR when I started and I was pretty proficient in java. That means that with experience I can write programs faster and smaller in Ruby (and easier to understand) than I could in Java. The only difference is that not every programmer on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 street can work in Ruby (though I don't know why)

8:36 AM, January 02, 2008  
Blogger Alan Ho said...

Working in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 company that Stevey worked in, first hand dealing with one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 biggest code bases, I've concluded that code bloat has little to do with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language but racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r that its impossible to kill useless features. If I had a nickel for every time that I heard "I can't get rid of this legacy code because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is a legacy client still in PROD.... I think".

Even if Google / Amazon / Microsoft moved everything to Ruby, it would still be millions of lines of Ruby.

I believe developers have to tackle large code bases for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 following reasons:

1. Bad modularization - usually due to legacy code preventing any refactoring short of complete rewrites

2. Buggy code - if you can't trust cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modules you depend on, you gotta look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 modules. Usually, I never think about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 millions of lines of operating system code because I know it "just works".

3. Hacks upon hacks upon hacks - nuff said

2:50 AM, January 03, 2008  
Blogger odoepner said...

The number of lines of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 original blog posting smells like bloat to me.

1:31 PM, January 03, 2008  
Blogger Thomas Cataldo said...

Think you should try cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "play" programming language. Its semantic is quite rich : cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 program "Play;" will run a game all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 features of your 500k game.

Ok, I'm just kidding but you have some very valid points : trying to factor (I'm not saying refactor) your code, and reusing instead of duplicating is a mandatory thing.

What I'm not buying is your focus on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "LoC" metric. Your 500k lines of code break eclipse, and this is good thing. For me it means that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is architected, eclipse must load all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code to figure it out (I mean compile / index it) : exactly like if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code was a single 500k line script, where line 500.000 depends on line 1.

Divide to win

Let's think about it for a few seconds, what do you have in a game : cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 AI, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 graphics engine, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 physics engine, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 audio engine, lots of data file and a "scripting" to glue everything togecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r. It is pretty clear that your AI does not care about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 colors of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 textures on your polygons.

Now, would you consider a technology like OSGi / Eclipse plugins : you focus on writing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 smallest possible piece of code. Everytime you're willing to add a new feature, you ask yourself : "Can I add an extension point here and program my new feature as an external plugin ?".

Now my feature is a separate project Y in my IDE. I create a new project Ytests, that depends on Y, and unit test cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code in Y. When Y performs correctly, I package it (right click / export / export as deployable plugin & fragment), push cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code to git/svn/you name it, and close cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 project Y in eclipse.

Anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r point is, when I start writing a program, do I use plugin / modular technologies from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 start ? Can I know in advance that my little project will be successful, and will grow to X lines of codes ?

2:56 PM, January 03, 2008  
Blogger Bob Foster said...

I agree that bloat is bad, but just one small point: I work on an IDE that _is_ a 20 million line codebase, Oracle's JDeveloper 11. IDEs can scale if cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y must.

7:04 PM, January 03, 2008  
Blogger Bob Foster said...

Your article is long on dissatisfaction and short on satisfaction. What is it about JavaScript that will bring about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 3X code reduction? Why will this (only) 2/3 shrunken code be more maintainable than cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code it replaces?

3:39 AM, January 04, 2008  
Blogger ej.prabble said...

all those words about Java and not one mention (or even a hint) of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 term "object oriented" .. and *you* are trying to tutor cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 youngsters - shame!

object oriented languages result in more code because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y present a different approach to solving cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem. But cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is not all in one place .. it's encapsulated in classes and components and frameworks (or, at least it is *supposed to be*). However, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 longer view shows much less code to write by leveraging those classes and components and frameworks. It also means less complexity through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 inherent breaking down of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem (complexity is, ultimately, what you are talking about right? .. I hope you at least understand that).

You see, I only had to arrive at your "500,000 lines of code" game to see you don't understand. I am getting tired, and very discouraged when I read cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se sorts of posts .. As Grady Booch once wrote: "it's going to take a lot of software [to build everything]", and I personally am losing faith that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re exists enough talent to pull it off. I am sorry you are blaming Java for your 500,000 line program, but I agree with your conclusion to move on ... have a good life

3:17 PM, January 04, 2008  
Blogger snow said...

You are wrong. The size of a code base is not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem.

Consider cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 case of a database system. Extremely complex, used by millions of users and required to be blindingly fast when accessing millions of records.

These systems are very large but maintainable as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design is good. Whecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r it's written in Lisp, Java or assembly language is not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 deciding factor - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 thing.

You are cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 perennial wandering programmer looking for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 perennial silver bullet to solve all your problems. And you are in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 initial phase of extacy at how good your next system is going to be when you start writing it with your new toy.

Give us a call when it's finished.

2:32 AM, January 05, 2008  
Blogger Steve Yegge said...

Folks (and Jeff Atwood in particular) -- looking at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se comments, are you convinced yet that my opinion is, in fact, a minority one? We're starting to hear more from typical programmers, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 polls are definitely swinging in favor of "Steve's full of crap."

Well, you know how some people like to say: "I'm not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 kind of person who says 'I told you so'?" Well, I'm not one of those people. :-)

I'm leaving comments on for now (until genuine spam kicks in) because I want people to understand just what I'm up against. This is why I continue blogging about this stuff, and why I often repeat myself, albeit hopefully in different ways. I'm throwing buckets of sand into a tide of ignorance. Will any of it stick? Time will tell.

2:03 AM, January 07, 2008  
Blogger David Moles said...

Putting stuff in boxes is often a first step to figuring out what you can throw away and what you can't. My main complaint about Eclipse isn't that it can't handle half-million-line codebases (I'm looking at over a million here), it's that it doesn't include IDEA's "Safe Delete" refactoring.

That said, I wish cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 people who've worked on half-million to million-line codebases and say size isn't a problem would share cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir secrets with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of us. (And no, "architect it right in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 first place" doesn't count. That's not a secret, it's a wish for a magic pony.)

7:44 AM, January 07, 2008  
Blogger Unknown said...

I'm a little confused by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 slam against design patterns, since cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 purpose of design patterns is to improve maintainability. Properly applied, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r reduce code size (by refactoring operations into a common framework) or simplify maintenance by reducing dependency between modules (in which case cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 absolute number of lines of code might go up slightly, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 overall complexity of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system goes down.)

I suppose part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365sis is that, on balance, applying a pattern that increases code size is a net loss. I would counter that patterns are often needed to supply predictable semantics across a software system. Without patterns you might be able to get away with fewer absolute lines of code, but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code is likely more brittle.

The fundamental problem with Java specifically seems to be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of metaprogramming facilities like those found in virtually every ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r modern programming language. This makes Java a sort of "lowest common denominator" language for imperative programming, but offers virtually no direct support for ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r programming styles.

You do approve of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "interpreter" pattern as a way of shrinking code size. I would add code generation as a similar metaprogramming approach, where you compile your domain specific language into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 underlying general purpose language. After reflection, this is probably cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most common metaprogramming technique used in Java development. It is a very heavyweight solution, but so is writing an interpreter.

9:39 AM, January 08, 2008  
Blogger Unknown said...

Thanks a lot.
I'm a college Computer Science graduated, and I'm looking for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 definition of "good programming". I'm in love with lisp now, and after your read I know one more point to it.
Thank you for sharing your experience.

11:11 AM, January 08, 2008  
Blogger Henrik said...

Reading your blog gives a nice warm feeling, I am not alone!

But my point of view is even more radical. New tools will not solve this problem. Code lines are not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only measure of evil. Complexity is just as much of a problem.
I think cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 future will prove you right, and neccessity will force us to change our attitudes, away from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 technology and towards cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem at hand.

William of Ockham could teach modern day programmers a thing or too.

Anyways, thanks! you made my day.

12:52 AM, January 09, 2008  
Anonymous Anonymous said...

I wouldn't say its Lines of Code, but racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of anonymous types, closures, tuples, first order functions, etc that is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem with Java.

Also working with collections is pretty common so having built-in dynamic sized arrays and maps in scripting languages is big plus.

Aggregation is a lot of boilerplate in java compared to Ruby's mixin approach.

Regarding you saying Scala and co are not big enough. Why does that matter when its a single developer project? And ECMAScript 4 is not even out yet. I would of thought something like Scala is a lot more proven cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 next gen of ECMAScript.

Can you also explain in more detail why you need dynamic typing?

3:23 AM, January 09, 2008  
Blogger Jeff Langr said...

"The average industry programmer today would not find much wrong with my code base, aside from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 missing unit tests (which I now regret) that would, alas, double cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of my game's already massive 500,000-line code base. ... If I'd done things perfectly, according to today's fashions, I'd be even worse off than I am now."

I've yet to see a 500,000 line code base that can't be shrunk considerably. Having comprehensive unit tests means you'd be able to apply more cleanup more frequently.

The last similar experience I had was with a code base that developers thought was clean. It shrunk from 200,000 lines to 60,000 over cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 course of 10 months, all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 while incorporating 10 months worth of new functionality. Lines of refactored code + lines of unit tests < lines of prior mess.

I'd be fascinated to see what half a million lines of ultra clean code looks like. Care to post cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code, or even just sections of it?

10:00 AM, January 09, 2008  
Blogger Patrick May said...

Hopefully someone with a pet C++ elephant can come along and jump on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 minority bandwagon with me.

Better late than never. About seven years ago I worked on a large clearing and settlement engine for a European bank. The prime contractor was Andersen Consulting. All code was in C++.

AC, in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir infinite wisdom, didn't trust cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir developers to actually write code, so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y forced cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m to use a tool called Design/1. This consisted of a large and growing number of C++ macros and an interface in Microsoft Word (I so wish I was making this up). Even main() was wrapped in a macro that expanded to a macro that . . . you get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 idea.

After approximately a year we hit cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 million lines of code mark. AC threw a party to celebrate cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 event. Two or three ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r sane people and I sat in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 corner and treated cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 event appropriately -- as a wake.

2:01 PM, January 09, 2008  
Blogger Tarun Elankath said...

I completely disagree with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 codesize/complexity argument (and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 subsequent java bashing)

Large codebases need *not* be complex!!. Infact, I have had cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pleasure of working on a 40GB java codebase (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 codebase for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 worlds most popular auction site) as a junior developer and my experience cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re completely removed my fears from every diving into large-scale systems. It was a pleasure (with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 occasional warts), to work on that codebase. Even as a person new to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 system, it didn't take much time to figure out where a piece of functionality lay, how to change it, what effects would it changes have, what tests to write, etc.

Subsequent to that, I have also had cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 unfortunate experience of working on a system probably a 100th of that size but with crazy complexity due to bad engineering. (an commercial ESB bus). Infact, I had to rewrite many components which eventually made cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 codesize BIGGER (by 2x) but made cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code EASIER - easier to read, easier to maintain.

I shudder to think of that sort of code being in Ruby/Python/Perl!

I have been an erstwhile Perl programmer and I am quite certain your 500,000 LOC could be shortened to 5000 LOC... of totally UNREADABLE code.

Java code is easy to human parse. Probably *longer* to write and a *pain* to write sometimes, but *much* easier and *faster* to read and very-very easy to debug. That last point is crucially important, especially when you are hunting for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 root-cause of a bug that needs to be fixed right NOW.

There is a very high comfort factor in maintaining well-designed java systems. I have worked in C++ and I have always prayed before a bug-fix (very true). I have worked in large (old) Perl systems too and it was more of a 'lets change and guess what happens now' fixing.

But, if you are going to be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 only person maintaining your game, I think it makes sense to do it in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 programming language you like. :)

5:42 PM, January 09, 2008  
Blogger Tarun Elankath said...

That is 4.0GB and not 40GB. Typo. :) 40GB would probably need definitely need superman. :)

5:55 PM, January 09, 2008  
Blogger Dan Weinreb said...

I agree that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 mere fact that a code base is that big does not, in and of itself, necessarily mean that it is too big. I've been in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 industry now since 1977, and only recently have I started working at a job that has a really, really big hunk o' software. We're building an airline reservation system. It has load o' features, which cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 customer really needs (about 1/10 of what cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 customer has asked for!), and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 airline industry is just plain ridiculously complex. I've never worked on anything nearly this big; it's quite an experience. It really does have to be that long. A big piece is in relatively succinct languages like Common Lisp and Python; cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 GUI layer is in Java.

5:35 AM, January 10, 2008  
Blogger Unknown said...

I've got a unique perspective on code base size. Bascially I believe that a big code base at a microISV is a symptom of a microISV that's slow and inflexible. MicroISVs need to keep cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ir code base size down because this forces cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m to think agile and be more flexible. I've blogged more about this: A huge code base WILL kill your microISV

9:50 AM, January 13, 2008  
Blogger Dominic said...

Hi Steve,

your article is an interesting and I feel that at least some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 points are valid. Nevercá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365less, I find that I must disagree with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 underlying premise. Granted, some languages may be more verbose than ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs. But in all instances you should never need to deal with all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code at once.

One of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 most important tools in software engineering (and in many ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r domains) is "compartmentalisation". Gone are cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 days when we need to reimplement a linked list class for every new project. If we take cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 example of Java, a good programmer will leverage cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 base libraries provided in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JRE. If functionality is still missing, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y will turn to open source or commercially available libraries. The only code which should need to be maintained is cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code specific to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 business problem at hand. Even for this code, much of it can be factored out into libraries or frameworks which can be maintained separately from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 main project.

Computers are incredibly complex devices, yet nobody suggests that we should throw cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m away and replace cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m with something simpler. We can create cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se complex devices because we build on layers of complexity. An ASIC engineer uses existing libraries for implementing sections of a chip. A hardware engineer doesn't look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 internals of a chip but merely uses its published specifications to build a device which is more powerful than cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 sum of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 individual parts. Object oriented languages allow similar compartmentalisation to be applied to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 domain of software engineering.

Search not for a new language to solve issues with code size but racá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r break cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem up into manageable and distinct chunks.

Regards,
Dominic.

2:47 AM, January 14, 2008  
Blogger Frederic Fusier said...

I'm really surprised that Eclipse indexing never finished with only 500,000 lines of code. It's my usual set-up in my workspace and never got such an issue.

As I work on this part of Eclipse code, I also often verifies that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's no problem to get indexing finished in a reasonable amount of time (approx. 1 min) with heavier setups:

1) All cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 source files of Eclipse which is now (eg. since 3.3) over than 3 millions lines of code
2) All cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 source files of Europa which is more than 17 millions lines of code...

8:44 AM, January 18, 2008  
Blogger krysia said...

First of all I would agree that code-base size is as big a problem as you say. However, I would posit that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 size of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem be more of a function of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 structure/design of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code, than just cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 number of LoC. See.

10:04 AM, January 20, 2008  
Blogger Unknown said...

Sigh.. javascript? scala? doom I say, doom..

Give Nemerle a try. It is what Groovy and Scala should have been.

9:15 PM, January 28, 2008  
Blogger Greg Colvin said...

Count me in that minority, too. But a half-million lines? You have my sympathy.

I've built GUIs and databases and virtual machines, and worked on one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world's biggest codebases, and have never had to deal personally with that much. But years of MS-DOS coding (meaning tiny space and slow chips to run your software, and primitive tools to write it) and an allergy to of needless complexity have taught me that tight code rules, lose code drools.

I've never found choice of language to be an obstacle. I've coded professionally in FORTRAN, Pascal, C, C++, Java, Scheme, and more. It doesn't take that much sometimes to increase cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 amount of code you don't have to write. C macros can generate a lot of clean boilerplate if used well - look at what Boost.org does with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m. You can build a nice object system with C macros. C++ templates are even more magical code generators, and Scheme and ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r Lisps are metamagical.

So sometimes I like to suffer a few lines of whatever I'm stuck in to write a Scheme interpreter and bust on out. From cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re I can architect my structures and logic in Scheme and customize my Scheme dialect to fit my architecture. And I can write my runtime in whatever I'm stuck in so at to leverage its runtime and provide interfaces to my colleagues left behind in Whateverland. I did that on a paid job once. I would have been fired if hadn't already quit.

Anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r way to try to get fired, and one with some advantages over an interpreter, might be to use an available Scheme environment to write Scheme code that takes Scheme descriptions of your structures and logic and translates cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m to code in Whateverland. But we didn't get fired for that, we got lots of rapidly-appreciating stock options for having successfully intergated a Whateverland virtual machine into one of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 world's largest codebases. Thus enabling its continued metastatic growth.

11:35 PM, February 08, 2008  
Blogger Greg Colvin said...

In response to Snow:

Consider cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 case of a database system. Extremely complex, used by millions of users and required to be blindingly fast when accessing millions of records.

These systems are very large but maintainable as cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design is good. Whecá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r it's written in Lisp, Java or assembly language is not cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 deciding factor - cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design's cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 thing.

I once worked on one of those beasts, and indeed it was huge and complex. And written in C. I never did grok enough of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code to judge cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design, but it had held up to years of maintenance by thousands of programmers, so it must have gotten something right.

But it seemed cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 main reason it was still working was that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re were so many of us programmers that none of us had to deal with more than a small piece of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 beast, and every group had a very senior architect who made sure his group's piece fit into cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 big picture.

Also, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 daily build was always followed by cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 daily regression tests, and breaking cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 build or cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tests was a big no-no.

So again, choice of programming language is a small part of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 picture.

12:40 PM, February 10, 2008  
Blogger Fireblaze said...

When you write your own half-million-line code base, you can't dodge accountability. I have nobody to blame but myself, and it's given me a perspective that puts me in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 minority.

500.000LOC = 65 years for coding for one person!

A quick look at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 matrix from Steve McConnells book Rapid Development says that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 schedule according to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 data he collected from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 industry for business projects 500.000 LOC would require 780 man-month, that is 65 year.
The data is collected from:
1) Software Engineering Economics (Boehem 1981)
2) An Empirical Validation of Software Cost Estimation Models (Kemerer 1987)
3) Applied Software Measurment (Jones 1991)
4) Measures for Excellence (Putnam and Myers 1992)
5) Assessment and Control of Software Risks (Jones 1994)

Eicá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 reports above are wrong or your code base stinks with duplication/autogenerated bloat code. I suggest you post fact about how long time it took to create that codebase of 500.000LOC and how many LOC that are duplicated using a duplicated finder tool.

8:24 AM, February 14, 2008  
Blogger Anirudh Vyas said...

Its weird, but you don't have a choice except Java (or C#?) in commercial programming world. I have played around with Ruby, Haskell, OCaml etc. Back in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 days i used to be into C with some basic mixed assembly. There has been so much invested in Java for past 10 years by firms, that even if one wants to take a hard look at code and say enough is enough you cant do it. You simply cant.

I hate to say this to all Ruby people, but i don't like it at all. Scala ... now thats something.

Also, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re is a difference between "what "kind" of code you write", "How you write" and "How you maintain". So not all code written in all companies is bloated (Leave out some of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 financial firms where cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y have to do quick fixes ;)); And honestly, I don't really care / zealous about what anyone says. I liked Java back in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 day because of its simplicity, and because i had to do a lot C with pointer arithmetic.


Even James Gosling said (and rightly so, despite cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fact that he tried to play down his statements or worst recant it back) "Sometimes you have to take a hard look at a language and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n again start with a clean slate" (i don't quite recall cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 words right now but yea (especially since its 12:33 in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 night :)).

Regards
Vyas, Anirudh

9:37 PM, April 04, 2008  
Blogger Rob Allen said...

Nice post, very enlightening. Just one question, why are you looking to get stuff that works in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM ? If cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are languages out cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re that reduce cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code bloat why not run cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m "au naturale" without cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "taint" of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM. I say taint in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 nicest possible way as I dont really hate java.

4:04 AM, April 22, 2008  
Blogger Gunter Kaufmann said...

Hallo Folks. I am an avid user of blogs but just beginning to use tools to send comments to my favorite blogs.

I am seeking some hints on where to start building code to deliver cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same text to multiple posts on a single blog or on multiple blogs. I don't want to send to every thread - just cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ones where cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 context fits but sooner or later I wind up sending something to each and every post so I want to build robustly. Anyone found a way to send cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 same messages to many posts with code doing all cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 work?

3:07 PM, May 28, 2008  
Blogger MFabric said...

+1 Scala

8:59 PM, May 28, 2008  
Blogger NotZed said...

It seems to me that oo languages (in particular) make refactoring expensive. So much so that it is often put off for too long. It isn't just changing one function any more, it's changing a whole object tree of dependent functions (i'm assuming here cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 changes are required because cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design has problems - if it doesn't why are you changing it?). Because of that cost most fixes don't take cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 holistic view and end up polluting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 design purity it may have started with.

Good OO design is just harder than decent procedural design. It's easier to make more limiting mistakes.

But FWIW I find most of my refactoring (as opposed to 'rewriting') efforts involve deleting lots of code and moving bits of it to shared areas. Infact I wouldn't bocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r if I wasn't - what would be cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point?

8:19 PM, June 02, 2008  
Anonymous Anonymous said...

Hi
Code's Worst Enemy which makes a pretty sensible claim that his half million line of a game is too big. I think that it is based on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 languages. I also indicates that wants to continue cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code's worst enemy.
================
henry
There are a lot of sites out cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re showing book video. BookVideoTV, BookTelevision and of course CSPAN, but I like how BN.com and Reader's Entertainment TV have specific genre channels and original shows. There's just more to see and I can be specific in what genre I'm interested in. Anyone else watch online tv?
Reader's Entertainment

11:17 PM, June 18, 2008  
Blogger Unknown said...

I don't know if I agree (or get your point).

As far as I'm concerned, zby had it right -- what about abstracting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 majority of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code away in libraries? Isn't that what software development is all about anyway? You're already working on a codebase of millions of lines as soon as you start a new Java project. The only reason you don't consider cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365se lines part of your application is that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365y are nicely encapsulated and abstracted away.

So in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 day abstraction is always cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 solution to your code size problems.

12:21 PM, June 25, 2008  
Anonymous Anonymous said...

But, I'm training for decent athlete status myself.

1:25 AM, September 18, 2008  
Blogger Knitter said...

I don't think you're going to read this, but if by chance you do, please drop me a line.

I started reading cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 article and liking what I was reading, it talked about something that I, a young student eager to learn and be a better programmer, always fought against: too much code. Not that I was taugh to see it as problem but nevercá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365less I felt it was one I could try to eliminate.

But I was disappointed to find that cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 article is nothing more than a bashing on Java language and Java programmers, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fact that you're game is made in Java doesn't really justify it. If it was written in C++ would you just end bashing C++ language and C++ programmers?

I really felt like you ranted away from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 point and made this just anocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r "I don't like Java and Java programmers are dumb" post.

I would like to see a post on code size that could talk about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem without a specific language in mind, a post that talked about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem and did not hide it in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 language X or Y features, or cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 lack of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m.

11:17 AM, October 06, 2008  
Blogger BenCollver said...

Rhino may shrink cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code base but cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 run-time will still suffer from Java's memory bloat. Here is an example from a 2003 blog post:

"First, consider Java's String class. Everytime you create a new String class, you are paying:

* 12 bytes for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 String's object overhead
* 12 bytes for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 String's member variables
* 12 bytes for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 character array's object overhead
* 2 bytes for each character

So "hello world" consumes 58 bytes of memory, not counting cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 reference to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 String object itself.

Now consider Java's HashMap class. For every entry in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 map, you pay:

* 5 bytes for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 reference to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Entry (taking into account cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 empty entries in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Map, given cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 default load factor of 75%)
* 12 bytes for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Entry's object overhead
* 16 bytes for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Entry's member variables

Now what do you think happens if you create a HashMap whose keys and values are both Strings? A 5 megabyte file will bloat into 50 megabytes of RAM!"

8:01 AM, November 07, 2008  
Blogger Unknown said...

I thik Stevey is missing an important option... You are sometimes better off to make a program that *generates* souce code for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 end program... You are cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n not tied to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 weaknesses of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 programming language because *you* are creating cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 programming language. So for example you could add #define and #if and even stuff c++ doesn't have like #while or #for

You can also create your own GUI for developing code, so for example a split screen, where cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 left side is a custom form that changes appearences depending on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 function in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 current line of code, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 right side is ordinary text view... so for example when you wish to code command to "open" a file, you get browse button, combo boxes and full documentation to optionally help you write cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code.

11:51 AM, March 20, 2009  
Blogger AndyG said...

Interesting that you mention, that you did a game on your own.

Because nowadays popular games are often created by huge teams. These enourmous costs demand that games have to be mainstream.

So some people which back cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 old days where 1 person could do a game.

12:45 AM, September 11, 2009  
Blogger BiBeep said...

I don't understand. You started with bloated language and said you made massive engineering mistakes in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 past. You wrote cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 game 10 years ago, so I reckon that you must have made serious mistakes in your code for it to reach that big + that was 10 years ago. Things have improved now. I think you should stop blamming cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tools. If you use cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wrong tools for cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 wrong job, do not blame cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 tool.

4:28 AM, January 11, 2010  
Blogger Unknown said...

Have you looked at REBOL? There is nothing else like it when it comes to reducing bloat. Take a look at http://re-bol.com and http://rebol.com .

11:23 PM, April 10, 2010  
Blogger Unknown said...

Steve's right.

Personally I think C# is a large improvement over Java; it's not as concise as some languages, but LINQ, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 var keyword, extension methods, lambdas and a non-broken generics implementation all help. Fundamentally, cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 C# culture doesn't think that concision is a dirty word.

Trying to master cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 C# type system, I took an interest in Scala, but I came back disappointed. Type erasure is a "broken window" that effaces all of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 good things in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Scala type system. C# taught me what I could do with a decent generics system, and time and time again I'd discover that type erasure would get in my way. Ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r 'clever' ideas in Scala, like cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 way constructors work, just seem naive to me.

My feeling is that any large system is going to have certain sections that need to be built with efficiency in mind, and in those places, static typing has major benefits. Large systems are always surrounded by an aura of things that are scripty, and would benefit from dynamic typing. A combination of Java and something like Rhino seems like a good idea.

In cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 big picture, I don't see cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 problem as being as much about languages as about programming paradigms. Object-oriented programming has been useful, and will continue to be useful, but we're still finding that it's too expensive to develop software. If we want to build systems that are cheaper and do more, we need to move towards approaches that are declarative and ontology driven. Although I'll never accept Lisp's BLUBiness (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fact that it rejects 1960's developments in parser cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365ory) I'm personally mining cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 1970's and 1980's AI literature for ideas.

1:04 PM, April 23, 2010  
Blogger Michael Langford said...

A little irrelevant but: The entire time I was reading your post, from design patterns on, I was hearing "Little Boxes" (The cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365me song to cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 excellent showtime show "Weeds").

3:34 PM, April 23, 2010  
Blogger Just Us said...

Rhino sounds great - when will it be finished? I downloaded cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 latest version and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 file I/O is in cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 "examples" folder, with a comment that says "This is what file I/O might look like if we ever get around to it."

8:56 PM, June 11, 2010  
Blogger Anon. said...

I have a question about understanding large code bases. I seem to have no difficulty reading and understanding code that is say upto about 10,000 lines. Beyond that, I seem to lose track of things - I have tried various things to try and understand whats going on - keep note of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 call stack as I read through code, look carefully at cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 documentation to get cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 general flow of things, try and understand cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code by first breaking it down into small chunks, understand that part properly, and cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365n see how it fits with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 rest of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code.

This works in some cases - like for example cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 Php scripts that run mediawiki (cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re are about 200 of cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365m). But once I get to something thats larger, it is very hard to understand whats going on - I tried to understand MySQL code and Apache code - and it was hard to figure out what was going on.

Would you have some general advice on how to read and get a general idea of what some particular file is doing quickly? It seems that I am always working with large codebases - not being able to deal with cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 scale is slowing down my work.

Thanks!

6:45 PM, August 25, 2010  
Blogger Ridhi Sharma said...

Why do people who have emotionally abused me tell me that I am my own worst enemy?

8:47 AM, April 04, 2011  
Blogger PAz said...

That was a really good article.
Being a Computer Science student at a university that teaches java, I thought it a bit odd when one of my lecturers said "if you're just one guy, you want to use c++, and if you're thousands of guys, you want to use Java, and if you're in between, you want to use Python. So cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's almost never a reason to use anything but Python."
But I guess what you're saying not only makes sense, but encourages me to make sure my code bases (when I, you know, actually get any) remain small.

Given I only really have *any* experience with Java, if one were to try and keep a codebase small, what techniques are you suggesting? Ignoring cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 fact that I wouldn't be using Java, that is :P
Is it a case of be sure to generalize everything so cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365re's no duplication? Just plan cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 darn thing better, writing cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 code by hand?

That was one thing I thought odd about cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 difference between DrJava (notepad with colours, compilation and commandline runtime built in) and NetBeans. It seemed I could learn Java and write it myself, or I could learn to use NetBeans. Do things like NetBeans not detract from cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ability of a programmer, as opposed to a computer user?

Thanks
PAz

10:04 PM, June 15, 2011  
Blogger rhdoenges said...

> Unfortunately, a JVM language has to be a drop-in replacement for Java

JVM lisps are mostly just lisps that happen to run on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 JVM. Clojure, on cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 ocá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365r hand, is great for java interop. It doesn't shun standard java classes and I would recommend it for your next project (you appear to have chosen Rhino for this one).

8:20 AM, July 05, 2011  
Blogger John said...

Great Post. It's rare I read through cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 long ones, but I really enjoyed it.

10:20 AM, July 05, 2011  
Blogger Jordão said...

Nice article. I know cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365 pain... You might also want to check this one from Michael Feacá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs:

http://michaelfeacá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs.typepad.com/michael_feacá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365rs_blog/2011/05/cá cược thể thao bet365_cách nạp tiền vào bet365_ đăng ký bet365-carrying-cost-of-code-taking-lean-seriously.html

In LEAN terms: code is inventory, and should be minimized!

11:32 AM, July 06, 2011  
Blogger josh said...

Well, it's been over two and a half years since you wrote this post. How did things work out?

5:16 PM, July 23, 2011  

Post a Comment

<< Home