12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions
comment 14y ago · link · parent
There's probably lots of CSS that has old -webkit/-moz/whatever tags because it "still works" and there hasn't been time to maintain it properly. A tool like this would make the code smaller, clearer and more future-proof without affecting any of your favorite users. It would just so happen to help fringe-browser users as well. I'd say that's a win-win, especially if you value attracting new customers and making money.
Right now, if I reach a web site that browser-sniffs or doesn't "support" me I go away and never come back. Generally not a useful way to treat visitors.
comment 14y ago · link · parent
Opera Mini works very well on mobile phones for example.
You're also on a web site with a lot of people working at startups: pretty much the epitome of not accepting the status quo and creating new things. If we all said "screw it" when big projects took over, the world would be a lot less interesting.
comment 14y ago · link · parent
For example, a tool could scan CSS files and compare usage of vendor prefixes against the current state of cross-browser support for "better" alternatives. Perhaps you see warnings like "property 'webkit-xyz' can be replaced by 'xyz', which has been supported by the top 4 browsers since 2006".
comment 14y ago · link · parent
An approach that is usually better is to rename the entire function, creating two functions. To extend the article's example, this would mean having both "widget->repaintImmediately()" and "widget->repaintLater()" (or whatever). This can even be implemented by having both of the public routines call a single internal routine that is still parameterized.
When the function names are different, everything you need is in one place; you don't have to waste time figuring out where the corresponding list of allowed values is defined. Unique functions may also require less error-handling if only some values are allowed; e.g. if the type would include "A, B, C" and a parameterized function wouldn't accept "C", it's easier to define only funcA() and funcB() and just not have funcC(). Conversely, if you some day realize you actually have more cases than you originally thought, adding a funcD() is trivial and that decision doesn't affect anything else.
An example of constant-parameter bugs: it's common to see someone define several unrelated values that are effectively all "const int" or strings, which allows values to be misused without warning (especially if they're named similarly). In Cocoa, NSFontAttributeName and NSFontNameAttribute have the same type but different uses; while this isn't a true/false case it shows how easy it is for something to be wrong and how important a unique type can be for debugging.
comment 14y ago · link · parent
In the real world you might be able to find witnesses and involve the police to deal with a theft. On the Internet there's nobody to report a "do not track" violation to and no reliable way to punish anyone who simply ignores what you say. The 3rd party doing the tracking can be anyone in the world.
comment 14y ago · link · parent
Consider download complexity. How many "versions" of your app would you need to have to give each user the optimal installation size? How often do you want to deal with people downloading the wrong one and having a bad experience? What about 3rd party distribution...any number of other sites may choose to offer download links and you have basically no control if they screw something up.
Another is problematic upgrades. Suppose you optimize a download for a user's current machine. Then they buy a new machine. They won't really try to understand why your app is now looking strange or misbehaving; they'll just think your app sucks.
On the Mac side I've chosen to go the oversized route. There's no doubt that my app bundle is 2-3 times as big as it ought to be (and unfortunately two thirds of the binary bloat goes towards supporting systems that few users are likely to care about at this point). But then downloads are simple: just "click here for the new version" and whatever your system you see something that works.
comment 14y ago · link · parent
The proposal to give selectors namespace awareness seems to be overlooking a pretty fundamental truth about selectors: they don't have context, they don't even belong to a particular class. There is therefore no ambiguity to be resolved; the selector "performAction:withArg:" is already isolated. Now, if you were to call something like "respondsToSelector:@selector(performAction:withArg:)" then you need a particular class or instance but again this should be clear from the context: in a new namespace-supporting Objective-C the object that you call this on should be clear and the selector expression itself should need no namespace at all.
This namespace style may also be clinging a bit too much to the C++ approach. In particular the tendency to double-@end everything due to the namespace suggests a cleaner syntax is needed. Oddly this isn't consistent as sometimes "MyNS.MyClass" is used and in other cases @namespace/@end is used.
comment 14y ago · link · parent
An example of RST-generated HTML is Docutils' own documentation: http://docutils.sourceforge.net/README.html
Original source markup (also a suitable plain-text version): http://docutils.sourceforge.net/README.txt
Unfortunately I don't see a good example of PDF output online, but it basically generates LaTeX and PDF from that.
The nice thing is having the flexibility to produce all these formats with one edit.
comment 14y ago · link · parent
A common example I see is something like a one-line list of files to build in a makefile. It is certainly possible to put every file on its own line and backslash-escape each line ending, and doing so produces a very readable "diff": if someone adds a file you see "+ xyz.c" (or whatever) and that's it instead of a mangled mess of file lists repeated with one word that's different.
comment 14y ago · link · parent
A "diff" is also incredibly useful prior to a commit to make sure that you changed only what you thought you did. Programmers should go to great lengths to adopt a style that is "diff compatible" so they aren't likely to miss anything important.
comment 14y ago · link · parent
A few years ago I rewrote my résumé in reStructuredText where you can use rst2html.py, rst2latex.py, etc. to generate various formats from one text source. And the source file is so free of obvious markup that it serves as a "plain text" version.
comment 14y ago · link · parent
http://www.microsoft.com/mac/outlook
If only that group could share more of its expertise with the rest of the company. :)
comment 14y ago · link · parent
I generally like to see things kept simple. But formatting is a common need and they've actually made things less simple by providing both fmt.Println() and println(). It means the same program will inevitably contain both, depending on who did the editing. There are times when a feature is so basic that it really should have exactly one way to do it, and I think printing is in that category.
comment 14y ago · link · parent
When I first bought the Android phone (HTC Hero) I thought it was amazing. It really had some neat features, and there were things the iPhone couldn't do (like totally change the home screen manager).
But it was never updated. Not once. It took just months to start seeing apps in the Android Market that only worked with newer OS versions.
I'd also discovered battery issues; it was abundantly clear that the carrier, Sprint, had the phone pre-loaded with apps (in the ROM so they could not be removed). Not only did ALL of these stupid things auto-start when the phone was powered on, but they were apparently set up to start themselves every hour or so because even with an app-killer I'd still see this junk back in memory sooner or later.
Say what you will about Apple, but they keep the crap off your phone. Carriers can't put a damn thing on there that you don't want. I've also already received 2 OS updates from Apple, which is 2 more updates than I ever received with Android.
I also realized that even though Apple doesn't let you customize as much, their UI is also not broken the way Android's is. For instance, some of the default HTC Sense UI did really stupid things in my opinion. Sure I was able to "fix" problems by downloading replacement keyboards, etc. but with iOS I don't even feel the need for that because Apple's UI is by default more sensible.
comment 14y ago · link · parent
How could this not have seemed incredibly clunky after using it for just a little while? It's the same frustration one feels when simple print-outs fail in C++ because you forgot to "#include <iostream>". Sometimes you just want to print stuff no matter what file you're in. Languages should make it almost impossible to fail at extremely common tasks. It's these little things that make Python and Perl enjoyable to program in, and these little things that every new language should begin with!
comment 14y ago · link · parent
I've had embarrassing MS-DOS moments in the past where I was typing out something like a recursive-delete on a path. If you accidentally hit RETURN instead of a backslash then you can do things like blow away entire parent directories unintentionally. This didn't exactly improve my already-critical view of PCs. :)
comment 14y ago · link · parent
Companies may have elaborate infrastructures and sets of dependencies, and it may take a lot of time to come up with something that even builds correctly in isolation.
Open-source basically has to be planned early on: use freely-available tools, use common platforms, etc. and then open-sourcing it later may not be too difficult.
1881.
SOPA Blackout UI Option for NFS-Hosted Sites(blog.nearlyfreespeech.net ↗)
1 points · by makecheck · 14y ago · 1 comment
comment 14y ago · link · parent
I avoid all goto, continue, early-return and similar statements though successive nesting. This solves problems:
- Code quickly shows when it has become too complex and needs to be split up.
- Code is naturally arranged in a way that makes it easier to split into functions.
- Code is naturally arranged to clean up a resource only if it has been allocated (no extra labels) and as soon as it is no longer needed.
comment 14y ago · link · parent
What part of the verb "Like" would make the customer think "oh please make me part of a conversation"? I would go as far as to say it is obvious they wouldn't expect that outcome.
If you put any roadblock at all between your customer and the acquisition of your product, you will lose some customers. And you will never know how many because they will silently think "to hell with that" and never return.
If you subsequently spam customers with updates, they will start regretting the purchase and make a mental note to never buy from you again. Once I bought a pair of sunglasses and began receiving spams once a week from the store (seriously, how often could I possibly be interested in sunglasses, especially since I just bought a pair?).
It may be a hard pill to swallow, but there is no reason for a customer to give a damn about a company on a regular basis unless it's a product that can be consumed really often (like maybe going to a restaurant every few weeks). If it's something that people may buy only every few years, they don't care about you and they don't want to hear from you.
Facebook pages and other sites already have ways to request updates, e.g. the "Get Updates via RSS" link. Unlike abuse of "Like", the updates link is clearly labeled and it does tell the user what will happen when it's clicked. It is also correctly off to the side where it's available for those who need it and not in the way for those who don't.
comment 14y ago · link · parent
defaults write com.apple.dock showhidden -bool true
killall Dock
When an application has been hidden its Dock icon is then given a semi-transparent, faded appearance.Also, although Mac OS X Lion changed the Dock so that by default there is no difference between running and not running, using System Preferences (Dock pane) the "Show indicator lights for open applications" setting can be turned back on.
comment 14y ago · link · parent
comment 14y ago · link · parent
If you actually care how valuable your brand is, you won't give anyone a damned thing for "liking" you and you won't make it a condition of doing anything else. What good is a disingenuous opinion about your brand? You should only want a "like" if someone gave it to you without being asked.
comment 14y ago · link · parent
Do be sure to search existing bugs before adding more however. A unique bug report is helpful but a duplicate can be a nuisance. Sometimes the duplicate will be a closed bug too, e.g, "we found this and decided not to fix it for the following reason:".
comment 14y ago · link · parent
- It's sensational to focus on an absolute value of 70 cents while ignoring the buying power of 70 cents in China. This still isn't a very good wage, but the cost of living differences are huge; 70 cents should probably be likened to the minimum wage in the U.S. (i.e. think "equivalent to a few dollars an hour" not "pennies" as the article might have you believe). You can Google several cost-of-living comparisons between China and the U.S.
- A huge number of tech companies rely on Foxconn; this is not unique to iPhones nor is it new. So mention of the iPhone is, again, sensational; this manufacturing issue is pervasive.