<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;D08HRnwycCp7ImA9WhBaE0Q.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517</id><updated>2013-05-24T07:43:57.298-04:00</updated><category term="linux" /><category term="c#" /><category term="facebook" /><category term="xml" /><category term="iphone" /><category term="business" /><category term="jobs" /><category term="javascript" /><category term="java" /><category term="mysql" /><category term="python" /><category term="php" /><category term="system-administration" /><category term="microsoft" /><category term="asp.net" /><category term="code" /><category term="application-development" /><category term="zend" /><category term="ideas" /><category term="general" /><category term="db2" /><category term="database" /><category term="subversion" /><category term="google" /><title>Boring Guys Blog</title><subtitle type="html">linux, php, mysql, git, subversion, and development info by Rich Zygler</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://blog.boringguys.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>104</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/boringguys" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="boringguys" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DkcAQX4yfSp7ImA9WhJbFUo.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7638416623901052146</id><published>2012-09-25T07:54:00.000-04:00</published><updated>2012-09-25T07:54:00.095-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-25T07:54:00.095-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>How to get the address of the svn server for my subversion repository?</title><content type="html">&lt;br /&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
Recently, I had some code from a Subversion repository on my machine, but no longer had tortoise svn or any svn command lines tool set up. &amp;nbsp;Luckily, I remembered that in Subversion there is a lot of fun data inside the .svn directory. &amp;nbsp;For instance you can see the address of the server and repository by viewing the .svn/entries file at the root of the local subversion files. &amp;nbsp;Just look for the svn:// or svn+ssh:// &amp;nbsp;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
That line should show you the svn server address, as well as the repo name and branch.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2012/09/how-to-get-address-of-svn-server-for-my.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7638416623901052146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7638416623901052146?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2012/09/how-to-get-address-of-svn-server-for-my.html" title="How to get the address of the svn server for my subversion repository?" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0EEQX88fSp7ImA9WhJUGUs.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-3801720636053924101</id><published>2012-09-18T08:00:00.000-04:00</published><updated>2012-09-18T08:00:00.175-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-18T08:00:00.175-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="asp.net" /><category scheme="http://www.blogger.com/atom/ns#" term="c#" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>ASP.NET MVC Model binding in PHP?</title><content type="html">I've been working a lot this year with ASP.NET MVC 3 and C#. &amp;nbsp;One of the things I really like about these technologies is the model binding. &amp;nbsp;Let's say I have a data model called "User", a plain old C# class like this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/3739330.js?file=poco_user_model"&gt;&lt;/script&gt;

