Single line declarations are a huge one.
1,261 karma · joined October 30, 2008
Single line declarations are a huge one.
And an addition to that list: http://www.railstutorial.org/book
I tried looking into OMB for a side project about a year ago and had a very hard time finding any clear documentation, and just looking again now it doesn't seem any easier.
This is handled by title bars in Gnome, OS X and Windows, not window menu bars.
"separates the data (what's inside the window) from the menus that act on that data"
The menus don't just act on what's in the window. At least some menu items act on the application itself.
In a multiple document interface with a system that ties menus to windows, the menu of one window acts on multiple other windows. The other windows are either sub windows shoved inside the main window or they are windows floating independently from the window with the menu, which means you need to return focus to the main window to use the menu.
In a single document interfaces, the same menu, application controls and all, is repeated on each individual window.
Furthermore, in both of those cases, once you close the window with the menu bar, you no longer have access to any controls for the application, which is why most applications in these windowing systems can't run without at least one window open.
Most people with laptops spend 1-2 hours. You'll get people working longer in the mid morning and mid afternoon. People who show up with laptops at 2 (1:30-2 is a common transition period), for instance, seldom stay past 5/5:30 (another common transition period). 5 or 6 hours tends to be the upper limit; most people can only sit in the same spot for so long. Obviously, it's very rude to this without buying drinks at regular intervals.
At many cafes, people that are ruder about it are almost never regulars. Any cafe that's popular enough to be filled up will have a network of regulars. Regulars chat, share books, go out for drinks and, among the programmer regulars, chat about startups, collaborate on projects or hire one another for contract work. You'd probably not be able to recognize it if you go in and people are all reading and on laptops at the time, but if you start frequenting it you'd start to pick up on it
There was a big transition over the past 10 years when coffee shops went from being smoking establishments mainly catering to young people and people on the fringes to being places where a wide demographic of people meet to talk and, for many people, work on computers. Laptops + wireless breathed new life into independent coffee shops at a time when they were being hit with smoking bans and still licking their wounds from a decade of starbucks expansion.
The transition to wireless has created a thriving cafe culture that's more busy than I've ever seen it. The cafes around me are so packed all day every day that I have to time my arrival to make sure I get a seat. 10 years ago they were mostly empty during the day. And it's not just more customers, it's better customers. Schizophrenics who sat with a single cup of coffee for hours while harassing other customers have been replaced by young professionals who buy double lattes.
The vast majority of coffee shops that didn't embrace or take seriously the transition to wireless have lost all of their customers and closed. It's been somewhat heartbreaking for me to watch some of my favorite coffee shops sit empty and eventually close down because the owners didn't take the wireless transition seriously and/or because they held on to an imaginary ideal about cafe culture.
Turning it off on weekends makes some sense; people aren't working there as much. However, it's a dangerous idea for cafe owners to take the anti-wireless sentiment too far. It reminds me of when I worked in academic libraries during the period they were still holding on to their luddite fantasies about the role of libraries. If you own a cafe and are considering this, you better make damn sure that your cafe has enough of these ideal, laptopless customers. I've seen a lot of cafes gamble on this and lose.
All that said, it's interesting that wireless has made coffee shops so popular that people once again value them as social centers.
It's entirely and easily conceivable that there could be another species that looks at us and wonders whether we are intelligent or persons according to their standards of intelligence and personhood. After all, manipulating our environment might not be proof enough; it could be argued that we still do it as an automatic response, simply working together as a species to propagate the species and still ultimately motivated in all our actions by innate, animalistic desires. It can easily be argued that the only fundamental difference between humans and other animals is simply the complexity of our interactions with our environment. Even the things we hold up as proof of transcendence from the animal world are likely just adaptations, eg, what we consider an impulse to develop ethical systems is just an adaptation of the brain to keep individuals working in the interest of the species.
Furthermore, imagine these hypothetical creatures had a better understanding of what we consider "souls," death and even pain. They could theoretically see no ethical issue with causing humans pain, suffering and death since, from their perspective, we don't really understand what's happening and our reactions are just automatic self-preservation.
It explicitly doesn't. Read it again. Immediately after listing his 7 constructs he points out that a number of them are actually the same thing, and in the summary he clearly explains that there are only 4 different behaviors. His 7 constructs (which include methods and bare blocks) are actually only 3 or, arguably, 3.5/4 (his numbers in parens):
blocks, which aren't callable without being wrapped in a Proc in CRuby (1, 2)
Procs (two types: Proc.new/&block and lambda) (3, 4, 5, 6)
methods (7)
There two types of Procs, plain procs and lambda, with lambda's differences being how it checks arguments and its return behavior, as I noted yesterday in another comment in this discussion (http://news.ycombinator.com/item?id=1141030).
So, again, the original comment, "four goddamn callable types [Methods, Procs, Blocks, Lambdas]," neglects the fact that #call on the last three is actually just Proc#call.
Proc.new {}.class
=> Proc
lambda {}.class
=> Proc
proc {}.class
=> Proc
def block_class(&block) block.class end
block_class {}
=> Proc
That write-up does have some great info in it, though.Edit: there's an interesting comment on wycats' post that suggests the &block creates a Proc, and that blocks themselves are neither objects nor callable, ie, they can only be used directly with yield. That makes sense.
Even in that case, the original point still stands; we're still only dealing with Methods and Procs.
Aside from the errors in this sentence (blocks, procs and lambdas are all just Proc objects, and you can pass around methods using method(:method_name)), assuming that passing around methods is supposedly common really betrays a python-centric point of view.
In Ruby, passing around methods by name is very uncommon. Running ack through 407 gems I see 116 instances of it, period. That's 116 times in some huge number of lines of ruby code that someone typed method(:some_method).
It's clear why this wouldn't be a common thing in Ruby: all of the Proc types are flexible enough that it's rarely necessary to pass around methods. I find it incredibly hard to believe that people who complain about this are actually encountering this while using Ruby as Ruby.
Proc objects created with lambda check arguments and have "diminutive return" so they behave as anonymous methods.
Also, Kernel#proc is an alias to Kernel#lambda, so the only way you get the bare Proc behavior is by calling Proc.new directly.
It's important to note, however, that unless the buzz message was shared with only specific contacts, anyone can comment on it. Sure, it's likely that a commenter is a contact, but it is entirely possible that they aren't a contact and came to the buzz via some other means.
"It's far from being obvious when you are using Buzz for the first time that your comments will be seen not just by the Buzz author"
It's pretty much universal for comments to have the same visibility as the item to which they are attached.
I could see how someone who isn't at all internet savvy might not realize this, but it's hard to say what they expect. For instance, Facebook, filled with the non-internet savvy, is even more liberal with comments, adding to your feed comments made by friends on things posted by non-friends.
"it's not clear at all who is seeing what."
Definitely. It's easy to see why people believe their contacts are being shared when they aren't and it's no surprise that others have accidentally shared their contacts when setting up their buzz profiles.
Not on your profile.
"Didn't Google make the public profile for me"
It didn't. If you never set up a google profile or a buzz profile, Buzz displays a placeholder profile to your contacts with the sentence "This person does not have a public profile." where the name usually is. If you had a Google Profile, your contacts are shown a placeholder profile with your name and a link to your Google profile.
Certainly in the latter case and maybe the former, your following/follower lists are displayed to you on your placeholder buzz profile, but these are not displayed to anyone else looking at the profile.
If that person took the extra step of setting up their buzz profile.
And although your profile might show your followers/following to you, the profile doesn't show the same information to other users. See my comment here:
http://news.ycombinator.com/item?id=1127647
It is indeed confusing and the way it's designed gives the impression that it exposed gmail contacts, but ThinkWriteMute is absolutely right and it's disturbing that he's being downvoted.
"Couple that with auto following everyones gmail contacts and its easy to find a list of my gmail contacts without me having done anything."
The "following" terminology seems to be the source of most of the confusion, since it makes it sound like something new is being exposed when it isn't. If you haven't set up your buzz profile, the only information your followers can see is you name, picture and chat status updates and anything else that was public, which is what they could see before when they were still just "contacts."
No, it isn't. Although it indeed appears to expose your contacts, it actually doesn't. This was the case on accounts I set up the first day and, out of curiosity, I tested it again a couple days ago. See my comment here for details:
Also, I can't see the following/follower lists from another account; it just shows the name, a link to the google profile and the fact that the two accounts are following each other, but nothing about any other contacts. It does, however, appear that the profile is fully set up from within the account, showing the follower/following lists, but outside accounts can't see this info.
I also follow someone who hasn't created a Google profile or started using Buzz. She changed her status message and it showed up in the Buzz feed, but when I click on her name it goes to an empty Buzz profile view that says "This person does not have a public profile." where the name usually is.
TL/DR: I looked at accounts both with and without an existing Google Profile and although a status message change is posted to the Buzz feed, in neither case did it fully sign the account up for Buzz nor did it expose contacts, despite the fact that it looks like it does. YMMV, but probably not.
One of my accounts had a google profile, and nothing was displayed automatically; it still required the exact same steps as the accounts without a google profile, including the "How do you want to appear to others?" form with the checkbox to display followers/following lists.
http://www.scansafe.com/content/employers-crack-down-social-...
"76% of companies are choosing to block social networking ... and Webmail (58%)"
Of course, if this thing caught on, presumably more companies would block gmail.
%button#Save.positive(name='Save' type='submit' tabindex='10')
%img(src='/graphics/icons/save.png')
Save Changes
That button in your example, of course, has a lot of attributes, more than most elements in a typical template. Also, if you are using it with Rails it'd be in a form block with a helper: = f.submit 'Save Changes', :class => 'positive'
which would generate an <input> that you'd then style with CSS (or Sass :-D)Note that with Haml you can also write any sort of helpers you want, so you could have something as simple as
= button
doing whatever you want it to.Where it gets really interesting, however, is when you are dealing with full templates. The document structure is instantly apparent, most superfluous noise is gone, classes and ids are given top billing and templates are very short despite retaining all of the information.