12,740 karma · joined Feb 17, 2008 (18y ago) · 2,917 submissions
comment 17y ago · link · parent
If Python (or anything else) isn't perfect, that doesn't mean there is necessarily a problem with the language, or that you shouldn't use it. For example, once I became familiar with SWIG, I was not at all afraid to use C++ for the things that needed to be fast, while continuing to use Python for a large portion of what I had to maintain. And, I don't automatically write every script in one language, I use whatever is most suitable to the task.
comment 17y ago · link · parent
To give an example of what OmniWeb can do:
- Define any shortcut pattern with any name.
- Map that to a URL, where the string can be substituted in at any point. This also means you can set key-value pairs for queries, etc.
- Specify GET or POST.
So a useful addition to your site might be user profiles that allow people to define anything they could ever want.
comment 17y ago · link · parent
But I think the only drug is perfectionism, and it applies to anything reasonably complicated. The cure is brutal honesty. How much will you really be able to reuse in a sophisticated design? (Not much.) How likely is it to change? (Very likely.) Will an unanticipated new feature completely destroy your formerly-perfect object design? (Often, yes.)
One of the original thoughts behind inheritance was to manage complexity. But since code is read much more than it is written, I think of my eyes and not my fingers. Sure, I may have saved some time writing the code, and even had fun coming up with its unique design. But the next 40 or 50 times I have to go back and understand the code, and read 4 or 5 other files just to figure out what a function does, I see the error of my ways.
That doesn't mean I avoid inheritance, but I strictly limit it to things where it has immediate and obvious value. I may have one parent class, and the class isn't very big. It's also not something I'm likely to share in a public header; I'll inherit from it myself, and not ask others to do the same, which avoids a whole category of hurt. :)
comment 17y ago · link · parent
I also like canonical/primitive APIs. Functions with side effects drive me crazy, especially if they're poorly documented and there is no other apparent way to achieve a goal.
A lesser consideration is how pretty the API is. While functionality comes first, I grow quickly frustrated with APIs that can't even be consistent within themselves (e.g. function doThis() and do_that() in the SAME CLASS), or APIs that are not really taking advantage of the conventions and capabilities of the language they're in (e.g. a C++ API that decides to write its own string class that does not add anything over the standard class).
comment 17y ago · link · parent
"Release" frequently; if you don't have any customers, just pretend that you need to package something up. For instance, aim for a new build every day, and maintain release notes describing your changes. If you haven't been doing anything worthy of a new build each day, you quickly realize that you're losing focus and not moving the project forward.
comment 17y ago · link · parent
comment 17y ago · link · parent
I figure there are two ways to use these sites. One, you could connect with everyone you've ever known, regardless of how well you know them (and end up with 300 "friends", most of whom are really just "acquaintances"). Or two, judiciously invite the people you actually care about and/or are likely to see anytime soon. I choose the latter, whether it's Facebook or other sites like LinkedIn.
With a short list, it's easier to find the people you're likely to want to talk to in the near future. Plus, you then receive only limited spam about the mundane details of other people's lives. :)
comment 17y ago · link · parent
Sounds like the department of pre-crime. :)
It's fascinating: enough Google employees want to leave, that Google is studying their behavior. Clearly, even amazing perks, challenging work and brilliant colleagues will wear thin on a person? Or maybe it's not that there's anything wrong with Google per se, but that people are regularly trying to branch out and start their own companies, etc. and no amount of pampering will change those ambitions.
comment 17y ago · link · parent
While they wouldn't have their desired features "today", they'd have been working with a much larger audience. This would have led to more contributions in terms of PEP comments and feasibility testing, and ultimately more programmers benefiting from the new features.
comment 17y ago · link · parent
comment 17y ago · link · parent
I think of Wolfram Alpha as "smarts in, smarts out"; if you want intelligent results from a smart engine, you need an intelligent query, or you see the digital equivalent of a blank stare. Requiring some thought when posing a query isn't necessarily a bad thing.
Wolfram Alpha also has a nice feedback form on the front page. Not that I'm holding my breath, but what the author of the article should do is put all his rants into that feedback form, wait a month, and then comment on any changes made. That type of followup article would be more interesting to me.
comment 17y ago · link · parent
For something as complex as a book, reStructuredText is best; though I often fall back on the simple Textile format for really short documents that still need to be converted to HTML.
comment 17y ago · link · parent
- DragThing; you will never miss Apple's Dock, this is an absolutely essential desktop enhancement, e.g. to create multiple tabbed docks anywhere you want, with themes.
- OmniWeb (now free); I've tried many web browsers, and I like this best. Safari engine.
- MacTelnet (tabbed terminal). It now works for local programs and not just servers, so I use it instead of Terminal.
- SnapzPro X (or alternatives), useful for doing more intelligent screenshots or video captures.
- DesktopCalendar (by Takashi Hamada), a really nice use of space and very configurable. Also has a menu option.
- Growl, for pretty and unobtrusive notification windows. This is actually really well supported by 3rd party applications.
- SCPlugin, if you're a Subversion user; nice Finder integration.
comment 17y ago · link · parent
Usually the barrier to doing a parallel rewrite is staffing. If the company barely has enough people now, sending people off on something else needs (in the management's view) a very good reason. So you have to show how time will be saved, at least medium-term.
Another potential barrier is testing. If your product has a lousy set of regression tests and unit tests, forget it; until more tests are written, a rewrite is far too risky. Basically, the test suite needs to prove what all the important current behaviors are, so that you can be very confident in replacing code.
Is there something wrong with the code base? Is it hard to maintain? You'll probably have more success proposing changes if this is true. For example, you can pull up the last 20 bugs/enhancements, and explain to your management exactly where all the time was spent on them; then show how your revised design would have made those changes more efficient. If you have access to the time it takes customers to do things, you could have similar analysis; show how awkward or clunky something currently is for them, and how much better it would be if it worked differently.
comment 17y ago · link · parent
comment 17y ago · link · parent
You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
That suggests you need to GPL your application to use art from a GPL'd game.comment 17y ago · link · parent
One, the default implementation of the error handler is a crash at runtime to "detect" the buffer size difference. Or, a custom handler can be used.
Worst case, this handler is turned off, truncation is silent, and overflow occurs the next time the buffer is used. Best case, the handler detects a problem, requiring new code to find minimum buffer size (that should have been there anyway); at which point, it's perfectly safe to use...the standard memcpy()!!!
Two, Microsoft's compiler warning spam recommends replacing standard calls with its own. The warnings often make legitimate uses of memcpy() look wrong in some way.
I sure hope I'm missing something, but this seems like a big waste of time.
comment 17y ago · link · parent
Unix has get-results-and-get-out behavior. There's no "fluff"; some commands won't even display an error string, they just return error status. (This is pretty ideal, to me.)
If I must use a GUI, I find Apple's Spotlight closer to what I want, than a browser's location bar. For example: while I could ask Google to solve 2+2, I still have a web page wrapped around the result (that probably replaces whatever web page I was using); with Spotlight, the answer to 2+2 appears before I even hit Return, and when I hit Esc the entire query box disappears and I can resume what I was doing before. That is how a "super location bar" needs to work.
comment 17y ago · link · parent
comment 17y ago · link · parent
I think English is most useful when used to express test cases. Such statements usually convey about the same information as pseudocode, but are a lot easier to follow.
Take one of the pseudocode examples from the article:
set the default status to "fail"
look up the message based on the error code
if the error code is valid
if doing interactive processing, display the error message interactively and declare success
if doing command line processing, log the error message to the command line and declare success
if the error code isn't valid, notify the user that an internal error has been detected
return status information
All this really means is... for interactive and command line uses:
produce the message for an error code, or raise an internal error
You can still infer a program from this, it's just that a lot of details are implied.comment 17y ago · link · parent
One, "_SRJC" could mean anything, and they can't claim a right to every imaginable use of the acronym.
Two, they seem to think that E-mail is a heck of a lot more secure than it is. They're worried that a sender's address could "look like" something from their University. The reality, apparently not known to them, is that an entire E-mail can be forged, up to the point of appearing to originate from one of their own "legitimate" addresses. So if true E-mail security is their problem, they should first consider not doing important things through E-mail, before filing lawsuits.
comment 17y ago · link · parent
When I did have serious Mac problems, it always ended up being the hardware; something easily replaced, like bad RAM. It says something when you learn to suspect hardware problems because the OS itself is so solid.
comment 17y ago · link · parent
In some respects, having long-lived software with lots of users makes speed the least of my concerns, because they're always asking for new features, and those are relatively easy to add to scripts.
And the relationship between software speed and productivity isn't linear, because people multitask. If a program takes 10 seconds to run, I might sit and wait for it to complete, without doing anything else. Whereas, if the program takes a minute, I may decide to switch to another quick task, and then return to see results. In this case, both tasks needed to be done, one took longer but it ate up the "slow" runtime of the program, and was only parallelized because of that long runtime.
comment 17y ago · link · parent
I am well aware that there are good reasons to optimize things in languages like C (and I use them), but consider...
If I take several extra weeks to code, debug and test a C solution, and I could have had a script done much sooner, then my results were not faster overall. Why? Well, the script could be slow as dirt, but if it has a few extra weeks to churn through data and produce results, it may be done before the C program is even ready.
It's also important to remember that not all bugs are in software. Suppose I was looking at an entire problem in the wrong way, and this wasn't apparent until I started seeing results? In that case, my earlier start with a "slow" program meant that this mistake was found much sooner, so the script can be thrown out and redone, producing correct results with not much of a time penalty.
comment 17y ago · link · parent
Somewhere along the line, people forgot that computers are supposed to be tools, and decided it was okay to put up with constant interruptions to their work. I swear, using Windows is like raising a small, needy child.