&lt;br /&gt;
I can set that as a model for my view to use in the "Edit" controller like so:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/3739344.js?file=aspnet_mvc_edit_controller"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
And then I have "User" as the data model in my view. &amp;nbsp;Here's what's awesome about it, let's say I need to accept edits of the user account, maybe they can fix their first or last name. &amp;nbsp;I can pass that same User model from the previous page via a form into an Edit method that accepts that data model. &amp;nbsp;I don't have to muck about with assigning the Request variables ( POST / GET ) to an object. &amp;nbsp;All that is handled for me.&lt;br /&gt;
&lt;br /&gt;
&lt;script src="https://gist.github.com/3739351.js?file=aspnet_mvc_httppost_edit_controller"&gt;&lt;/script&gt;&lt;br /&gt;
&lt;br /&gt;
The ASP.NET MVC model binding will attempt to bind your model in these scenarios:&lt;br /&gt;
&lt;br /&gt;
- If you have a form element on the page with an idenitical name to a property in the model&lt;br /&gt;
- If the url contains a key value pair from your routing that is identical to a property in the model&lt;br /&gt;
- If any REQUEST element has a name that is identical to a property in the model&lt;br /&gt;
- Otherwise, that property of the model will remain null&lt;br /&gt;
&lt;br /&gt;
Plus, the ASP.NET MVC model binding will let you turn on/off model binding for various properties of the model.&lt;br /&gt;
&lt;br /&gt;
PHP, or rightly, the many PHP frameworks really need to implement something like this. &amp;nbsp;A few perform some pieces of this concept but I'm not aware of any that currently serve up the whole enchilada. &amp;nbsp;What do you think?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2012/09/aspnet-mvc-model-binding-in-php.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/3801720636053924101?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/3801720636053924101?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2012/09/aspnet-mvc-model-binding-in-php.html" title="ASP.NET MVC Model binding in PHP?" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CkcBQHg4fSp7ImA9WhJUGU0.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-8658432769246024832</id><published>2012-09-17T12:40:00.000-04:00</published><updated>2012-09-17T12:40:51.635-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-09-17T12:40:51.635-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><category scheme="http://www.blogger.com/atom/ns#" term="database" /><title>Database stored procedures, functions and triggers are source code of your application.  Please treat them as such.</title><content type="html">&lt;br /&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
As a consultant for the past two years, when I come into a batch of code that has many stored procedures or triggers in the database, the first thing I ask is whether those stored procedures and triggers are under some kind of revision or source code control. &amp;nbsp;If the developers/DBAs look at me like I've got two heads, then I know I'm in for a doozy of a gig because those devs are probably not doing the best job they could be doing.&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
And that makes sense right? &amp;nbsp;You don't call in a consultant if everything is unicorns and rainbows with your system.&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
Stored procedures, functions, and triggers in your database are part of your codebase. &amp;nbsp;They could even be the most important and most delicate piece of your codebase.&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
I'll repeat this again for total clarity...&amp;nbsp;Stored procedures, functions, and triggers in your database are part of your codebase.&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
But not managing your codebase with a tool is a huge mistake. &amp;nbsp; And yet, I see this time and time again on my gigs. &amp;nbsp;And if I had a nickel for every time I saw a stored proc named with "_new" or "_new2" or "_use_this_one" in the name, I could invite Warren Buffet over to play cards and he would consider it.&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
For managing the source code of your stored procedures on SQL server, there's even some commerical tools available that take your database objects and chucks them into your source code repo. &amp;nbsp;&amp;nbsp;Or you can always just create a "sql" directory in your source code repository and store the objects there. &amp;nbsp;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="font-family: arial; font-size: small;"&gt;
There are a lot of ways to manage this problem. &amp;nbsp;Ignoring it, is not managing the problem, it's making it worse.&lt;/div&gt;
</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2012/09/database-stored-procedures-functions.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8658432769246024832?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8658432769246024832?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2012/09/database-stored-procedures-functions.html" title="Database stored procedures, functions and triggers are source code of your application.  Please treat them as such." /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0QCQn04cCp7ImA9WhRbGUo.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7473869673035134411</id><published>2012-02-11T11:56:00.000-05:00</published><updated>2012-02-11T11:56:03.338-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-11T11:56:03.338-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><category scheme="http://www.blogger.com/atom/ns#" term="business" /><title>Turned off my "home page" today</title><content type="html">&lt;br /&gt;
&lt;div class="p1"&gt;
I turned off my web hosting today that hosted my home page and a few small facebook apps that weren't making any serious money.&amp;nbsp; It's kind of the end of an era for me.&amp;nbsp; I've hosted my own web page and small apps since probably 1997. &amp;nbsp;&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
These days it just doesn't make much sense to host your own anything.&amp;nbsp; The cloud is our new overlord and I for one love the stuffing out of it.&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
You can have code at github and bitbucket for free (bitbucket does private repos at no cost - yay! ).&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
You can have your blog on blogger or wordpress.&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
You have your random one-liners and cries for help on twitter.&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
You have linkedin so that recruiters can spam the daylights out of you with terrible positions in far away countries.&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
You have roughly a ba-jillion services for hosting your small apps, like Heroku, PHP Cloud, Google App Engine, and Azure.&lt;/div&gt;
&lt;div class="p2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
I just can't justify the expense of a basic web hosting or virtual server account any more.&amp;nbsp; I won't miss&amp;nbsp; doing the system administration on that thing and constantly worrying about hackers.&amp;nbsp; That's for sure.&lt;/div&gt;
&lt;div class="p1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="p1"&gt;
I still need a proper home page for my domains to link to all my various cloud identities.&amp;nbsp; Any suggestions?&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2012/02/turned-off-my-home-page-today.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7473869673035134411?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7473869673035134411?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2012/02/turned-off-my-home-page-today.html" title="Turned off my &quot;home page&quot; today" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;DEUNQ34yfip7ImA9WhdbFkU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-6432588633459691643</id><published>2011-10-15T09:44:00.000-04:00</published><updated>2011-10-15T09:44:52.096-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-15T09:44:52.096-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><category scheme="http://www.blogger.com/atom/ns#" term="iphone" /><title>Review of Siri voice app for iphone 4s</title><content type="html">I've been playing with Siri on the new iphone 4s for about 12 hours now and I can honestly say I'm quite impressed with the features. &amp;nbsp;The small help section within Siri gets you going quickly with example commands. &amp;nbsp;When Siri doesn't understand a command, she prompts you to do a web search for that phrase. &amp;nbsp;Of course saying things like "google barack obama" or "search for barack obama" also command her to do a google search for those terms.&lt;br /&gt;
&lt;br /&gt;
A lot of the examples show how you can text, email, or call using Siri by just referring to a person's first name. &lt;br /&gt;
&lt;br /&gt;
"Text Vinny"&lt;br /&gt;
&lt;br /&gt;
"Email Vinny"&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you have multiple Vinnies in your contacts, Siri will show you a list and prompt you to choose one. &amp;nbsp;This makes perfect sense. &amp;nbsp;However, the voice commands don't appear to work very well for choosing which Vinny. &amp;nbsp;Siri doesn't seem to understand names very well ( which from a programmers point of view makes perfect sense ). &amp;nbsp;I was hoping that it would work like most phone systems work however, where I could say "one" and Siri would select the first Vinny in the list or "two" for selecting the second Vinny and so on. &amp;nbsp;It doesn't work like that. &amp;nbsp;So you either have to click the "Vinny" that you want or try to say their whole name in the original request like: "Email Vinny Boombotz." &amp;nbsp;And you have to really pronounce names phonetically ( not necessarily how they're pronounced ) to get the right name to show up.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The same issue comes up with email addresses. &amp;nbsp;When you command:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
"Email Vinny Boombotz"&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If Vinny Boombotz has multiple email addresses, Siri will show you a list of Vinny's email addresses and prompt you to choose one.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
I've found that text commands work better than email commands and that's usually because most of my contacts only have one mobile phone number and therefore one texting address. &amp;nbsp;Saying "Text Vinny Boombotz" will have Siri prompt you for the body of the message. &amp;nbsp;Saying "Text Vinny Boombotz I'll be right over" will have Siri put "I'll be right over" in the body of the message. &amp;nbsp;Pretty handy.&lt;br /&gt;
&lt;br /&gt;
Creating meetings and reminders works very well. &amp;nbsp;When you say "Remind me to call Vinny Boombotz at 8:30pm" Siri will set up a reminder for 8:30pm with Vinny's number attached. &amp;nbsp;So the reminder winds up with a "call" button on it for easy dialing.&lt;br /&gt;
&lt;br /&gt;
Commands like "what's the weather today" and "show me today's meetings" are pretty handy as well. &lt;br /&gt;
&lt;br /&gt;
Commands like "Find me an italian restaurant" have Siri locate italian restaurants local to you. &amp;nbsp;Clicking on one shows a map and then clicking on the map label will show you the phone number and address of the restaurant.&lt;br /&gt;
&lt;br /&gt;
There's a whole slew of mapping functions that I haven't even tried yet.&lt;br /&gt;
&lt;br /&gt;
The Wolfram Alpha piece of Siri is kind of like the ultimate bar bet tool. &amp;nbsp;You can ask questions like:&lt;br /&gt;
&lt;br /&gt;
"Who won best actor in 1982?"&lt;br /&gt;
&lt;br /&gt;
"Who won the SuperBowl in 1986?"&lt;br /&gt;
&lt;br /&gt;
"What's the population of China?"&lt;br /&gt;
&lt;br /&gt;
"How many calories in an Egg McMuffin?"&lt;br /&gt;
&lt;br /&gt;
And the Wolfram Alpha piece kicks in and gives you a handful of information on your topic. &amp;nbsp;Again, if its not in Wolfram Alpha, then it falls back to a web search. &amp;nbsp;But I found this much quicker then typing in a search. &amp;nbsp;I'm probably going to use this piece of it quite a lot.&lt;br /&gt;
&lt;br /&gt;
There's also a &lt;a href="http://blog.boringguys.com/2011/10/fun-questions-to-ask-siri-for-iphone-4s.html"&gt;bunch of fun questions you can ask Siri&lt;/a&gt; that I mentioned here.&lt;br /&gt;
&lt;br /&gt;
There's big things missing from Siri right now that I hope get improved. &amp;nbsp;There's really no concept of "latest news" or "latest baseball scores." &amp;nbsp;Siri will prompt you to do web search for these terms. &amp;nbsp;Ideally, they should open up the API to/from Siri so that if you ask for "latest baseball scores" it can query ESPN or another sports outlet for that request. &amp;nbsp;It would be really killer if when you created iphone apps that you could register some Siri answers in your app so certain questions would go to your app instead of just a default web search from Siri.&lt;br /&gt;
&lt;br /&gt;
So in the baseball case, the ESPN app could register answers with Siri to questions like "Latest baseball scores" or "Next Texas Rangers game." &amp;nbsp;So if Siri couldn't find the answers to those questions, it could question the ESPN app on your phone for those questions, before doing a default web search.&lt;br /&gt;
&lt;br /&gt;
In conclusion, I think Siri is a nice addition to the iphone. &amp;nbsp;It's not quite a killer app but its definitely useful and something I'll probably be using a few times a week.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/10/review-of-siri-voice-app-for-iphone-4s.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6432588633459691643?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6432588633459691643?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/10/review-of-siri-voice-app-for-iphone-4s.html" title="Review of Siri voice app for iphone 4s" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUYNQng-fSp7ImA9WhdbF0g.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-8869196480329424940</id><published>2011-10-15T08:30:00.000-04:00</published><updated>2011-10-16T05:26:33.655-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-16T05:26:33.655-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iphone" /><title>Fun questions to ask Siri for iphone 4s</title><content type="html">&lt;div&gt;
In addition to the usual helpful things like sending texts and setting up appointments, Siri also responds to a bunch of silly questions as well. &amp;nbsp;Try these and see what you get:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
What is the meaning of life?&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Siri, what is your favorite color?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Siri, how old are you?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Siri, how do you work?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Knock knock?&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/10/fun-questions-to-ask-siri-for-iphone-4s.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8869196480329424940?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8869196480329424940?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/10/fun-questions-to-ask-siri-for-iphone-4s.html" title="Fun questions to ask Siri for iphone 4s" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;AkYDSHw6cSp7ImA9WhdXEkU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7106096221237831912</id><published>2011-08-25T12:02:00.000-04:00</published><updated>2011-08-25T12:02:59.219-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-25T12:02:59.219-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jobs" /><category scheme="http://www.blogger.com/atom/ns#" term="business" /><title>On Technical Recruiter Spam</title><content type="html">        &lt;br /&gt;
&lt;div class="p1"&gt;I haven't updated my linkedin or dice.com profiles in about a year.&amp;nbsp; I figured by not updating those profiles that it would slow down the constant onslaught of recruiters phoning and emailing me about web developer positions.&amp;nbsp; It hasn't worked so far.&amp;nbsp; I really appreciate someone giving me the opportunity to apply to interesting jobs but the recruiting industry is just broken and full of lazy people who can't be bothered to do anything other than a simple keyword search.&amp;nbsp; I have a lot of experience so I'm going to show up in a lot of keyword searches but that doesn't mean those jobs are applicable to me or that I would be interested in them.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;So if you're going to contact me anyway, you might as well try not to annoy me.&amp;nbsp; Here are some ways dear recruiter of not annoying me:&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;1.) If my profile lists that I'm not willing to relocate then don't send me a job clear across the state.&amp;nbsp; Or the country. &amp;nbsp; Or the world. &amp;nbsp; These would require relocation.&amp;nbsp; While I realize that New Jersey is one of the smaller states in the union, it is still 166 miles north to south and 57 miles wide.&amp;nbsp; Since I live towards one end of it as referenced by my address, it makes little sense to assume I can commute to the other end.&amp;nbsp; That's over a 100 mile commute.&amp;nbsp; A quick google map search could give you that. &amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;2.) If the job entails working WITH a "guru," "ninja," or "rock star" then I am not interested.&amp;nbsp; A real guru is much too enlightened to ever refer to themselves as a guru, nor would they allow another to refer to them as such.&amp;nbsp; So when I see "guru" as my potential boss/coworker, I read "asshole."&amp;nbsp; A ninja would have altered the job ad before it went live so as to preserve his identity.&amp;nbsp; And rock stars aren't developers.&amp;nbsp; They are girls named Kim that play bass guitar.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;3.) If the position entails that I NEED to be a "guru," "ninja," or "rock star" then I am not interested. Please see above.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;4.) If my profile lists I'm looking for full time work, then don't send me jobs that aren't full time.&amp;nbsp; I really don't get this one.&amp;nbsp; And I don't have anything funny to add to it either.&amp;nbsp; It's really just sad that people don't pay attention to this.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;5.) If the position requires being an expert in some technology that I don't have as my primary skill set, then don't bother contacting me because I probably couldn't even do the job. &amp;nbsp;&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;6.) Stop asking for "excellent communication skills."&amp;nbsp; If I had those, I wouldn't be a developer, I would be a salesman.&amp;nbsp; Or Steve Jobs.&amp;nbsp; I can communicate well enough to get the point across the first time.&amp;nbsp; Is that excellence?&amp;nbsp; Perhaps to you it is, but you also think the world is full of gurus and ninjas so I can't really take your assessment at face value.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;7.) If the position does not require me to write code to get a job offer then I'm not interested.&amp;nbsp; Because that means your other developers didn't need to write code to get their jobs there and probably two-thirds of those developers are terrible.&amp;nbsp; I don't want to work with terrible people.&amp;nbsp; The better job you do at weeding out the crappy developers, the more I will think of your organization.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;8.) If the position is for a company whose name you cannot divulge until we've had several conversations then I'm not interested.&amp;nbsp; I understand not putting the name in the job ad online,&amp;nbsp; that's pretty standard these days, but if you're contacting me directly then you should give me the name of the company.&amp;nbsp; Otherwise it implies a lack of trust on my part, like I'm going to steal this commission from you somehow.&amp;nbsp; So, first, you're making contact with a stale account since I haven't updated my profile in a year.&amp;nbsp; So you're assuming I'm looking for job when I'm probably not.&amp;nbsp; And then to try and entice me into the job market, you neglect to give me the company name so I can do research on it?&amp;nbsp; That's pretty lame.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;I could go on and on here, but what about you?&amp;nbsp; What are your suggestions for technical recruiters?&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/08/on-technical-recruiter-spam.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7106096221237831912?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7106096221237831912?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/08/on-technical-recruiter-spam.html" title="On Technical Recruiter Spam" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>5</thr:total></entry><entry gd:etag="W/&quot;A0cEQHo6cCp7ImA9WhdRF0w.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-2609106153475977856</id><published>2011-08-07T08:10:00.000-04:00</published><updated>2011-08-07T08:10:01.418-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-07T08:10:01.418-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>How to find all the distinct PHP session variables that your applications uses.</title><content type="html">&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;The short answer is a one line *nix shell command:&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -hor "\$_SESSION\['[A-Za-z0-9_]*'\]&lt;wbr&gt;&lt;/wbr&gt;" * | sort -u&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;This command:&amp;nbsp;&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;looks through all the files in your application recursively for the PHP $_SESSION reference&lt;/li&gt;
&lt;li&gt;finds any variables named with capital letters, or lowercase letters, or underscores, or numbers&lt;/li&gt;
&lt;li&gt;sorts the list alphabetically&amp;nbsp;&lt;/li&gt;
&lt;li&gt;removes the duplicate items in the list&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;The long answer is that I found myself with an interesting dilemma recently.&amp;nbsp; How to find all the PHP session variables set in my application.&amp;nbsp; Some pieces of the application were new code, some were older legacy code.&amp;nbsp; I needed to get the full list of session variables because I needed to delete most, but not all of them for a certain usage case ( ie, the user is still logged in and has some properties, but the other session data could be safely destroyed ).&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="background-color: white; color: #333333; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: arial, sans-serif;"&gt;So I began with some command line greps on linux. &amp;nbsp;First I tried:&lt;/span&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -r \$_SESSION *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;This was&amp;nbsp; a decent list, but about 1000 rows long.&amp;nbsp; Too unwieldy to deal with.&amp;nbsp; Let's get rid of the filenames, I don't really care where the session values are set for my case.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -hr \$_SESSION *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;This is a little better, but I don't need the whole line, just the session variable itself.&amp;nbsp; Let's see if we can start to grab the session var using a regex pattern.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -hor "\$_SESSION\[" *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;That's getting us closer.&amp;nbsp; Now, I know ( or assume ) that my variables will only include upper/lower case letters as well as numbers and underscore.&amp;nbsp; Let's add those to the pattern.&amp;nbsp; ( you DO speak regex don't you? )&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -hor "\$_SESSION\['[A-Za-z0-9_]*'\]&lt;wbr&gt;&lt;/wbr&gt;" *&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;Now we are cooking.&amp;nbsp; This is a nice list of the session variables ( albeit only one array level deep which is all I needed ).&amp;nbsp; Now how to remove the duplicates?&amp;nbsp; Maybe we should "sort" them first?&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -hor "\$_SESSION\['[A-Za-z0-9_]*'\]&lt;wbr&gt;&lt;/wbr&gt;" * | sort&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;That is really close.&amp;nbsp; Is there a way to remove duplicates with the "sort" command?&amp;nbsp; Yes, there is.&amp;nbsp; Hot dog.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;grep -hor "\$_SESSION\['[A-Za-z0-9_]*'\]&lt;wbr&gt;&lt;/wbr&gt;" * | sort -u&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;There it is.&amp;nbsp; That's the final command I used which located around 50 variables in the old legacy code and new modular code that were used in the sessions.&amp;nbsp; The only really drawback to this code is it will not find multiple nested array values on the session itself, but you could add that as a separate regex if you need.&lt;/div&gt;&lt;div style="font-family: arial, sans-serif;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/span&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/08/how-to-find-all-distinct-php-session.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/2609106153475977856?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/2609106153475977856?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/08/how-to-find-all-distinct-php-session.html" title="How to find all the distinct PHP session variables that your applications uses." /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;CUYMQ3kyeyp7ImA9WhdSFkw.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-8475653411722511097</id><published>2011-07-25T12:57:00.003-04:00</published><updated>2011-07-25T12:59:42.793-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-25T12:59:42.793-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>Yahoo email account hacked</title><content type="html">&lt;style type="text/css"&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
&lt;/style&gt;   &lt;br /&gt;
&lt;div class="p1"&gt;My wife started sending me emails about male enhancements around 3am Saturday morning.&amp;nbsp; I first took slight offense to this but quickly realized they were addressed to everyone in her address book.&amp;nbsp; Her Yahoo email account had been hacked.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;We updated her account password, alerted Yahoo security via a basic form on the Yahoo site, and added a "sign-in seal" to the account.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;But really, this should not have happened in the first place.&amp;nbsp; There's a page in the Yahoo accounts menus that shows you the last 20 or so places you've logged in from.&amp;nbsp; There's a bunch from our hometown and then a couple in France.&amp;nbsp; She's never logged into Yahoo from France.&amp;nbsp; Ever.&amp;nbsp; Shouldn't Yahoo be throwing a red flag on that and displaying some of the maiden name, first pet name questions?&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;The other disappointing piece of this is that there's no "sign me out of everywhere" button, you can only opt to be signed out every day.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;This is really terrible security.&amp;nbsp; I haven't forced her to switch to Gmail yet but I probably will strongly urge her to do so in the coming weeks.&lt;/div&gt;&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="p1"&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Gmail has two factor authentication which practically eliminates this.&lt;/li&gt;
&lt;li&gt;Gmail has a button to sign you out everywhere&lt;/li&gt;
&lt;li&gt;I *think* Gmail has something if you're logging in from a different country ( but I'm not positive on that )&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class="p2"&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/07/yahoo-email-account-hacked.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8475653411722511097?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8475653411722511097?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/07/yahoo-email-account-hacked.html" title="Yahoo email account hacked" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;Dk4MR347fCp7ImA9WhdTFEo.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7021673449938584164</id><published>2011-07-12T08:49:00.000-04:00</published><updated>2011-07-12T08:49:46.004-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-12T08:49:46.004-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>Diary of a mysql database problem in 15 minutes</title><content type="html">&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:42pm&lt;/b&gt; - frantic instant message comes in from a smallish project that their site is down.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:42pm&lt;/b&gt; - I ssh into both the webserver and the database server. &amp;nbsp;Database server takes awhile to actually get a login prompt.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:43pm&lt;/b&gt; - Email containing frantic instant message with importance set to high ( side note- people still use importance in emails? people still email after they've contacted you another way? &amp;nbsp;people still email? )&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:44pm&lt;/b&gt; - I run "top" on both the webserver and the database server. &amp;nbsp; ( There isn't any other monitoring since it's a smallish project. &amp;nbsp; there probably should be. &amp;nbsp;Will have to get client to pay for that.) &amp;nbsp;Webserver looks fine. &amp;nbsp;Database server load is really high, around 5 when it's usually around 0.30. &amp;nbsp;This is a mysql linux server.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:45pm&lt;/b&gt; - exit "top" and open a mysql command line prompt.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:46pm&lt;/b&gt; - execute "show processlist" in mysql. &amp;nbsp;A ton of queries show up, all behind one sinister looking one on a new table that's been set up recently.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:47pm&lt;/b&gt; - execute "explain sinister-looking query" in mysql to see how mysql is executing that query.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:48pm&lt;/b&gt; - possible_keys = NULL&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:49pm&lt;/b&gt; - Ruh roh. &amp;nbsp;Execute "alter table add index..."&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:50pm&lt;/b&gt; - database working.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:51pm&lt;/b&gt; - database working.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:52pm&lt;/b&gt; - database working.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:53pm&lt;/b&gt; - database done working. &amp;nbsp;execute "show processlist" to see 2 queries left on stack.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:54pm&lt;/b&gt; - Execute "top" command, load is down to 2.7 and falling. 1.9 now. &amp;nbsp;0.70 now.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:55pm&lt;/b&gt; - Declare crisis averted via instant message and email. &amp;nbsp;Wonder again if people still use email.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:56pm&lt;/b&gt; - Assign developer responsible for non-indexed table the task of making sure the schema changes get into source code control.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;b&gt;1:57pm&lt;/b&gt; - Go back to regular work.&lt;/div&gt;&lt;div style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/07/diary-of-mysql-database-problem-in-15.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7021673449938584164?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7021673449938584164?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/07/diary-of-mysql-database-problem-in-15.html" title="Diary of a mysql database problem in 15 minutes" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry><entry gd:etag="W/&quot;C0QFRHc7fip7ImA9WhdTFE0.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-1942735124390941228</id><published>2011-07-11T12:21:00.000-04:00</published><updated>2011-07-11T12:21:55.906-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-11T12:21:55.906-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>Write helpful code comments or none at all.</title><content type="html">Stumbled onto the following comment in some code I'm working on:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;//Code updated by Crappy Developer - 06/22/2011. Fix for Prod problem.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This is a terrible code comment. &amp;nbsp;I would rather you not even put this comment into the code.&lt;br /&gt;
&lt;br /&gt;
First off, I've replaced the name of the developer with "Crappy Developer" to protect their public persona and since that's how they are now known to me.&lt;br /&gt;
&lt;br /&gt;
The comment "Fix for Prod problem" tells me nothing. &amp;nbsp;Aren't all problems Production problems? &amp;nbsp;Otherwise, they're not problems. &amp;nbsp;What was the actual bug? &amp;nbsp;Under which circumstances was it reproducible? &amp;nbsp;How did you fix it? &amp;nbsp;Any tricky business logic involved here?&lt;br /&gt;
&lt;br /&gt;
And then there's the "//Code updated by.." &amp;nbsp;You might think that giving the date of the fix and the developer's name is at least a little bit helpful, but all of that can be discovered with "git blame." &amp;nbsp;This clown probably doesn't know "git blame" exists. &amp;nbsp;I'll have to send him the man page on that.&lt;br /&gt;
&lt;br /&gt;
So the next time you leave a comment in the code, make sure its worth the time of the next developer that might see it. &amp;nbsp;And make sure they aren't just going to blog about how terrible your comment was. &amp;nbsp;You're wasting time with lame code comments, so please stop it.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/07/write-helpful-code-comments-or-none-at.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/1942735124390941228?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/1942735124390941228?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/07/write-helpful-code-comments-or-none-at.html" title="Write helpful code comments or none at all." /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkcCRn0zfSp7ImA9WhdTEUw.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-6603463532340483544</id><published>2011-07-08T05:41:00.000-04:00</published><updated>2011-07-08T05:41:07.385-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-08T05:41:07.385-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><title>Using Gmail "Details" link to discover older IP addresses</title><content type="html">&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #333333; font-family: arial, sans-serif; font-size: 13px;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;For one project that I'm working on, they have a very strict firewall setup which restricts SSH access to only internal machines and those temporary machines outside the network that need access ( like if you're working from home ). &amp;nbsp;So as my IP address changes at home, I need to notify the service that my IP address has changed from A to B. &amp;nbsp;The service prefers if I can give them both the old address and the new address because they'll take out the old address from the firewall rules and add access for the new IP address ( yes, they are that anal ). &amp;nbsp;I was keeping this list on a pad by my desk but today I found myself downstairs, away from that pad, so I couldn't find my previous IP address, just the new one.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Fearing that I would have to walk ALL the way upstairs to get that pad, I thought for a few seconds and remembered the "Details" link in the footer of my gmail page. &amp;nbsp;Clicking "Details" in the footer of gmail will show you the last 10 instances of logins/refreshes to your gmail page. &amp;nbsp;Sure enough, I was able to find the number 7 entry was from last night and showed my previous IP address. &amp;nbsp;I copied it into my firewall request and got back to my work.&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/07/using-gmail-details-link-to-discover.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6603463532340483544?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6603463532340483544?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/07/using-gmail-details-link-to-discover.html" title="Using Gmail &quot;Details&quot; link to discover older IP addresses" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkcBQXY-eSp7ImA9Wx9aEUU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-1387476990451821786</id><published>2011-03-03T16:32:00.001-05:00</published><updated>2011-03-03T16:34:10.851-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-03-03T16:34:10.851-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><title>MySql tip for displaying query results vertically</title><content type="html">I have a need at the day job to view mysql records via the mysql command line client. &amp;nbsp;Some of the tables I'm looking at have 100 to 200 columns so it's pretty annoying to view this data horizontally across the screen. &amp;nbsp;If you end your queries in the mysql command line client with \G instead of a semicolon, then it will display the results vertically down the page. &amp;nbsp;Try it out!&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM users WHERE id = 72 \G</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2011/03/mysql-tip-for-displaying-query-results.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/1387476990451821786?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/1387476990451821786?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2011/03/mysql-tip-for-displaying-query-results.html" title="MySql tip for displaying query results vertically" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEUGSX08fyp7ImA9Wx9RFEg.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-1922886772850788344</id><published>2010-12-15T17:30:00.000-05:00</published><updated>2010-12-15T17:30:28.377-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-15T17:30:28.377-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><title>How to drop multiple tables in mysql at once</title><content type="html">There are a couple of different ways to remove multiple tables from MySQL at one time. &amp;nbsp;Almost all of the ways of dropping many mysql tables at once are dangerous and that's probably why the MySQL developers have overlooked this "feature." &amp;nbsp;You run the risk of dropping tables outside of the ones you meant to drop.&lt;br /&gt;
&lt;br /&gt;
But if you're dead set on this, here's &lt;a href="https://github.com/rzygler/misc/tree/master/mysql/proc_drop_tables"&gt;a stored procedure for dropping multiple MySQL tables at one time&lt;/a&gt; that does the job quick and easy.&lt;br /&gt;
&lt;br /&gt;
First you have to add the procedure to the schema. &amp;nbsp;You can technically add this to any schema that you have access to. &amp;nbsp;The way I use it is from a "global" schema that needs to make changes to other schemas that all have similar names. &amp;nbsp;The MySQL user calling the procedure needs to be able to perform the DROP as well as READ the information schema tables. &amp;nbsp;Don't mess with your permissions unless you have to however.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;b style="background-color: #f3f3f3;"&gt;-- --------------------------------------------------------------------------------
-- Routine DDL
-- --------------------------------------------------------------------------------
DELIMITER $$

CREATE PROCEDURE `drop_tables`( db varchar( 100 ), pattern varchar(100))
BEGIN
  SELECT @str_sql:=concat('drop table ', group_concat( concat(db, '.', table_name)) )
 FROM information_schema.tables
 WHERE table_schema = db AND table_name LIKE pattern;

 PREPARE stmt FROM @str_sql;
 EXECUTE stmt;
END&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;/pre&gt;&lt;pre style="white-space: pre-wrap; word-wrap: break-word;"&gt;&lt;/pre&gt;&lt;br /&gt;
Once the procedure is set up, to test it out,&lt;a href="https://github.com/rzygler/misc/blob/master/mysql/proc_drop_tables/test_tables.sql"&gt; you can use the test_tables.sql file which adds a bunch of tables to your schema&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
Calling the procedure can be done with:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;call drop_tables( 'test', 'jjj%' );&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
So in this case, I'm dropping all the tables that start with "jjj" in the "test" schema. &amp;nbsp;The "pattern" parameter can be any valid MySQL "LIKE" parameter.&lt;br /&gt;
&lt;br /&gt;
In a MySQL client, it looks like this:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;mysql&amp;gt; call drop_tables( 'test', 'jjj%' );&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;+------------------------------------------------------------------------------+&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;| @str_sql:=concat('drop table ', group_concat( concat(db, '.', table_name)) ) |&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;+------------------------------------------------------------------------------+&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;| drop table test.jjj_test1,test.jjj_test2,test.jjj_test3,test.jjj_test4 &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;+------------------------------------------------------------------------------+&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;1 row in set (0.00 sec)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class="Apple-style-span" style="background-color: #f3f3f3; font-family: 'Courier New', Courier, monospace; font-size: x-small;"&gt;Query OK, 0 rows affected (0.21 sec)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, obviously, if you put in a pattern that returns no resulting table names, then you'll get an error. &amp;nbsp;But fixing that error is left to the reader as an exercise ( do feel free to contribute that back to me!)&lt;br /&gt;
&lt;br /&gt;
Any questions or comments? &amp;nbsp;Do you have a better way to do this?</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2010/12/how-to-drop-multiple-tables-in-mysql-at.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/1922886772850788344?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/1922886772850788344?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2010/12/how-to-drop-multiple-tables-in-mysql-at.html" title="How to drop multiple tables in mysql at once" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0AMRXc5cSp7ImA9Wx9RGE4.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-2805612986278195188</id><published>2010-12-13T16:06:00.002-05:00</published><updated>2010-12-20T05:09:44.929-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-12-20T05:09:44.929-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>Explode a string with no delimiter in PHP</title><content type="html">I needed a way to split a string by the character and put the results in an array. &amp;nbsp;Sounds like the perfect job for the explode function right? &amp;nbsp;Well, according to the manual:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #f1c232; border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;If&amp;nbsp;&lt;i&gt;&lt;tt class="parameter" style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace; font-style: italic;"&gt;delimiter&lt;/tt&gt;&lt;/i&gt;&amp;nbsp;is an empty&amp;nbsp;&lt;span class="type"&gt;&lt;a class="type string" href="http://us2.php.net/manual/en/language.types.string.php" style="border-bottom-color: rgb(0, 0, 153); border-bottom-style: solid; border-bottom-width: 1px; color: #000099; text-decoration: none;"&gt;string&lt;/a&gt;&lt;/span&gt;&amp;nbsp;(""),&amp;nbsp;&lt;span class="function"&gt;&lt;b&gt;explode()&lt;/b&gt;&lt;/span&gt;&amp;nbsp;will return&amp;nbsp;&lt;b&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;FALSE&lt;/tt&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;&lt;b&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;That's a bummer. &amp;nbsp;&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;UPDATE: I also tried&amp;nbsp;&lt;/tt&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #222222; line-height: 16px;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;b&gt;str_split('whatever')&lt;/b&gt; but that has some problems with foreign strings.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;But we can do something like this:&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: verdana, arial, helvetica, sans-serif; font-size: 14px;"&gt;&lt;tt style="font-family: Consolas, 'Andale Mono WT', 'Andale Mono', 'Lucida Console', Monaco, 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;
&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: monospace;"&gt;&lt;b&gt;$str = "Let's split this string!";&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Courier New', Courier, monospace;"&gt;&lt;tt&gt;&lt;b&gt;// get the string length so we aren't paying for this in the loop &lt;/b&gt;&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;$strLen = strlen( $str );&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;// basically an "explode" on the string without needing delimiters&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;for ( $i = 0; $i &amp;lt; $strLen; $i++ )&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$arr[] = $str{$i};&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;print_r( $arr );&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy! &amp;nbsp;Let me know what other ways you can come up with to do something similar.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2010/12/explode-string-with-no-delimiter-in-php.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/2805612986278195188?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/2805612986278195188?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2010/12/explode-string-with-no-delimiter-in-php.html" title="Explode a string with no delimiter in PHP" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;D0ECRXs8fCp7ImA9Wx5aEEk.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-6728511288356582955</id><published>2010-11-06T08:14:00.000-04:00</published><updated>2010-11-06T08:14:24.574-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-06T08:14:24.574-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>SQLSTATE[HY000]: General error: could not call class constructor</title><content type="html">&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;SQLSTATE[HY000]: &lt;span class="il"&gt;General&lt;/span&gt; &lt;span class="il"&gt;error&lt;/span&gt;: &lt;span class="il"&gt;could&lt;/span&gt; &lt;span class="il"&gt;not&lt;/span&gt; &lt;span class="il"&gt;call&lt;/span&gt; &lt;span class="il"&gt;class&lt;/span&gt; &lt;span class="il"&gt;constructor&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This rather vague &lt;span class="il"&gt;error&lt;/span&gt; message has been popping up in some of my unit tests lately. &amp;nbsp;It's a PHP error in PDO querying MySQL that happens when you're using the setFetchMode method of the PDOStatement. &amp;nbsp;If you use the fetchMode of "FETCH_CLASS" you can get this error in one of three ways:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;The class you specified has not been included/required so when PDO gets results, it cannot create an object of the class you specified since it doesn't have that class definition.&lt;/li&gt;
&lt;li&gt;Properties on the class you specified have been marked as protected or private and there aren't any setters for them so PDO can't set the properties on the new object.&lt;/li&gt;
&lt;li&gt;You used the optional third argument "ctorargs" to give constructor arguments on your new object however your arguments are incorrect and don't match those on the class.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;Hope this helps other poor souls out there trying to figure this error out.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2010/11/sqlstatehy000-general-error-could-not.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6728511288356582955?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6728511288356582955?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2010/11/sqlstatehy000-general-error-could-not.html" title="SQLSTATE[HY000]: General error: could not call class constructor" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0EGRHw9fyp7ImA9Wx5bGUo.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7736219346371864378</id><published>2010-11-05T12:47:00.000-04:00</published><updated>2010-11-05T12:47:05.267-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-11-05T12:47:05.267-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mysql" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>"show tables not like" in mysql</title><content type="html">&lt;div&gt;I was looking for the tables in my database not starting with "p_". &amp;nbsp;MySQL doesn't let you execute this command:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;show tables not like "p_%";&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Which is odd considering it will allow "like" here:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;show tables like "p_%";&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Instead, you have to use the information schema like this:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;SELECT table_name FROM information_schema.tables WHERE table_schema = 'mydb' AND table_name NOT LIKE 'p_%'; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2010/11/show-tables-not-like-in-mysql.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7736219346371864378?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7736219346371864378?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2010/11/show-tables-not-like-in-mysql.html" title="&quot;show tables not like&quot; in mysql" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>4</thr:total></entry><entry gd:etag="W/&quot;A0YBRX47eSp7ImA9Wx5bFEU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7219285341116004831</id><published>2010-10-30T21:39:00.000-04:00</published><updated>2010-10-30T21:39:14.001-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-10-30T21:39:14.001-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>Eclipse update conflict "Do you want to overwrite the changes made on the file system"</title><content type="html">Earlier today I kept running into a problem using Eclipse (really Zend Studio built on Eclipse) with a project running on the network that I accessed via a mapped drive on my Linux machine. &amp;nbsp;The problem occurred during file saving and looked like this:&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;Eclipse update conflict "do you want to overwrite the changes made on the file system?"&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The only way I was really able to fix this problem was to make sure that both my machine and the networked machine in question had the same exact time. &amp;nbsp; So I busted out ntpdate and made sure both machines were updating their time at least once a day using a command something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;sudo ntpdate pool.ntp.org&lt;/b&gt;&lt;/span&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2010/10/eclipse-update-conflict-do-you-want-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7219285341116004831?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7219285341116004831?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2010/10/eclipse-update-conflict-do-you-want-to.html" title="Eclipse update conflict &quot;Do you want to overwrite the changes made on the file system&quot;" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUcEQ3w_cCp7ImA9WxBUEkU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-6662918679028866418</id><published>2010-02-27T11:10:00.000-05:00</published><updated>2010-02-27T11:10:02.248-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-02-27T11:10:02.248-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="zend" /><category scheme="http://www.blogger.com/atom/ns#" term="code" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>Export from Wordpress blog and Import to Blogger</title><content type="html">This script exports your posts and categories from your locally hosted Wordpress blog and imports them into a new Blogger blog online.  The script is based on the Blogger examples for working with PHP and blog data.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://github.com/rzygler/misc/blob/master/xfer_to_blogger.php"&gt;Code to export from hosted Wordpress blog and import to Blogger at github&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You need to have the Zend Framework up and running on your system as it contains all the GData libraries for working with Google data in PHP.  This script doesn't use any of the MVC, so you just need to have the files somewhere that you can require them.  &lt;a href="http://framework.zend.com/"&gt;More on Zend Framework here.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
You need to edit line 8 to point to the path of your Zend Framework.  You also need to update the database connection variables right below that to match your wordpress blog.&lt;br /&gt;
&lt;br /&gt;
Some caveats:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Blogger can only import 50 blog posts per day before tripping some anti-spam protection.  So the SQL "limit" clause around line 322 will need to be adjusted.  It is set to get the first 50 posts and publish them.&lt;/li&gt;
&lt;li&gt;Wordpress "categories" become Blogger "labels"&lt;/li&gt;
&lt;li&gt;Blogger forces any imported comments to the blog posts to originate from you, the author, of the blog. &amp;nbsp;So I have omitted these from my script, figuring it would look crazy to be talking to myself. &amp;nbsp;You could hack this script to add those back in. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
What's great about Blogger is that you can create a new test blog and run this script, which allows you to select which Blogger blog you wish to update and go from there.&lt;br /&gt;
&lt;br /&gt;
The usage is:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;php xfer_to_blogger.php --user=email@email.com --pass=password&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The email and password here are the ones you used in setting up your Blogger account.&lt;br /&gt;
&lt;br /&gt;
Let me know how you make out and if you have any suggestions for the code.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2010/02/export-from-wordpress-blog-and-import.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6662918679028866418?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/6662918679028866418?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2010/02/export-from-wordpress-blog-and-import.html" title="Export from Wordpress blog and Import to Blogger" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DU4FRnk5fip7ImA9WxBQGE8.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-3866946225590167934</id><published>2009-09-13T02:39:00.001-04:00</published><updated>2010-01-18T10:18:37.726-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-18T10:18:37.726-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>Thinking of moving this blog to blogger.com or wordpress.com</title><content type="html">Haven't decided yet, but here's a nice summary of the features involved in &lt;a href="http://pulsed.blogspot.com/2007/07/blogger-wordpress-chart.html"&gt;blogger.com vs wordpress.com&lt;/a&gt;.&amp;nbsp; I wonder if tumblr or posterous are more relevant now?&amp;nbsp; I've got a ton of this old stuff to port over.&amp;nbsp; Looks like I won't be able to show comments made by their rightful authors for old posts no matter which site I use.&amp;nbsp; Decisions decisions.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2009/09/thinking-of-moving-this-blog-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/3866946225590167934?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/3866946225590167934?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2009/09/thinking-of-moving-this-blog-to.html" title="Thinking of moving this blog to blogger.com or wordpress.com" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkUERnk5cSp7ImA9WxBQGE8.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-5081526301039937570</id><published>2009-07-23T05:36:00.001-04:00</published><updated>2010-01-18T10:23:27.729-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-18T10:23:27.729-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="jobs" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><title>Hiring PHP5 Programmers</title><content type="html">My company has placed an ad looking for more PHP5 programmers to work mostly in the social networking area.&amp;nbsp; We have a coding test that we give to everyone whose resume passes muster.&amp;nbsp; It's a basic test, includes some CRUD database functions as well as creating a basic Facebook app.&amp;nbsp; We specify PHP5 all over the place. &lt;br /&gt;
&lt;br /&gt;
But no one who takes the test ever uses any of PHP5's attributes.&amp;nbsp; Not one test app has come back using classes of any kind other then the Facebook reference. &lt;br /&gt;
&lt;br /&gt;
Am I being too hard on people for this?&amp;nbsp; Maybe we need to specify that creating classes is recommended if not mandatory?&amp;nbsp; I don't&amp;nbsp; know what the answer is, but I know that upon receiving several recent test apps in "PHP5" that have include files that contain only functions, I'm a little depressed.&amp;nbsp; And yes, I used the quotes around php5 on purpose. &lt;br /&gt;
&lt;br /&gt;
.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2009/07/hiring-php5-programmers.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/5081526301039937570?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/5081526301039937570?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2009/07/hiring-php5-programmers.html" title="Hiring PHP5 Programmers" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkYNQ34-cSp7ImA9WxBQFUU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-8243103833781143705</id><published>2009-07-08T02:10:00.001-04:00</published><updated>2010-01-15T15:43:12.059-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-15T15:43:12.059-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><title>Ubuntu Add/Remove Program List Empty</title><content type="html">For future personal reference (and maybe others as well), installing Adobe Air tends to break the Add Remove app in Ubuntu.&amp;nbsp; Here's the solution, in a terminal, if you will. &lt;br /&gt;
&lt;br /&gt;
&lt;hr size="1" style="background-color: white; color: white;" /&gt;&lt;br /&gt;
&lt;div style="margin: 5px 20px 20px;"&gt;&lt;br /&gt;
&lt;div class="smallfont" style="margin-bottom: 2px;"&gt;Code:&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;pre class="alt2" dir="ltr" style="border: 1px inset; height: 34px; margin: 0px; overflow: auto; padding: 6px; text-align: left;"&gt;sudo apt-get --reinstall install gnome-app-install&lt;/pre&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2009/07/ubuntu-addremove-program-list-empty.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8243103833781143705?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/8243103833781143705?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2009/07/ubuntu-addremove-program-list-empty.html" title="Ubuntu Add/Remove Program List Empty" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkUMRXo5fSp7ImA9WxBQFUU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7656896957591125473</id><published>2009-01-30T02:53:00.001-05:00</published><updated>2010-01-15T15:44:44.425-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-15T15:44:44.425-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>How good system administration is like new underwear</title><content type="html">I can't remember the last time I bought my own underwear.&amp;nbsp; I may not have EVER bought any for myself.&amp;nbsp; Each Christmas, there's typically a few new pairs of boxers under the tree with my name on them.&amp;nbsp; Well, more precisely, my name is on the wrapping paper that the underwear come in, not actually on the boxers themselves (because I'm either too old now or much too young to have people labeling my clothes for me). &lt;br /&gt;
&lt;br /&gt;
But I never have to worry about underwear.&amp;nbsp; There's an unseen process chugging along that keeps my clothes drawers replenished with fresh undergarments.&amp;nbsp; It's a constant.&amp;nbsp; The underwear is just there and it just works. &lt;br /&gt;
&lt;br /&gt;
Good quality system administration is like new underwear because it's a constant, it's just there, and it just works. &lt;br /&gt;
&lt;br /&gt;
If the development team is worried about placating the system administration team or if the dev team constantly has to work around various odd limitations in the system, then you're system administration is not like new underwear at all.&amp;nbsp; It's like a sock that has holes. &lt;br /&gt;
&lt;br /&gt;
You don't want to worry when you put on your socks in the morning that your big toe might shoot out of your sock into the cold morning air, right?&amp;nbsp; Is there a more uncomfortable feeling?&amp;nbsp; Similarly, you don't want to launch your new app and have to cross your fingers that the database is going to hold up.&amp;nbsp; (Perhaps I'm starting to mix metaphors here with all the underwear and socks talk) &lt;br /&gt;
&lt;br /&gt;
But my point is this... When your dev team has to worry about the system administration, they're going to spend more time talking about and coming up with solutions to issues that could probably be addressed by more robust system administration.&amp;nbsp; That makes your programming projects take longer.&amp;nbsp; And that's costing you money.&amp;nbsp; Real countable money. &lt;br /&gt;
&lt;br /&gt;
So get yourself a good admin.&amp;nbsp; Pay them wisely.&amp;nbsp; Give them new toys to play with.&amp;nbsp; And never worry about your underwear again. &lt;br /&gt;
&lt;br /&gt;
.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2009/01/how-good-system-administration-is-like.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7656896957591125473?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7656896957591125473?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2009/01/how-good-system-administration-is-like.html" title="How good system administration is like new underwear" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;AkQASHY9eip7ImA9WxBQFUU.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-7501719365501389759</id><published>2008-12-20T04:08:00.001-05:00</published><updated>2010-01-15T15:45:49.862-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-01-15T15:45:49.862-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="google" /><title>Google Adsense and Google Analytics may be blocked by McAfee</title><content type="html">I can't confirm what's going on but I believe that at least McAfee and maybe other firewall appliance providers recently starting blocking &lt;strong&gt;googlesyndication.com&lt;/strong&gt; in the software of their appliances.&amp;nbsp; It started happening at work this week where all of a sudden Google Adsense and parts of Google Analytics were unavailable to us.&amp;nbsp; When I traced it, it was all requests to &lt;strong&gt;*.googlesyndication.com&lt;/strong&gt;, mostly &lt;strong&gt;pagead2.googlesyndication.com&lt;/strong&gt;.&amp;nbsp; Once we created an entry within our McAfee appliances to allow those addresses through, everything went back to normal.&amp;nbsp; YMMV. &lt;br /&gt;
&lt;br /&gt;
.</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2008/12/google-adsense-and-google-analytics-may.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7501719365501389759?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/7501719365501389759?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2008/12/google-adsense-and-google-analytics-may.html" title="Google Adsense and Google Analytics may be blocked by McAfee" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A08BQHkzeip7ImA9Wx9XE0w.&quot;"><id>tag:blogger.com,1999:blog-9024009237222671517.post-3791922934765990001</id><published>2008-12-15T02:57:00.002-05:00</published><updated>2011-01-06T08:17:31.782-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-01-06T08:17:31.782-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="system-administration" /><category scheme="http://www.blogger.com/atom/ns#" term="subversion" /><category scheme="http://www.blogger.com/atom/ns#" term="php" /><category scheme="http://www.blogger.com/atom/ns#" term="application-development" /><title>Development Environment layout using Linux, Apache, PHP, and Subversion</title><content type="html">Some of the age old questions I face lately are: &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;What's for dinner?&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Should I accept that friend request on Facebook for the friend of a friend of a friend that I knew 15 years ago?&lt;/li&gt;
&lt;li&gt;What's the best development and test environment layouts for PHP using Apache as a web server with Subversion for version control for multiple developers?&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Some of you may be asking yourselves the same questions.&amp;nbsp; The choice of dinner is a personal one.&amp;nbsp; I won't go into that except to say that everyone loves a good burrito.&amp;nbsp; Spicy!&amp;nbsp; And you probably don't care about my take on Facebook etiquette since your friends list probably dwarfs mine. &lt;br /&gt;
&lt;br /&gt;
But I do have some definite thoughts on the layout of development environments.&amp;nbsp; And I find that there's a huge lack of information about this on the interweb, so here you go. &lt;br /&gt;
&lt;br /&gt;
We use Linux, Apache, PHP, and subversion in our development environment and so these instructions will be biased towards these topics but I think you can apply this method using various other technologies. &lt;br /&gt;
&lt;br /&gt;
I like to give each developer their own development web site and development database.&amp;nbsp; I find it's easier for everyone to have their own individual sandbox to play in.&amp;nbsp; We give them each their own domain using their initials, something like &lt;strong&gt;rzdev.domain.com&lt;/strong&gt; for me and &lt;strong&gt;vbdev.domain.com&lt;/strong&gt; for another developer, Vinny Bag-o-Donuts.&amp;nbsp; We set the Apache directories up on the Linux dev box in a similar fashion: &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;/var/www/rzdev.domain.com/ &lt;br /&gt;
/var/www/vbdev.domain.com/&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
This has a few benefits.&amp;nbsp; If I need to show Vinny something with my site development, I can just send him the link to &lt;strong&gt;http://rzdev.domain.com/broken-page&lt;/strong&gt;.&amp;nbsp; I can make changes to code, even major infrastructure code and not break anything for the other developers.&amp;nbsp; We do the same thing with the databases, prefacing them with our initials. &lt;br /&gt;
&lt;br /&gt;
Now, since our dev boxes use Linux, we set up Samba for sharing on these web directories.&amp;nbsp; This means that all the devs can edit files and use source code management on the Linux server itself or on their Windows machines (we use either Eclipse or Zend Studio and create projects on the shares, that's a whole different posting!). &lt;br /&gt;
&lt;br /&gt;
This dev site layout is closely linked to the way we use Subversion for version control.&amp;nbsp; When we start a new site or application, if we can split out the development evenly enough, we'll just have everyone work from the trunk version of the code, with each developer working on their own little section. Each developer puts the trunk in their Apache dir and we edit the Apache configs to reflect this: &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;/var/www/rzdev.domain.com/trunk/ &lt;br /&gt;
/var/www/vbdev.domain.com/trunk/&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
The root of the dev sites typically look like this: &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;/var/www/rzdev.domain.com/trunk/docs&lt;/strong&gt; ( your Apache document root ) &lt;br /&gt;
&lt;strong&gt;/var/www/rzdev.domain.com/trunk/lib &lt;/strong&gt; ( non-public PHP library code ) &lt;br /&gt;
&lt;br /&gt;
When we commit code changes in Subversion, we have a hook that updates our main development site here: &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;/var/www/dev.domain.com/trunk&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
Again, that site can be seen on the web at http://dev.domain.com/&amp;nbsp; This way, we can do integration testing on our code to make sure our new code doesn't break code from someone else within the dev site. &lt;br /&gt;
&lt;br /&gt;
Now, the important thing here is that the Quality Assurance (QA) and Testing people ( if you're lucky enough to have them ), don't use any of these previously mentioned sites for their testing.&amp;nbsp; Why not?&amp;nbsp; Well, because if they're doing a good job and are therefore sufficiently anal, they're going to complain when code is changing on the site they're looking at. &lt;br /&gt;
&lt;br /&gt;
So we give them their own test site and database that's viewed on the web at &lt;strong&gt;http://test.domain.com/&lt;/strong&gt; and setup in apache at: &lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;/var/www/test.domain.com/trunk/docs&lt;/strong&gt; &lt;br /&gt;
&lt;strong&gt;/var/www/test.domain.com/trunk/lib&lt;/strong&gt; &lt;br /&gt;
&lt;br /&gt;
The developers will meet and create the list of files and database changes that get moved over to the test site.&amp;nbsp; How the actual moving is done doesn't really matter.&amp;nbsp; If you have the time and energy to set up some Ant or Phing tasks, that works great.&amp;nbsp; But copying/rsyncing files and running some SQL on the test database works just as well.&amp;nbsp; The most important part is that the developers meet to decide which part can go to test.&amp;nbsp; Otherwise, you could have code going to test and eventually production that might not be fully vetted. &lt;br /&gt;
&lt;br /&gt;
When QA finds bugs in &lt;strong&gt;test.domain.com&lt;/strong&gt;, they can send them to the developers.&amp;nbsp; The developers can instantly start working on fixing the bugs in their own dev space at &lt;strong&gt;rzdev.domain.com&lt;/strong&gt; and not affect the other developers or the ongoing testing of the application.&amp;nbsp; Pretty nice right? &lt;br /&gt;
&lt;br /&gt;
Advantages of this approach &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Uses source code management&lt;/li&gt;
&lt;li&gt;Developers can unit test their own code&lt;/li&gt;
&lt;li&gt;Developers can do integration testing between each other's code&lt;/li&gt;
&lt;li&gt;Developer A typically doesn't destroy code or data that developer B is using&lt;/li&gt;
&lt;li&gt;Developers don't destroy code or data that QA/testing is looking at&lt;/li&gt;
&lt;li&gt;Developers can both edit files and use source code management in either Linux or Windows environment&lt;/li&gt;
&lt;li&gt;Very scalable.&amp;nbsp; Adding new developers into the mix is as simple as adding their respective sub domains and databases (of course, this can also be viewed as a disadvantage, see below)&lt;/li&gt;
&lt;li&gt;Less bugs make it to production&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Disadvantages &lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Lots of sysadmin overhead initially and with each subsequent domain added.&amp;nbsp; You have to set up all those developer sites, rzdev, vbdev, etc.&amp;nbsp; Same overhead when using branching within subversion.&amp;nbsp; Plus, you have to setup all those databases and setup the config code to connect to the appropriate database for each developer domain.&lt;/li&gt;
&lt;li&gt;Lots of file space for all the sites and databases.&lt;/li&gt;
&lt;li&gt;Confusing for lone wolf and gunslinger developers who are used to overwriting production or each other's development code (too bad for them!)&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
So what do you think?&amp;nbsp; How do you setup YOUR PHP development environment? &lt;br /&gt;
&lt;br /&gt;
..</content><link rel="replies" type="text/html" href="http://blog.boringguys.com/2008/12/development-environment-layout-using.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/3791922934765990001?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/9024009237222671517/posts/default/3791922934765990001?v=2" /><link rel="alternate" type="text/html" href="http://blog.boringguys.com/2008/12/development-environment-layout-using.html" title="Development Environment layout using Linux, Apache, PHP, and Subversion" /><author><name>Rich</name><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total></entry></feed>
