BRAIN NOT WORKING GUD.
This page features every post I write, and is dedicated to Andrew Ho.
BRAIN NOT WORKING GUD.
I acquired a scanner at work, for $25, minus the $1 I still owe a co-worker. Now, I too may dream of being about .01% as awesome as XKCD!
I have this season’s flu, or something. It is rare for me and rather nasty. Hopefully, after two days sleeping in and getting a little work done from home, tomorrow I can make it in to the office.
Link: https://dannyman.toldme.com/2007/12/04/tip-manage-infinite-passwords/
Problem: You have logins to a bajillion things and that is too many unique passwords to remember. Maybe you remember a half dozen passwords, if you’re lucky, but you would prefer to have a unique password for each account so the hackers can’t get you.
One approach is to always generate a new password when you get access to a new account, and store that somewhere safe. Sticky notes on your monitor? A GPG-encrypted file with a regularly-changing hash? Either way, you have to account for what happens if someone else gets access to your password list, or you yourself can not access this password list. I am not fond of this approach.
My Tip: I suggest instead of storing passwords, you come up with a couple of ways to “hash” unique passwords depending, on say, a web site’s name.
For example, if you were really lame, and you used the password “apple” for everything, you’d make things better if instead, say, you replaced the the ‘pp’ part with the first three letters of your web site’s name.
For example:
Yahoo: “apple” becomes “ayahle”
Google: “apple” becomes “agoole”
Amazon: “apple” becomes “aamale”
MSN: “apple” becomes “amsnle”
Apple: “apple” becomes “aapple”
Now, you can get a lot more creative than that, like using a non-dictionary word, mixing up letter cases and punctuation, etc.
Try a more advanced hash:
– Start with a pass-phrase “apples are delicious, I eat one every day”
– Take the last letter from each word: “sesiteyy”
– Capitalize the last half of the passphrase: “sesiTEYY”
– Stick the first three letters of the web site’s name in the middle: “sesi___TEYY”
– If the third letter you insert is a vowel, follow it with a “!” otherwise, add an “@”
– Change the first letter that you can from the substitution: a becomes a 4, e becomes a 3, i becomes a 1, and o becomes a zero
Now you get:
Yahoo: sesiy4h@TEYY
Google: sesig0o!TEYY
Amazon: sesi4ma!TEYY
MSN: sesimsn@TEYY
Apple: sesi4pp@TEYY
It is best if you have a few different schemes you can use: some web sites reject strong passwords, so having a really bad password handy is good, and some places you’ll want extra secure. For example, use a different “hash” for your bank passwords, just in case your “every day” hash is compromised.
My obviously-gay cubicle-neighbor spent the day listening to show tunes at low volume. I hate show tunes but I’m just back from vacation and I forgot to bring my own over-the-ear headphones so I figured I’d keep it to myself. At one point we overheard some other coworkers debating whether the one guy’s Audi TT convertible was “girly”. My cubicle neighbor confided in me that “in the gay community” this car is known as the “power bottom” car. I felt that this would be pretty much the final word in such a debate, but he wasn’t sure that he wanted to make that contribution to the discussion, which is why he confided in me.
I think that such information is too precious to keep to myself, and that this information is exactly what blogs are for.
I’m a pretty liberal, open-minded, adventurous guy, but I’m not entirely sure I know what a “power bottom” would be. I’m actually slightly pleased about that. And although I am fond of the idea of all-wheel drive, I have always thought the TT was is kinda ugly, like a New Beetle that had been chopped off a bit.
So, a quick briefer: the girlfriend recently bought a new car, and wanted to give her old car to her brother, who lives in New York. Instead of merely shipping it, I suggested that driving it across the continent is indeed a fine undertaking, and this is what we did for Thanksgiving week, taking a southern route through Barstow, CA to Chinle, AZ to Durango, CO, and stopping to see my relatives in Pueblo, CO, her relatives in West Des Moines, IA, Thanksgiving with my folks in Chicago, and on East to spend some time with her family in New Jersey, where we also got to explore New York City together. We flew home on Virgin America Tuesday evening.
The trip itself was not easy, but you could say that we covered considerable distance in space and in heart. The gory details are a story for another time and medium. Here I share an anecdote.
The girlfriend demonstrated her cool little Eee PC to my father, who was of course impressed with the little bugger running Linux. I told him that I myself had ordered from the OLPC “Give One Get One” program and he said he had wanted to do that himself. Unfortunately, times are a little tough for his family just now and they can’t really afford it.
When we got to New Jersey, the girlfriend’s brother wanted to reimburse us for some of our travel expenses–the girlfriend and I viewed the trip as our own vacation, but the brother had budgeted something to ship the car. I thought a moment and accepted some payment, which I then turned around and sent to OLPC to ship a computer to Dad. “A gift begets a gift begets a gift . . .”
(Today happens to be Dad’s birthday, too!)
I had worried that the Give One Get One program had concluded, but according to their web site the program has been extended through December 31st, so no difficulties ordering another for Dad. Then I got another e-mail today:
Your XO laptop is on the way.
Your donated XO laptop will soon be delivered into the hands of a child in Afghanistan, Cambodia, Haiti, Mongolia or Rwanda. In one of our recipient children’s own words, “I want to thank you people because you had given us the laptop and I love it so much.” Your generosity will make a world of difference in these children’s lives, and in the future of their respective countries.Thanks to your early action, your XO laptop is scheduled to be delivered between December 14 and December 24. Our “first day” donors are our highest priority and we are making every effort to deliver your XO laptop(s) as soon as possible. We will send you an update upon shipment.
Sweet!
Sweet! This is the first new laptop I have ever ordered for myself! I’ve been following the HDL-cum-OLPC project for a while now, and the eBook functionality has always sounded sweet to me. I’m eager to check this gear out:
Give One Get One
Between November 12 and November 26, OLPC is offering a Give One Get One program in North America. This is the first time the revolutionary XO laptop has been made available to the general public. For a donation of $399, one XO laptop will be sent to empower a child in a developing nation and one will be sent to the child in your life in recognition of your contribution. $200 of your donation is tax-deductible (your $399 donation minus the fair market value of the XO laptop you will be receiving).
For all U.S. donors who participate in the Give One Get One program, T-Mobile is offering one year of complimentary HotSpot access.
I’ll probably post something once I receive and get to play with it a bit, but I figure that’s a month away . . .
The Girlfriend is set to receive her Eee PC today.
Link: https://dannyman.toldme.com/2007/11/02/use-the-source-luke/
I have been following the “One Laptop per Child” project for a while now, formerly known as the “Hundred Dollar Laptop” project, though right now the price comes in closer to $200 . . . in November I am looking forward to getting my hands on one with the “Give One Get One” program. I enjoy following developments on the “OLPC News” blog. Today I learned that Microsoft is scrambling resources to shoehorn its normally-bloated Windows Operating System onto this lightweight gem. That makes me smile because it is usually the case that computers like the laptop I am typing on right now are “Designed for Windows(R) XP” or the like, and it is the Open Source community that must scramble to reverse-engineer and build drivers for the new hardware.
Anyway, I was just looking at a post that suggests that since the OLPC is rather ambitious, technologically and culturally, they have no qualms about redesigning the keyboard: no more CAPS LOCK but instead a mode to shift between Latin alphabet and the local alphabet. Also, perhaps, a “View Source” key: which could perhaps allow kids to poke under the Python hood and check out the code that is running underneath. My goodness!
There are some good comments there! I just added my own:
I’d like to chime in with a “me too” . . . sure most people don’t find much use for the hood latch on a car, but we’re glad it is there: it allows us to get in if we need to. For the smaller number of people who DO want to play under the hood, the hood release is invaluable. We all learn differently and and those who are going to get into computers ought to be given the access and encouragement to learn.
I played with computers for a decade before I learned to program. Maybe a “view source” key might have gotten me going faster.
As for code complexity: you can still view the source on this very page and understand much of it. I understand that Python is constrained to 80 columns and is highly highly readable.
As for breaking things: EXACTLY!! The kids ought to have access to break the code on their computers. Rather than turning them in to worthless bricks: worst case you reinstall the OS! Talk about a LEARNING experience!! Anyway, programmers use revision control: hopefully an XO could provide some rollback mechanism. :)
It should also be good for long-term security … people will learn that computers execute code, and code can have flaws an exploits. If the kids can monkey with their own code, you KNOW they’re going to have some early transformative learning experience NOT to paste in “cool” code mods from the Class Hacker. ;)
Cheers,
-danny
I just lost my nut at:
“Fidel Castro hats were made to be worn by Fidel Castro. Not hipster losers trying to look ironic.”
This page is chock full of hilariously good advice. Especially the lipstick. And yes, I don’t know dick, either–I wear black socks with shorts–but I can tell you Crocs are Wrong.
No further comment.
Awesome video summary of what’s going on in Myanmar, linked from Ko Htike:
“The military have issued their orders, now the public are responding. They’re getting the bricks ready. It seems as they intend to fight!”
Tony Birtley
Al Jazeera
The electric buzz of anarchy as people take over the streets is always exciting. I wonder how the government gets police to shoot at Monks. Ko Htike further reports that in some cases, military have been arrested for not carrying out orders. That is a hopeful sign. (more…)
Link: https://dannyman.toldme.com/2007/10/04/a-small-mysql-miracle/
After yesterday’s post, I figured I would have to re-synchronize the slave database from the master, but probably build a more capable machine before doing that. I figured at that point, I might as well try fiddling with MySQL config variables, just to see if a miracle might happen.
At first I twiddled several variables, and noticed only that there was less disk access on the system. This is good, but disk throughput had not proven to be the issue, and replication lag kept climbing. The scientist in me put all those variables back, leaving, for the sake of argument, only one changed.
This morning as I logged in, colleagues asked me what black magic I had done. Check out these beautiful graphs:
Rather dramatic. The change?
#set-variable = innodb_flush_log_at_trx_commit=1
set-variable = innodb_flush_log_at_trx_commit=0
The weird thing is that things did not begin to improve until about twelve hours after I made the change, so . . . ?
The schtick with innodb_flush_log_at_trx_commit
:
The default value of this variable is 1, which is the value that is required for ACID compliance. You can achieve better performance by setting the value different from 1, but then you can lose at most one second worth of transactions in a crash. If you set the value to 0, then any mysqld process crash can erase the last second of transactions. If you set the value to 2, then only an operating system crash or a power outage can erase the last second of transactions. However, InnoDB’s crash recovery is not affected and thus crash recovery does work regardless of the value. Note that many operating systems and some disk hardware fool the flush-to-disk operation. They may tell mysqld that the flush has taken place, even though it has not. Then the durability of transactions is not guaranteed even with the setting 1, and in the worst case a power outage can even corrupt the InnoDB database. Using a battery-backed disk cache in the SCSI disk controller or in the disk itself speeds up file flushes, and makes the operation safer.
The Conventional Wisdom from another colleague: You want to set innodb_flush_log_at_trx_commit=1
for a master database, but for a slave–as previously noted–is at a disadvantage for committing writes, it can be entirely worthwhile to set innodb_flush_log_at_trx_commit=0
because at the worst, the slave could become out of sync after a hard system restart. My take-away: go ahead and set this to 0 if your slave is already experiencing excessive replication lag: you’ve got nothing to lose anyway.
(Of course, syslog says the RAID controller entered a happier state at around the same time I set this variable, so take this as an anecdote.)
Link: https://dannyman.toldme.com/2007/10/03/seconds-behind-master-never-catches-up/
I’ve got a MySQL slave server, and Seconds_Behind_Master
keeps climbing. I repaired some disk issues on the server, but the replication lag keeps increasing and increasing. A colleague explained that several times now he has seen a slave get so far behind that it is completely incapable of catching up, at which point the only solution is to reload the data from the master and re-start sync from there. This isn’t so bad if you have access to the innobackup
tool.
The server is only lightly loaded. I like to think I could hit some turbo button and tell the slave to pull out all the stops and just churn through the replication log and catch up. So far, I have some advice:
1) Eric Bergen explains that the reason it keeps falling further behind is because the slave server can only process queries sequentially, whereas the master database processes queries in parallel.
2) MySQL suggest that you can improve performance by using MyISAM tables on the slave, which doesn’t need transactional capability. But I don’t think that will serve you well if the slave is intended as a failover service.
Xaprb explains this well, then goes on to say:
Your options are fairly limited. You can monitor how far behind the slave is . . . and assign less work to it when it starts to lag the master a lot . . . You can make the slave’s hardware more powerful . . . If you have the coding kung-fu, you might also try to “pipeline the relay log.”
That pipeline approach sounds like the YouTube way.
Update: to my surprise, things got better!