Better HN
topnewbestaskshowjobs
Log inSign up

makecheck

12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions

Submissions

comment 15y ago · link · parent

MacTelnet is an alternative terminal to iTerm 2 that supports the features you like (256 colors and full screen), and has a lot of other useful things. But I also developed MacTelnet, so I'm biased. :)

comment 15y ago · link · parent

Isn't the relative simplicity of JSON the bigger factor? It is for me.

comment 15y ago · link · parent

OmniWeb on Mac, mobile OperaMini, Firefox at work.

comment 15y ago · link · parent

Yes and no. Tests that are not written well can be a burden. After code changes, a lot of time can be spent fixing test "failures" that are more a failure of the testing methodology than the app under test. So test, yes...automate, yes...but EDIT those tests and AUDIT those tests, to make sure they are all really useful.

comment 15y ago · link · parent

Part of it is the customer base; you probably buy a Mac because Windows doesn't do what you want, and so the programs have to be different enough. One way to justify using a different machine is to have apps that put in more effort to be really good.

But also, it's a matter of copying what you see. When learning to program for the first time, a developer seems to do most of his or her learning on one platform, and copy that style for the most part (both the good and the bad, in everything from the design of GUIs to programming APIs). Regardless of what you think of either company, is there any doubt that Apple is better at coming up with good examples of design, than Microsoft? I consider Windows to be mediocrity breeding mediocrity; while this isn't 100% true, it's true enough for me to hate using the average PC.

Diversity is also a good indicator of quality; the more methods a programmer is familiar with, the more likely a program is to be well-designed. As a single platform, Mac OS X is pretty diverse; it comes with lots of tools, and is influenced by many different roots (Unix philosophy; NeXT/IBM with Objective-C/Smalltalk; classic Mac OS GUI elements; etc.).

comment 15y ago · link · parent

Even the previous Skype had quirks that bugged me. A really simple one was the login screen; after entering your login ID, pressing Tab took you NOT to the password field, but to a little web link thing in between the two fields. So, the one UI element you must use every time you run the program, wasn't thought-through; it's as if they didn't expect that the next thing you'd want to type after your ID would be the password. So every time, I had to hit Tab twice.

comment 15y ago · link · parent

I personally like documentation to be brief. This is easier if you are targeting management, because they're not going to digest details anyway, so you only include the essentials.

Brevity helps maintainability. It increases the chance of correctness. It also saves time; you will never anticipate every question, so it is far better to document some basics and instead just expect to answer questions periodically.

