Recently I've been building a MySQL server for our users. I've put phpMyAdmin on it (the latest version has some really nice features, but takes some fiddling about with to get set up). I think it's quite nice. (Well, I would, wouldn't I?)
After setting it up, I realised that we hadn't added it to the backup system. OK, only one user testing it out for us right now, it's on a resilient virtual infrastructure, only the possibility of corrupt tables if there is a problem... better dump DBs and back 'em up.
Using mysqldump, that's quite easy. So, now to test it....
Oh, look, the MySQL documentation mentions a test database called sakilla. It makes use of lots of MySQL features. Great, I can test lots of stuff. Just import sakilla, dump it and compare the dump with the original SQL. That might be a bit tricky....
There's bound to be a perl library that'll do that....not that... or that... or that.... aha! Just what I'm looking for. I'll just check if there's another one.... not that.... or that.... almost, but no... not that... doesn't look like it.
Compare MySQL code against MSQL code ... perfect.
Hah!
This library takes two filenames. OK, two SQL files - one from mysqldump, one from the sakila tarball.
The comparison failed with an error - invalid syntax and a line number. The error message just gives the type of token the parser is expecting. Not very helpful!
I guess I'll write a quick hack that removes the MySQL token that it must be failing on. Perl can do that really easily!
HAH!
Fix one missing feature, run again... fix the next one, run again... and the Next one, run again... and the NEXT one, run again.... and it's getting further and further and slower and slower... and the quick perl hack is getting bigger and BIGGER and more complex and MORE complex... and I'm getting MORE and MORE FRUSTRATED!!!!
The quick hack is now PRACTICALLY A MYSQL PARSER!!!!
Friday, 31 May 2013
Tuesday, 14 May 2013
Coffee
The first thing I do when I arrive at work in the morning, before anything else, is get a cup of coffee! Ahh coffee!
Last friday I arrived, dropped off my coat and lunch by my desk and headed to the kitchen...must... have... coffee....
WHAT??? No coffee machine!
Now what?? I can't function without a cup of dark brown nectar!!
I may have already had a Latte at home to get me to work in the first place, but that was wearing off now.
No coffee machine!
The machine at work takes Senseo coffee pads. I have a number of packs of those.... but no coffee machine to use them in....
Aeropress! It's a marvellous invention, make coffee using a giant syringe! Rip up a coffee pad and use the grounds in my Aeropress!
I haven't used the thing since we got the machine, so I'm a bit rusty. Oops! Too much water. Well, weak coffee is better than no coffee. A quick once over with a sponge will get rid of the excess coffee. OK a few 'once overs'.
Ahh coffee.... weak coffee.... but coffee....
"Mark's broken the coffee machine."
WHAT??!!
Mark's the Boss.
THE BOSS BROKE THE MACHINE!!!!
Can you BELIEVE IT!!!
AAAAAAAAAAARRRRRRRRRRGHH!!!!!!!!!!!!!!!
Last friday I arrived, dropped off my coat and lunch by my desk and headed to the kitchen...must... have... coffee....
WHAT??? No coffee machine!
Now what?? I can't function without a cup of dark brown nectar!!
I may have already had a Latte at home to get me to work in the first place, but that was wearing off now.
No coffee machine!
The machine at work takes Senseo coffee pads. I have a number of packs of those.... but no coffee machine to use them in....
Aeropress! It's a marvellous invention, make coffee using a giant syringe! Rip up a coffee pad and use the grounds in my Aeropress!
I haven't used the thing since we got the machine, so I'm a bit rusty. Oops! Too much water. Well, weak coffee is better than no coffee. A quick once over with a sponge will get rid of the excess coffee. OK a few 'once overs'.
Ahh coffee.... weak coffee.... but coffee....
"Mark's broken the coffee machine."
WHAT??!!
Mark's the Boss.
THE BOSS BROKE THE MACHINE!!!!
Can you BELIEVE IT!!!
AAAAAAAAAAARRRRRRRRRRGHH!!!!!!!!!!!!!!!
Monday, 13 May 2013
MS Word and HTML
During my lunch hour at work I tend get my laptop out and start doing a bit of writing. I'm not going to call myself an author... I've been working on this particular sci-fi story since the '90s, I've changed it quite dramatically several times over that period.
Anyway, I have this in Microsoft Word format. The program itself is quite a decent word processor (no, I'm not trolling).
I thought it might be a good idea to put the first part of my book on the web. I could then hand the link to my friends and if any of them actually wanted to read it, they could. (hardly likely I know).
Word will save HTML. Simple!
You'd have thought...
Have you SEEN the HTML word produces?
According to 'wc' it was 4871 lines long, of which 1137 (Yes, One Thousand, One Hundred and Thirty Seven) lines were defining styles. That's nearly A QUARTER. Although, admittedly in characters that's 29013 out of 205403 which doesn't sound quite so bad at 14%.
I stripped out a load of it 'cos Word doesn't do it for you (at least not the version of Word I use...2010 I think, It has the ghastly ribbon anyway - don't get me started on that! Half the features are missing or hidden... STOP!!!!... calm yourself... breath slowly...).
So I cut out the extraneous style definitions out with emacs. Easy! The rest is just nice and simple HTML.
Well...
You know how HTML defines some extended characters with special & sequences, like &..? Word doesn't!
Can you believe that?????
Elipsis: char 0x85, Smart quotes: 0x93 and 0x94, and single smart quotes ... blah blah... My HML had nine "Special" Characters in it. I realise these are probably valid in the character set it defines, and it does render OK in chrome... but, come on!
I had to write A PERL SCRIPT to remove this C*@P!
And then there's footnotes. What could be difficult about footnotes?
CONSISTENCY, that's what!
[1]
[2]
[3]
[4][4] Yes this appeared TWICE
1 What the???
2
[7]
... and so on ... AND SO ON ....
And I had to FIX THIS MESS!
WHY NOT HAVE A SIMPLE HTML OUTPUT FILTER!!!!!
The amount of time I WASTED P!@@1NG AROUND WITH THIS!!!
AAAAAAAAAAAAAAAAAARGGGHH!!!
Anyway, I have this in Microsoft Word format. The program itself is quite a decent word processor (no, I'm not trolling).
I thought it might be a good idea to put the first part of my book on the web. I could then hand the link to my friends and if any of them actually wanted to read it, they could. (hardly likely I know).
Word will save HTML. Simple!
You'd have thought...
Have you SEEN the HTML word produces?
According to 'wc' it was 4871 lines long, of which 1137 (Yes, One Thousand, One Hundred and Thirty Seven) lines were defining styles. That's nearly A QUARTER. Although, admittedly in characters that's 29013 out of 205403 which doesn't sound quite so bad at 14%.
I stripped out a load of it 'cos Word doesn't do it for you (at least not the version of Word I use...2010 I think, It has the ghastly ribbon anyway - don't get me started on that! Half the features are missing or hidden... STOP!!!!... calm yourself... breath slowly...).
So I cut out the extraneous style definitions out with emacs. Easy! The rest is just nice and simple HTML.
Well...
You know how HTML defines some extended characters with special & sequences, like &..? Word doesn't!
Can you believe that?????
Elipsis: char 0x85, Smart quotes: 0x93 and 0x94, and single smart quotes ... blah blah... My HML had nine "Special" Characters in it. I realise these are probably valid in the character set it defines, and it does render OK in chrome... but, come on!
I had to write A PERL SCRIPT to remove this C*@P!
And then there's footnotes. What could be difficult about footnotes?
CONSISTENCY, that's what!
[1]
[2]
[3]
[4][4] Yes this appeared TWICE
1 What the???
2
[7]
... and so on ... AND SO ON ....
And I had to FIX THIS MESS!
WHY NOT HAVE A SIMPLE HTML OUTPUT FILTER!!!!!
The amount of time I WASTED P!@@1NG AROUND WITH THIS!!!
AAAAAAAAAAAAAAAAAARGGGHH!!!
Wednesday, 8 May 2013
Bad web site
Passwords, generally a necessity of accessing many web sites. Fair enough.
How about medical web sites? Hmmm.....
Just ordering a repeat prescription, then? OK... as long as its https.
So far that covers my GP surgery.
You'd have thought they would present a list of those meds you;re allowed to repeat and let you tick what you want. Nope! You have to TYPE IT into a nice chart with three columns, a tick box (you can use the same entries next time and just tick what you want....nice), the name of the drug and the quantity.
It automatically finds the drug you type in the second column, WITH THE QUANTITY and ignores the quantity column!
OK, OK. Just a minor thing. I can forgive that.
What I really can't forgive is that it TELLS YOU WHAT YOU TYPED IN THE PASSWORD BOX WHEN YOU MISTYPED IT!!!!
UNBELIEVABLE!!!!
And it looks like many surgeries USE THE SAME SOFTWARE!!!!!!
AAAAAAAAAAAAARRRRRGH!!!!!!!
How about medical web sites? Hmmm.....
Just ordering a repeat prescription, then? OK... as long as its https.
So far that covers my GP surgery.
You'd have thought they would present a list of those meds you;re allowed to repeat and let you tick what you want. Nope! You have to TYPE IT into a nice chart with three columns, a tick box (you can use the same entries next time and just tick what you want....nice), the name of the drug and the quantity.
It automatically finds the drug you type in the second column, WITH THE QUANTITY and ignores the quantity column!
OK, OK. Just a minor thing. I can forgive that.
What I really can't forgive is that it TELLS YOU WHAT YOU TYPED IN THE PASSWORD BOX WHEN YOU MISTYPED IT!!!!
UNBELIEVABLE!!!!
And it looks like many surgeries USE THE SAME SOFTWARE!!!!!!
AAAAAAAAAAAAARRRRRGH!!!!!!!
MySQL "Advice"
As a fairly experienced Postgres admin, I know SQL fairly well and know many of the intricacies of Postgres. I've never had trouble googling for the odd thing I need Postgres to do. Simples!
No so with MySQL!
Do you realise how much C*@P "advice" about MySQL there is on the internet???
It ranges from using obsolete libraries to opening up your database to the world. My results page EVEN contained open phpMyAdmin pages!!!!
WTF??!!!!
I'm not one who likes unnecessarily working out stupid admin tasks that somebody else has probably already worked out and (you'd have thought) done well. I must have spent over an hour googling and I COULDN'T FIND WHAT I WAS LOOKING FOR AMONGST ALL THE S41T!!!!!
AAAAAAAAAAAAARRRGH!!!!!
No so with MySQL!
Do you realise how much C*@P "advice" about MySQL there is on the internet???
It ranges from using obsolete libraries to opening up your database to the world. My results page EVEN contained open phpMyAdmin pages!!!!
WTF??!!!!
I'm not one who likes unnecessarily working out stupid admin tasks that somebody else has probably already worked out and (you'd have thought) done well. I must have spent over an hour googling and I COULDN'T FIND WHAT I WAS LOOKING FOR AMONGST ALL THE S41T!!!!!
AAAAAAAAAAAAARRRGH!!!!!
Tuesday, 7 May 2013
Nipples
Well, not nipples exactly, 'cos I like those. What warm blooded male wouldn't?
Nipple Mice. Who invented those?
You know what I'm talking about. The little joystick-like pointer controlling device on your laptop between the G H and B keys. You know, the awkward bloody piece of rubber that always catches on your finger nail when you want to type a B. Especially if it's n a password. Did I type it or didn't I?
It's just as bad if you want a G or H. It might just get in the way enough to limit the travel of the key so you can't be sure if it typed those characters either!
And to top it all off, my work laptop, as an example from Dell, has that AND A GLIDEPOINT MOUSE PAD TOO!!!!
WHAT were they THINKING!!!!
AAAAAAARRRGGGH!
Nipple Mice. Who invented those?
You know what I'm talking about. The little joystick-like pointer controlling device on your laptop between the G H and B keys. You know, the awkward bloody piece of rubber that always catches on your finger nail when you want to type a B. Especially if it's n a password. Did I type it or didn't I?
It's just as bad if you want a G or H. It might just get in the way enough to limit the travel of the key so you can't be sure if it typed those characters either!
And to top it all off, my work laptop, as an example from Dell, has that AND A GLIDEPOINT MOUSE PAD TOO!!!!
WHAT were they THINKING!!!!
AAAAAAARRRGGGH!
Subscribe to:
Posts (Atom)