Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Z-Bo
Jul 2, 2005
more like z-butt

nebby posted:

Bring on the hate, but I'd love to see your examples of functional constructs in java that don't read like a goddamn essay.

I think you are completely missing why your blog posts were so epic and are seared into our brains: You were mentored by Charles Simonyi, and yet completely misrepresent his position on intentional programming.

People have given me poo poo in the past for misrepresenting subjects, and I deserved it... even if in some cases I felt like the opposing party was being a grammar nazi. You appear to think it is Nebby versus the World.

Adbot
ADBOT LOVES YOU

Z-Bo
Jul 2, 2005
more like z-butt

nebby posted:

Yeah, I mean, I catch myself using "i" when I know better. The problem is, I see it as a bad habit when most see it as acceptable. When you are writing a loop, you can quickly get into trouble if you have nested loops and have i, j, or even k being used. Additionally, and more importantly, using "i" is ignoring an opportunity to introduce a good name into the code. You're looping over it for a reason, so you should usually opt to provide hints as to why you're doing so in the name. If you are looping over a list of apples that need to be put into another bucket, instead of "i", you could use "iAppleForBucket" and not worry about confusing it with another loop variable and potentially remove a comment saying "// We loop over the apples for the bucket" !

This is why I think you are missing the point of Intentional Programming.

As I understood it from Simonyi's explanation, the mere notion that you loop over apples in a bucket has one more parameter than is necessary: you are creating an index for something that inherently has no necessary index. There is no need to create a key, because all the key does is provide base address plus offset. In other words, all it does is provide information about what is in a particular memory address.

Furthermore, this is a general idea in Computer Science that was made obvious by Ted Codd: set-based programming is superior to Bachman-style navigational programming. The for loop and the nested loop patterns are artifacts from navigational programming. Some people were really stunned when Codd showed that math could be used to provide succinct code.

nebby posted:

I don't see how I can be misrepresenting them when the lead dev at Simonyi's company (who is a real wizard, IMHO) told me my blog put forward the best argument he had ever read for Hungarian (assumingly apart from those written by Charles.)

You are using an appeal to authority to back up your point. Yet, you aren't telling me why that person thought your argument was worth hearing. I don't care if they liked it or hated it. I care that they understood it and why they would recommend I read it.

I have read ISC devs' blog comments on some of Simonyi's staff on his blog, and they were always impossible to understand. It was all blah, blah, blah, THEN I HAD AN EPIPHANY, blah, blah, blah. This is how you come across, as well. By contrast, Simonyi is the only person at that company who really wows me with their comprehension about this idea of "Intentional Programming".

Z-Bo
Jul 2, 2005
more like z-butt

nebby posted:

code:
class AppleBasket
    cApple = 0
    def addToBasket(basket)
        basket.cApple++
    def takeFromBasket(basket)
        basket.cApple--
    def cAppleInBasket(basket)
        return basket.cApple;

This interface doesn't make any sense. Why would you add a basket to a basket?

The most important parameter to explicitly model in this problem is that you clearly care about ownership and not membership. These baskets are not the same thing as mathematical sets, so you cannot therefore model them as sets: you cannot use membership as a status. One basket must clearly own all of the apples in its basket. Forget the fact you have the "c" in there. Your model is dumb. You have bigger problems than whether to use Hungarian notation or not!

Z-Bo
Jul 2, 2005
more like z-butt

biznatchio posted:

Well I think sheds should be painted blue.

A blue shed will survive a nuclear holocaust in the event the power plant nukes itself. When someone looks at the blueprints for this facility 10,000 years from now after the radioactivity has decayed, people will look at it and recognize it is a blue shed.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply