It's easy to look at something with security blinkers and go "eeks - you n00bs!" but it's ridiculously difficult to put in place any measures without immediately reducing the usability of your solution.
426 karma · joined June 9, 2008
It's easy to look at something with security blinkers and go "eeks - you n00bs!" but it's ridiculously difficult to put in place any measures without immediately reducing the usability of your solution.
Intesting Anecdote: NDTV 24x7 (something like CNN in India) had extensive polls in the last (2004) election where they predicted a huge victory for the BJP party. They had poll results state-wise and interviews with eminent psephologists and so on, all predicting a resounding victory.
In the end, BJP lost - and quite badly too! Lies, damned lies, and statistics...
Striving for it by: Friendship, Family, Health, Savings, Entertainment
For instance, code reviews are great - but maybe you can't use them in your one-person startup. That shouldn't stop you from still writing great code! It may be harder - yes, but you have to have the confidence that you can do it.
I mean consider the author's dependence on static checking. There are a lot of wonderful dynamic languages available (and a lot of great programmers in those languages too!). The author - because of his philosophy of being a "terrible programmer" is simply going to miss out on whole genres of languages and techniques.
IMHO great programmers have confidence in themselves - just as in any other field. Tools and techniques are really secondary.
EDIT: Grammar.
Relying on tools and techniques may help me coast through my career - but where's the fun in that? Tools and techniques are all well and good, but they can't become the crutch you lean on.
And please, please - do try more languages than just Java/C/C++/Ada.
I program in C/C++ with a team of very talented developers. None of us are humble, all of us believe we can be the best and we have a lot of fun. Plus our product is great!
Using FP is like learning to ride a bike. It's difficult to give you "advantages" over riding a car (or bus) - you have to try it out and get comfortable to appreciate it.
Just give it a try - write out a few of your (semi-serious) projects in an FP language. Start with Scheme. You may enjoy it!
The reason I like FP is because it is "pure" and I enjoy the difference in the thought-model when programming. Plus I usually can get things done much faster. I think this is why most people enjoy FP in one way or the other. Why ruin that in the quest for popularity?
- The favorite joke of the creator of 4chan.
I wouldn't trust this guy too much. It seems strange that he can't monetize such a hugely popular site. Kind of fishy actually. If he has problems with big flashy ads something like google adsense would work out just fine.
To see how C++ has moved towards objects-for-everything, I have just one word - boost!
RE your second point - I don't know of any studies that show OOPS makes programmers more productive. As a matter of fact, some anecdotal evidence (cough pg cough), points to the opposite!
discuss (TweedHeads, visitor4rmindia);
This, to me, underlines some of the problems of the OOPS approach. Everything starts "looking like" methods even when they would be more natural as simple functions.But then how would you attach makelove() or fight() or discuss() to a single Human? When do we use TweedHeads.discuss(visitor4rmindia) vs visitor4rmindia.discuss(TweedHeads)?
I've just checked around though, and it doesn't seem to have made much of an impact on many people's bills (at least in my office). Maybe we compensate by calling more or longer.
|offset0|key1|offset1|key2|offset2|key3|offset3......|
OR |key1|key2|key3...|offset0|offset1|offset2|offset3...|
OR |offset0|offset1|offset2|offset3...|key1|key2|key3...|
OR |count|key3|key1|key7...|offset0|offset1|offset2.....| <== Binary search-able keys
In all of these cases, the data structure is different but the basic B-Tree algorithm remains the same. You can implement the algorithm once (using templates (C++), macros (C), or a weakly typed language (Lisp/Scheme)) and re-use it with any and all data structures that come up later.EDIT: Forgot offset0
EDIT: I'm using the word "ubiquitous" because that's what was used in the article.
For instance most examples on the net just assume keys to be long numbers but that is obviously insufficient for an actual application. Keys could be 20-bit hashes, strings, floats, doubles etc. The same applies to a lesser degree to the offsets (at leaf node level) and any embedded values.
Plus it is interesting that you view a B-Tree as an object - when I think about it, I categorise it as an "algorithm" operating on various data objects.
>When I was first introduced to the idea of OOP I was skeptical but didn't know why - it just felt "wrong".
It's more a personal rant than a well thought-out article.
* Data structure and functions should not be bound together
In some cases encapsulation works really well. For example GUI elements. It is less true for "process-oriented" components. But the arguments he makes don't seem very well thought out.
* Everything has to be an object
I actually agree here. To my mind, the biggest problem with OOPS is that is slowly devours all other concepts until we are left trying to force-fit all problems into the OOPS mould.
* In an OOPL data type definitions are spread out all over the place
This just ignorance.
* Objects have private state
This is also a good point. Having state actually tends to being a "bad" thing to do. Of course, the entire purpose of the object is to capture some invariant, but an object doesn't make that clear. Many objects contain instance variables that should actually be parameters.
* Why is OOPS popular?
Because it makes it easier and safer to get programmers working together as a group. The vocabulary of available objects is a simple and somewhat elegant way of communicating.
(EDIT: Corrected layout.)
And their mobiles are usually really good models too - better than mine most of the time. It's stuff like this that gives me hope that India is getting upwardly mobile [ excuse the pun :-) ].
The article references several studies that show, statistically speaking, that two-career marriages are harder than "traditional(?)" marriages. Responding with anecdotal evidence and feelings doesn't invalidate the original argument.
It's easy to accepts studies when they confirm our own world-views. Disregarding studies that go against personal philosophy (based on gut-feel) is just confirmation bias.
Why not go with it? Studies show two-career marriages are harder. So if you both are working just factor in that you may have to work just a little bit harder on your relationship - which is not such a bad thing anyway.
While there are second-order effects, politicians are largely free to ignore aforementioned "will" during their day-to-day routine. Thus they generally spend time manuvering and manipulating for an increase in personal power - which is what we call "politics".
"Politics" exits even without "democracy". It exists in dictatorships, in offices, even within families.
It is therefore completely correct to enshrine democracy while denouncing politics. Does this make sense? :-)
EDIT: When I say families - I am referring to "joint families" (large family groups consisting of a matriach/patriach and multiple sons/daughters/uncles/aunts and sundry). While this is not un-common in India - I felt I'd better explain it to everyone else.
And I'm starting to discover that I am more productive in C than C++ which started me wondering about OOPs and what I believed to be established wisdom. This article sort of reflects the doubts I have so any specific criticisms would be great.
I mean, isn't the point of OOPS that it isn't supposed to be a minefield?
If we don't consider side-effects then "tabs" just degenerates into "continuations".
EDIT: Maybe tabs == "monads" + "continuations"? I don't know enough about haskell to tell.
Windows has always felt to me like the work of several teams, each in its own area. I never considered this a weakness because that's "just the way it is". However, this thread has helped me see that it could be.
I'll consider taking up some linux programming when I get some free time to get a feel of the difference.
From your answer and krshultz's below I think I see the complaint. While parts of the windows API are written well, they do not have an overreaching unifying framework. Such a framework would make it easier for developers to follow guidelines and pick up new API's.
I think that's a pretty reasonable complaint. I take it for granted that I have to read MSDN carefully for every API I use, but maybe in Linux/Mac I wouldn't have to. Interesting.
As you said though, it doesn't really answer my question. I'd genuinely like to know what is poor at API level.
For example, I could easily write a small utility that would display all the fonts on the CD. It would take an hour or so but the API's should let me do that (disclaimer: haven't tried it).