28 karma · joined February 24, 2008
technoguyrob @ [letter before h]mail (math\.uic\.edu)\/~(robertk) -> $2 @ $1
Constructive comment: I can't middle click links to open them in new tabs.
P.S. You're not getting too much enthusiasm for it here because of the choice of PHP. I can assure you, though, if this takes off, a lot of those "can someone build me a Joomla or Drupal site?" on eLance will rapidly turn into "can someone build me a Noloh app?"
this.hSpacing = Array.prototype.slice.call(this.parent.blocks.filter(
function(n){ return n < _this.parent.cols; })
.map(function(n,o){ return o.offsetLeft; })
);
Your function names and decomposition are indeed much easier to read. Thanks again, Neal!EDIT: I see what you mean. For part 3, for example, I want "12:05", not "12:04:27". Yeah, I was getting to that.
EDIT: And yes, I agree, if I ever decide to make events more fancy than just dropping in a DIV on the timetable, I'll probably have to do a bit more. But of course, only a couple things will change then, and I can just write those as helper functions for this function.
1. I agree, but they're tiny inline functions so that's why I did that. I'll refrain from doing that from now on as this seems to be a general consensus.
2&3. Aah, good point. I just went back and looked at an old JS project and noticed I was doing both of these properly with parseInt. I've forgotten though as I haven't done too much heavy Javascript for a while before this. Thanks so much!
4. I've used call before like that but for some reason I forgot about it and switched to apply. Thanks!
5. Ok, that's what I wondered. The comments so far seem to agree this would be better for readability. I don't plan on anyone else even touching this code, so indeed like someone else suggested that could be an important factor, as indeed if this wasn't a personal project I would've used a more orthodox (i.e., less compressed) approach.
That's exactly what I was looking for. Thanks!
EDIT: Also, if I used "day" and "halfHour" attributes they would be hardcoded. Maybe someday I'd like to change to hour blocks, or have a view in four-hour blocks instead of half-hour. I am using this object as an abstract class that handles a calendar view, which will be passed specifics for the view. For example, the day view will be initialized like this:
arguments.callee.$.__init.call(this,
{timeblock:1800, rows:48, cols:1, timedir:0,
startTime:startTime,
timename:'day', container:'daycontainer'}
);
Where the "arguments.callee" stuff is just calling the (inherited) superclass initialization function. This way, if a New World Order appears and ever decides to make 5-day instead of 7-day weeks, all I have to do is change one line of code. ;) (while that's true, the real reason for me doing this is so I don't have to write code 3 times for a day, week, and month view)That's (partially) why I didn't do something like hardcode "day" or "halfHour" attributes (although I do store all this information in the object--the method I showed above is a computational helper function).
Does that make my approach any better? I think that addresses every issue. I agree, though, there are better ways to do this, but this isn't a priority project for me so I haven't put as much thought into it as I'd like. Thanks, Neal.
- Darryl F. Zanuck, Head of 20th Century-Fox, 1946.
How I wish you were right, my dear Darryl.
How are "normal" languages not the same old ideas repackaged in different syntactic packaging? I'd say "dog" and "hond" aren't different ideas even though one is in English and the other in Dutch. They're just the same old ideas repackaged in different syntactic packages. Isn't that practically the definition of a language? Some things that take me a sentence to say in English can are only a few phonemes in Japanese, but does that mean Japanese isn't a real language because it's the same idea in a different syntax? I'd say syntactic difference is possibly the defining characteristic of a language.
Perhaps this is simply indicative that the term "language" is innapropriate to apply to a programming grammar.
http://news.ycombinator.com/item?id=208748
To quote:
It is not ridiculous, since people aren't downmodding to express a difference of opinion about what the person said. They are downmodding to assert they do not want to hear any political opinion on Hacker News, because--as has been said--there are countless other venues for hackers to express and debate political opinion; Hacker News is not one of them.
Notice therefore we see something interesting regarding the HN system. In essence, this is exactly what pg had in mind. Karma is taken away for comments and not just submissions, so that users will adapt to the Hacker News atmosphere. As we have seen from this thread, politics (even "news" like the first ever black general election presidential candidate) is simply not something people are interested in seeing on HN, and if people keep discussing it, they will be downmodded into oblivion, effectively maintaining the current HN mindset (since, presumably, people with negative, or quickly decreasing karma, will not want to continue posting on HN).
The only thing that could break such a system is a vast shift in the mentality of the community (which is not a bad thing since it would still keep the community happy, although it's very unlikely to happen), or a massive influx of new people into the community (which is why pg wants to keep the number of new signups per day low).
I used Rent A Coder for a bit, but their system is terrible. I now use eLance to freelance and it's MUCH better. I've already made $10k on the side with this, with a cumulative coding time of less than 100 hours. However, the searching might've taken 10 hours, as it's hard to find projects that are worth it (but once you hit one, it's jackpot).
Not to mention, I always do projects which involve some new framework/language I've never used or some task I've never tried, so I can learn as well as make money! It's so great. Some might call it irresponsible, but I do my homework before even starting the project, and we all know it doesn't matter what tools a great programmer is given.
P.S. I'm 17, but no one has to know that. ;-)
while (true)
1. Find a new submission with no upvotes or comments that is interesting to you
2. Make an interesting comment for that submission
3. Upvote the submission - if it's new enough it should get bumped to the front page, and if it's interesting enough it should start getting upvoted, as well as your commentOf course, if the "Singularity" happens to mean we'll just be much faster thinking version of ourselves, then perhaps you're right, it will be banal, as presumably our perception of time will be perverted as well.
Kind thanks!
EDIT: I now see the URL of the 37signals post betrays the fact the original title did in fact contain "who's". Of course it is not your fault then, but as I said, it would still show greater care if one checked something like that before posting.
Notice therefore we see something interesting regarding the HN system. In essence, this is exactly what pg had in mind. Karma is taken away for comments and not just submissions, so that users will adapt to the Hacker News atmosphere. As we have seen from this thread, politics (even "news" like the first ever black general election presidential candidate) is simply not something people are interested in seeing on HN, and if people keep discussing it, they will be downmodded into oblivion, effectively maintaining the current HN mindset (since, presumably, people with negative, or quickly decreasing karma, will not want to continue posting on HN).
The only thing that could break such a system is a vast shift in the mentality of the community (which is not a bad thing since it would still keep the community happy, although it's very unlikely to happen), or a massive influx of new people into the community (which is why pg wants to keep the number of new signups per day low).