To be able to answer questions, you should document the people involved with each part of a system. This makes it incredibly obvious if you have any holes (i.e. is there any place in the system where, if ONE guy leaves the company, you're screwed?).

OmniGraffle (on the Mac) is an outstanding tool for making various charts.

comment 15y ago · link · parent

The iPad keyboard can make "click" sounds as you type (though this can be turned off, or the device may be muted). I do find the extra sound to be helpful.

comment 15y ago · link · parent

Go to the Apple menu, "System Preferences", Keyboard pane, and browse the "Keyboard Shortcuts" tab. There will be all kinds of useful stuff in there, and you can change anything you don't like. Remember that "^" means the Control key, the hollow up-arrow means the Shift key, the switch-symbol means the Option key, and the cloverleaf is the Command key.

If you are feeling a bit adventurous, note that many Mac apps use Cocoa and their text fields tend to share the same text entry system, and people have even written extensions for it. You can tweak config files to change the behavior. The default is a bit Emacs-like, e.g. Control-A to move to beginning of line, Control-E to move to end of line. The traditional Mac OS keys also work, so e.g. Option-left-arrow or Option-right-arrow moves between words; Command-left-arrow and Command-right-arrow move to the beginning or end of the visible boundary of the line you're on; holding down the Shift key selects text as you use cursor keys, etc.

comment 15y ago · link · parent

The C library should cast the parameter down to a char when "%c" is used; the only reason it allows an int is for the "%lc" case.

comment 15y ago · link · parent

I don't think focusing on a particular case is helpful, because what they're really talking about is the entire C++ type system. This could happen in any case where types are converted: calling functions, assigning variables...whether or not any printing or typedefs or chars are involved. You could see surprising behavior anywhere, and arguably in places where it is a lot harder to debug.

The "explicit" keyword for constructors addresses part of the problem, but not all of it. The real issue is one of programming style. Personally, I feel this is a case where C++ programmers should think more like C programmers, and not be offended by having to give functions different names, or otherwise making things more distinct when the behavior is totally different anyway.

If I have to call handleChar() and handleInt() with an "if" statement, instead of relying on one of the 12 overloads of handleAnything() to perform magic, I think that is fine because it will one day save me hours of debugging. Notice that printf("%c", c) has pretty damned clear behavior, and it requires someone to say the equally-clear printf("%d", (int)c) to get a number when they want a number; this might not be C++-like, but it's the right way to think about the problem.

comment 15y ago · link · parent

I generally hate having sites "decide" this for me. This is almost certainly a personal preference.

When I use Atomic on the iPad I set it to open off-site links in new tabs. Yet on my desktop, I never do. This is a setting in various browsers.

comment 15y ago · link · parent

Honestly, why go to the effort? With 2 massive competing phone platforms that are implemented sanely, this time it is entirely up to Microsoft to fix any...inconsistencies. They are the underdog, and they don't deserve to have the whole industry bend over and twist their apps just so that a fledgling phone platform is more useful.

comment 15y ago · link · parent

Purchases are measured by value, not quantity. What is the point of stating a number in advance? They have no idea what startups will be doing next year. A single good acquisition could transform them. A careless gathering of 15 useless companies would call into question the intelligence of the management, and affect their IPO. Money can be spent on a lot of other things, too. Nothing is clear yet. A non-story until they actually acquire something next year.

comment 16y ago · link · parent

That's pretty neat.

Though I think "command-tabbing quickly" isn't a very convenient thing to do...much better to add a "sleep 2 && " in front of the command line (say), so that you can execute it immediately and have it take effect right about the time you're ready for it.

comment 16y ago · link · parent

See the "Feature Requests" link at the bottom of the page, which links to this topic:

http://news.ycombinator.com/item?id=363

comment 16y ago · link · parent

Enabling root's graphical login is terrible advice.

2178.

Ask HN: Thoughts on phone keyboards

2 points · by makecheck · 16y ago · discuss

comment 16y ago · link · parent

Don't compare snippets that solve exactly the same problem, because each language has its niche and a good language could still look awkward and annoying when applied to the wrong task. Don't pick small examples ("hello, world" is not enough), because you won't see the compelling language constructs and library calls. Start with each language's home page...surely the maintainers can show you what it's good for.

comment 16y ago · link · parent

There are many things in the world that can be used for good and bad, and supporting the existence of those things does not mean that you're in favor of the bad parts.

Some companies that sell content have decided to use a heavy-handed approach (DRM), demonstrably punishing their paying customers. They are not looking for new ways to make perhaps even more money in the Internet age; they are only trying to preserve what is arguably a dying business model. They ignore legitimate questions like, "if I can't afford this and you give it to me for half price, and I can easily share it with 10 of my friends, will that generate sales you wouldn't have otherwise seen"?

The "pirates" are a bit like a rally to restore sanity: they provide what people actually want (which is NOT "free movies"), and frankly content companies have been too stupid to realize this outcome. Not everyone cares if a download is free. What they really want is freedom from the bullshit that is digitally shoved into DVDs these days (like previews you can't skip, commercials when you've already paid for content, and other restrictions on what you can do). They want to play something they've bought on one device, and not have an error box come up when they shamefully try to play it on another device that they also own.

If you're wondering why artists don't see much money, take a look at the insultingly small percentages they get from their rich overlords.

comment 16y ago · link · parent

Perhaps the measure should be "miles per dollar of fuel or charge", which would have to be averaged and could vary by region.

comment 16y ago · link · parent

I find myself using the Spotlight box for things I wouldn't have guessed...like looking up words in the dictionary, or doing math.

comment 16y ago · link · parent

I think it's a lot like the Microsoft Office problem: for a long time it was hard to get data out, everyone you knew was using it, and significant mindshare and investment had been built on top of the original solution.

OpenOffice proved that it's possible to break free, but change may come at a glacial pace.

Competitors need a push-button way to get data out of Facebook, they need to match most features, and they need to be free. And, they either have to convince 30 of your friends to switch, or make sure that you can still interact with them perfectly if they choose to stay on Facebook.

comment 16y ago · link · parent

I don't agree with returning anywhere; I think it's important to "return" exactly once, and that includes not using "break", "continue" and "goto" to perform logical short-cuts in most cases. (I've been writing code for 20 years.)

One reason is to have result or loop variables, which help debugging. You can ask debuggers to watch the value change, or print it, and so forth. Almost always create variables; ignore premature-optimization "experts" who think they've sped stuff up because they used fewer variables.

Cleanup isn't repeated. I despise "hunting" for return statements to ensure the same 3 things always happen. Yes, maybe functions shouldn't do so much; but if you're stuck maintaining something you didn't write, you still have to be able to apply a change correctly.

Another problem with multiple returns is inconsistent types. I've seen code where one person did "return false" and another did "return 1.0" in the same function; whereas, if you're forced to type "isOK = 1.0", you'll see the problem immediately.

And a single return point keeps overly-complex logic in your face, so that you have good incentive to fix it. You're less likely to put off refactoring an ugly and oversized function if you keep having to scroll through it to figure out what a single case is doing. Less code is ultimately good for maintainability.

comment 16y ago · link · parent

I'm wondering if the copyright and year are accurate...I recall reading something like this a few years ago, complete with pictures of sample checks.

comment 16y ago · link · parent

From 2006, and sadly so; this advice should have been followed back in 2002, and been the reality by 2010. Schneier is well known, but somehow still isn't being heard by the right ears...how can we help change that?

comment 16y ago · link · parent

I agree, but I think there is a middle ground, which is to use the strengths of multiple languages in the same app. And interestingly, one of the examples you gave is an app that I wrote (MacTelnet), which doesn't just use Python; it also calls C++ and Objective-C. :)

While C was the first language used, I added the others to gain their strengths, which include maintainability and access to powerful libraries.

comment 16y ago · link · parent

And my problem with society is that people are so easily convinced.

comment 16y ago · link · parent

Or generally, only add meaningful words. A "to be honest" or "in fact" can be removed without changing the sentence. Brevity is nice.

comment 16y ago · link · parent

I know that some window managers are capable of it. Though I use Macs primarily, so I want Apple to fix it. :) Realistically though, cross-platform products like Firefox would need Windows and all Unix/Linux window managers to handle this too, in order to completely avoid home-grown code to mimic tabs.
1
727374
98