Showing entries 1121 to 1130 of 1145
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: General (reset)
A new Machine

In order to better document MySQL on Mac, I have recently acquired a Mac Mini. This brings my collection of desktop machines to three:

The black machine is a Windows box, the white machine runs Linux, and now a Mac Mini.

The new addition closer up:

This is the first Mac I have had regular use of, so I am sure I have some learning to do. For now I just need to get MySQL and the GUI tools installed, then find where they hide the command-line.

Follow up on hotspots

Admitedly I am not yet MySQL certified. So my last post was more based on knowledge of DBMS in general. A few people have noted that the issues described in my previous post might not apply to the InnoDB table handler. So I will need to research this a bit. Actually I am planning to become MySQL certified and so its quite handy that the new certification guide is to be released on august 19th.

Aside from that I wanted to mention a few other tid bits that Arjen reminded my about. Number one there is the UUID() function in mysql that seems like another great way to generate unique non sequential identifiers.

[Read more]
Hotspots and how to avoid them

The other day a discussion in #mysql on freenode developed concering possible issues arising from using auto increment on primary key fields due to the danger of hotspots. Since I am currently preparing a new talk first to be held at php|works on SQL performance tuning I thought that the topic would make for a perfect warming up post on the general topic.

Defining hotspots

I guess before diving into an actual discussion of the topic we first need to define what a hotspot in RDBMS lingo is. "SQL Performance Tuning" defines it as follows:
"A page in either the index or data file that every job wants to access at the same time".

Now this sentence tells us that hotspots are concerned with concurrency issues. So this indicates to us that the entire topic is probably not much of an issue when we have few users accessing the database at the same time. As a matter of …

[Read more]
19 Deadly Sins of Software Security

This book arrived at my office yesterday, and I am quite impressed. I’ve bought a number of software security titles in the past, and usually find them quite difficult reading. While I’ve only skimmed the book so far, it is laid out in a way that is incredibly useful for a busy developer, and is quite respectful of how precious your time is.

For example, in the introduction, it says “Everyone should read Sins 6, 12, and 13 … if you are creating an application to query database engines, such as Oracle, MySQL, DB2, or SQL Server, you should read Sin 4…”

It gets even better when you discover how each “Security Sin” is discussed. Each chapter is broken up into small sections:

  • Overview
  • The Sin Explained
  • Sinful Programming Languages (languages affected)
  • Sample Code …
[Read more]
Why ?returns -1 on error? is bad

(a general note on what’s good practice)

In C, 0 is false and !0 is true.

In the dim past there was an elsewhere where 0 was true and !0 was false. Why? Because there can be more than one error state and this is usually more interesting than how many ways success could have been acheived.

Well, that sucks too - there’s information on success that could be useful (e.g. we succeeded, but only n bytes worth instead of the m you asked for).

So, the way of <0 on failure and else success came about for packing the maximum amount of information into the int that we commonly return from functions (and usually fits nicely in a register and it all leads to hugs, puppies and a warm feeling inside).

So what do most people do on error? Return -1.

Hrrmm… this casually (if not totally) defeats the point. In any function that does any real work, there’s going to be more than one place where failure …

[Read more]
optimizations and assumptions

It seems that one of the frustrating things about optimization is how wrong your assumptions about the platform/environment running your code can eventually become.

At one point, programmers / compilers optimized carefully to account for 12,500 RPM rotating drum memory. Algorithms have been optimized for sequential access mass storage (tape), as well as for random access mass storage (disk). ACM Queue published an interview with Jim Gray(PDF) a couple of years ago which contains a wonderful quote illustrating how the current generation of programmers need to adjust their assumptions about data access:

So programmers have to start
thinking of the disk as a sequential device rather than a random access device.

Dr. Gray has published …

[Read more]
distributed version control

There is still a *lot* of activity around version control these days. And there should be! These tools deserve just as much attention as web browsers and email clients - those of us writing code, web sites, and documentation certainly use version control all day long.

Arjen put out a plug for Monotone today, and the support for enforcing QA procedures is definitely interesting. Personally, I think support for cherry-picking changes during a merge is a much more important feature, which it seems like Monotone doesn’t have. Speaking as someone who has worn both manager and developer hats, support for cherry-picking which changes to merge is a feature that will benefit the people actually writing code every day, while …

[Read more]
QuickSearch shortcut for bugs.mysql.com

So, someone walks into your office and asks “What is the deal with MySQL and Toast”? Being a responsible and caring human being, you know that you should search bugs.mysql.com to find out if there are any bugs related to Toast that are open now or fixed in the past. Or perhaps someone just sends you an instant message “Need your opinion on bug#2″.

While the search page for bugs.mysql.com is fine, opening up a search page and then then finding the search box and then clicking and wheezing all around is just too slow. Firefox makes it really easy to streamline these kind of searches with what it calls “Quick Search” bookmarks. Firefox comes with quick searches for stock quotes, google, wikipedia, dictionary.com, and more. Yes, other browsers support this kind of thing too, but Firefox works on my Mac, Windows, and Linux boxes, so that’s what I use. You can make your own QuickSearch bookmarks for almost any web search page, with a …

[Read more]
Lamenting a Loss of Language

I went to the annual local airshow today, got to see some nice planes, got a great sunburn, and got another reminder that I am slowly losing my second language. From 1996 to 1998 I lived in southern Japan and became a pretty good speaker of Japanese. Not pretty good in the sense that a guy who watches too much Anime considers himself pretty good at Japanese, but pretty good in the sense that I spoke Japanese every day, did spoken translations at meetings, and on more than one occasion would get a good ways into a telephone conversation before the person on the other end of the phone would realize I was not my Japanese roommate. I was almost illiterate when it came to the written word, but at spoken language I was pretty darn good, all I needed was more and more words in my vocabulary (Japanese grammar is a breeze once you know the rules, and there are no exceptions to the rules).

So, I was standing in line to take a look through one …

[Read more]
noise cancelling headphones a no-no

Well, this review over at ZDnet seems to say that the Bose Quiet Comfort 2 Acoustic Noice Cancelling headphones have leather. The suck. Well, that strikes them off my list.

In case you didn’t know, I don’t do the leather thing.

There’s also a disturbing review over at Amazon from a guy who seems to know what he’s talking about (Grado make great ‘phones - mine are supurb).

So, the sound quality may not be all that great (although people rave about the …

[Read more]
Showing entries 1121 to 1130 of 1145
« 10 Newer Entries | 10 Older Entries »