MySQL and the perils of Going Rogue

Since the mid-90’s, I’ve worked fairly extensively with nearly all of the major Relational Database vendors: Oracle, Sybase, SQL Server, DB2, and MySQL. (Even dabbled a bit with Postgres.) I’ve been able to do this without too much trouble because, until fairly recently, the SQL implementations provided by the various vendors were not that different.

Over the past few years though, I’ve noticed more and more deviations from standard SQL coming into play, mostly from MySQL. I’ll admit I do not follow developments in the ANSI spec process, so some of these may be SQL-92 standards, but I suspect most are not. For example, take “INSERT IGNORE”. As others have noted, this is useful for developers, but it’s non-standard, and therefore not easily portable. Another example is “GROUP CONCAT”, which has created major headaches for some developers .

Oracle of course has its share of non-standard operators as well, such as “MINUS” and “INTERSECT”.
It includes one more reason that is if a person is not able to have a firm erection and this happens when pumping of blood is not viagra on line proper. Shigru cialis super active is also beneficial in urethral strictures and diabetic nephropathy. If purchase levitra online http://canterburymewscooperative.com/item-1483 is know the exact cause, can be indicate the correct treatment. It consistently improves the body’s natural production of insulin, hence, maintains the energy levels of body. generic cialis cipla
One could certainly argue that vendors are merely being “innovative” here, but one has to be careful when choosing to use these non-standard features. MySQL does not clearly point out in their documentation when they are deviating from SQL-92. Unless you are very certain that you will never need to run your code on a new database, these functions are probably best avoided if possible.

Reponse to Mike Kimsal (Java vs. PHP)

My friend Mike Kimsal wrote an excellent post on his blog today about the pros and cons of learning new programming languages. It inspired me to leave the following reply, which I decided to post here.

I’m not sure if I’m the friend you were referring to who was “forced” to move from Java to PHP and is now loving it (paraphrasing), but that is sort of my situation. PHP (or perhaps more accurately, the entire LAMP stack) is now the 3rd web dev stack I’m working with, having started out with Objective-C and Apple’s WebObjects (which spoiled me for everything since), then moving to J2EE. All of these environments have their pro’s and con’s. In my case, learning these new languages was literally a matter of survival. I have a few “die hard” friends who refused to acknowledge that Obj-C/WebObjects was dying, who are now struggling to make a living writing apps for the Mac and iPhone. I’m also starting to see the writing on the wall for J2EE. Certainly one can still make a good living with Java, but fewer and fewer new projects are using it. Eventually (and this has been said before), Java will become the next COBOL.

PHP is popular among web developers in part, I think, because of its similarity to Javascript, both in terms of the “dynamic” nature and even the syntax itself which is pretty similar. Many Web developers seem to be allergic to compilers, whereas I am still a big fan of them, as long as they are lightning fast and rock solid (which has been the case with Java for some time now).

In terms of productivity, I have come to realize that with PHP you are trading off speed for maintainability. It’s very easy to build things quickly with PHP, but fixing bugs and maintaining the code is very hard, because the dynamic, loose typing means the IDE and compiler cannot help you navigate the code or automatically find problems in it. For example, there is no easy way to definitively find all usages a given PHP method, even with PHP5 and the latest IDE’s. The fact that you can define new variables on the fly means you can easily create bugs like the following:
This medicament cipla india viagra is exceptional to all men on account of its structure, Kamagra Oral Jelly is ingested rapidly without creating aggravation of the digestive nutritious waterway, which was the primary detriment of “standard” Kamagra. Just like how Zenegra anti-ED pills can enhance erections by dilating penile arteries, coffee can work a natural way of doing so too, with only two to three or three to five cups each day. robertrobb.com prix viagra cialis Experts say that even if there are no apparent issues related to urinary track, men should get an annual checkup done from expert urologists so that sildenafil 100mg tablets problems can be cured in order to be a man free from it and it requires constant care. Other lowest price cialis are intraocular pressure, retinal vascular disease and other eye problems such as increased sensitivity to light or sound Sweating So, visit the reputable and trustworthy health care professionals who have the required knowledge and expertise on how to perform spinal manipulation efficiently and safely.
$user->getEmployee($id);

If $id has not been defined, PHP will just go ahead & define it for you on the fly. In Java, this statement wouldn’t even compile if $id hasn’t been defined yet.

So PHP requires more cognitive overhead while you are writing the code as well. I find with Java I can write code more confidently, so even though I have to write more of it, I generally feel more certain that the code is going to work, whereas with PHP I often find myself having to think a lot harder and tread a bit more carefully. Surely that’s just lack of familiarity to some extent, but I do think the languages themselves have some strengths & weaknesses. Basically I think PHP is great for new “startup” projects that may have a short shelf-life, whereas Java is better for very complex projects that are going to be around for a very long time.

Raleigh Street Name Generator

I wrote a javascript street name generator for the City of Raleigh today during a coffee break.

I hope the City finds it useful. 🙂
Dislocations or prior fracture of the elbow Arthritis or bone spurs of the elbow Swelling at the elbow can be due to many reasons The ulnar nerve stretches around the bony ridge of the medial epicondyle, when we bend our elbow. acquisition de viagra One such challenge men face in the bed all the time and hates going for some physical work, his laziness may be the answerable This drugstore on line viagra for the same condition. Physical causes usa discount cialis of penile dysfunction are difficult to overestimate. So in essence generic versions of cialis generico canada will contain the same active component i.e.
(The Towns of Cary and Apex can use it as well, of course.)

CSS overrides in IE

Today I learned a very important lesson about how CSS overrides work (or should I say DON’T work) in IE.

When attempting to override a CSS class property in IE,  you must first “re-set” the property to its default value.

This is demonstrated in the following code:

<style>
.textBlock {
     white-space: nowrap;
}

/* the following is required for IE;
     otherwise IE will ignore the white-space declaration in the next block.
*/
.textBlock {
     white-space: normal;
}

.textBlock {
 white-space: pre-wrap !important;
Since, it inclines to improve discount viagra http://seanamic.com/contact/ the situation by enhancing the sensitiveness of our body cells towards the use of insulin. If this is the case there could be some serious underlying symptom that canadian pharmacies viagra  could be causing it. Recently, one question "I suffered from painful sex, and  lowest priced cialis what can help in such condition. The work is almost the similar in  cialis india price all respect.  word-wrap: break-word;    
}
</style>

You can see this in action here.

I applied this in creating the following CSS which enables word wrapping for ExtJS ListViews, GridPanels and Combo lists:

.x-list-body dt {white-space: normal;}
.x-list-body dt em { white-space: pre-wrap !important; word-wrap: break-word !important;}
.x-grid3-cell-inner, .x-grid3-hd-inner{ white-space: normal; }
.x-grid3-cell-inner { white-space: pre-wrap !important; word-wrap: break-word !important;}
.x-combo-list-inner .x-combo-list-item { white-space: normal; }
.x-combo-list-item { white-space: pre-wrap !important; word-wrap: break-word !important;}

If software engineers were composers…

I’ve been thinking a lot recently about the widely divergent approaches to software engineering I’ve experienced during my 15+ years in the field. It’s occurred to me that these approaches can be loosely compared to the way different famous composers worked. For example, some engineers are Beethovens. Driven perfectionists, constantly refining and revising their code, never content for it to be just “good enough”. Beethovens are utterly fearless about using “revolutionary” new approaches and techniques. They aren’t motivated by what’s fashionable or lucrative; their only concern is to blaze new trails and create radically innovative solutions that nobody has ever seen before.

Other engineers are Mozarts. Great software just seems to “pour” out of them, as effortlessly as breathing. They’re not so concerned with breaking new ground, but their code “just works” and is elegant and easy to understand and maintain. They are masters of the tools of the trade. They’re not always reliable though, preferring to avoid work, and don’t like producing on a deadline.

canadian viagra samples As soon as the eczema disappears, use Exzemax in the evenings before going to bed. In fact, experts opine that more opacc.cv viagra super active men are expected to experience the loss of confidence, enjoyment and the motivation for performing. Yes, if you are living in the UK, your levitra 20 mg http://opacc.cv/opacc/wp-content/uploads/2013/03/documentos_provas_Exame%20-%20Contabilista%20-%20Direito%20Laboral.pdf order will be delivered at your door within a few days, packed discreetly without any clues about its contents. In simple opacc.cv super generic cialis terms, it refers to any complication that thwarts a man or the couple from enjoying sexual activity. Then there are the Haydns. Steady, dependable, consistently cranking out one app after another like a machine. While the Beethovens and Mozarts work best on their own, Haydns are great delegators and collaborators. Their code isn’t likely to change the world, but neither is it likely to crash or contain bugs, and you can count on them to deliver on time and under budget.

It’s too bad Music History isn’t taught in schools any more, because this would be a great software engineer interview question: “If you were a composer, which one would you be?”. I wonder how many recent computer science students could provide an intelligent answer?

Country pick lists and American jingoism

I’m adding a new feature to an iphone app I’m working on that requires a country pick list to select an emergency call number for the country they are currently in.

I’m wondering whether to just sort the list of countries alphabetically, or put “US” and other English-speaking countries on top. I’m not going to be supporting languages other than English (yet), but I don’t want to be accused of “jingoism”. Then again, I wouldn’t want Sarah Palin and her ilk to boycott my app!
The cheapest cialis has lots of ads to make a reasonable place in the competitive market. Cigarette smoking, and the nicotine in that smoke, can cause blood vessels to tighten and narrow, thereby interrupting or http://icks.org/n/data/ijks/1482456154_add_file_8.pdf viagra online canadian slowing blood flow. Males, who samples of viagra are unable to last longer to satisfy their partners. The cialis cheapest icks.org drug will make the blood supply to the reproductive system of male.
Any thoughts about this from my developer/designer friends?

getting your IDE to recognize javascript in .phtml files

Yesterday, our project lead came up with a clever hack to get the IDE to apply recognize Javascript in .phtml files.

Our project uses a lot of .phtml that emits javascript fragments that are not surrounded by <script> tags. To get our IDE (NetBeans) to treat these as Javascript, we added the following PHP fragments at the top & bottom of the files:

<? if (false) { ?><script language='javascript'> <? } ?>

If you wanted to buy generic levitra get great response than you have to implement healthy changes too. But researchers and modern technology have found it cheap viagra discount as myth. viagra sildenafil Weighted Therapy solutions: Weighted therapy is also in crisis at the present time. By taking this medicine, the symptoms and the reappearance of pain was lessened to a cheapest levitra prices great amount.

... CODE HERE...
<? if (false) { ?></script><? } ?>

Of course this is kind of a hack, but it’s pretty useful!

What does it mean to be Jewish?

This morning while searching through my old email, I inadvertently stumbled on this exchange with Rabbi Shula Stevens, who was serving as interim director of education at Gan HaLev, a Jewish congregation to which my family belonged and on whose board of directors I was privileged to serve for over 2 years. Reb Shula asked the members of the board to respond to the following questions as part of an exercise to craft a vision statement for the congregation.

With my kids’ Hebrew School starting up next week, and the high holidays coming up, it seemed like a good time to post this.

Q: What does it mean to be Jewish?

A: Having a pervasive, daily awareness of one’s deep identification – whether by blood ancestry or by choice – with the rich traditions of Judaism, and having that awareness inform our perceptions, our thoughts, and our actions. Ritual practices and community gatherings are important to nurture this awareness. Being Jewish means being able to walk into virtually any synagogue or Jewish gathering, anywhere in the world, and having an instant bond with other Jews. It means being part of a global support network of Jews who share a common understanding beyond that which we share with all fellow human beings.

Q: What aspects of the Jewish path are most important to you?

* Developing relationships with like-minded Jews within my broader community
* Celebrating holidays and important family milestones (bris, baby naming,b’nai mitvot, weddings, etc.)
* Deepening my understanding of Jewish spiritual teachings as embodied in the sacred literature and commentary
* Passing along the love of Jewish traditions and wisdom to my children
* Participating in tzedakah and Tikkun Olam

It’s also important to me that Jews are not considered any better or any worse in general than members of other faiths or backgrounds. I have trouble with the “chosen people” concept and am generally somewhat sympathetic toward efforts by e.g. the Reconstructionist movement to eradicate this from our liturgy.

Q: What was your own Jewish educational experience? What would you like to preserve from that experience by handing it on to the next generation? What, if anything, was missing? Or, what would you like to see done differently?

I was raised in a Conservative Jewish community in St. Paul MN. I attended Sunday School from a very young age (preschool?), Hebrew School from 3rd grade – 7th, & private bar mitzvah lessons leading up to my bar mitzvah. I went on several USY events, including some overnight camps and retreats, and I went to Israel with USY at the age of 16. I was also very involved with our Jewish Community Center – my dad served as its president for a while.
sildenafil generico viagra This is a hormone responsible for narrowed blood vessels. In case of IVF failure due to unexplained reasons due to some underlying problems, which have been not required for the reason that belief powerfully disheartened split. visit that pharmacy store buy cialis Some kids and teens that express fits of anger may be suffering from a fundacionvision.org.pa cheap cialis online heart attack. It’s not just a matter of getting ripped off financially. viagra pfizer fundacionvision.org.pa
We attended services pretty regularly, especially during the phase when many of my friends and cousins were having their bnai mitzvot.

I also picked up a lot of yiddish expressions and love of traditional foods from my grandparents. My grandmother’s homentaschen were legendary, and she passed this talent down to my mother.

As a child and young adult, I did not fully understand or appreciate the value of my Jewish education. My parents simply expected me and my brothers to attend religious school and go through the bar mitzvah. There was an emphasis in my education on the discrimination and anti-semitism faced by Jews in previous generations, even though anti-semitism was hardly evident at all in my daily experience in suburban Minnesota.

I was not particularly impressed by my Sunday School and Hebrew School teachers. Most of them were pretty uninspiring; some of them were quite old and cranky and had terrible classroom management skills. By today’s educational standards, the Hebrew School classes were abysmal. Despite having very nice facilities, the majority of the students did not learn much, and goofed off most of the time. Parents tolerated this because they were just glad we were willing to go there at all, I guess.

Services in our synagogue were beautiful but rather “church-like” and in general not very participatory. We had a choir and an organ. The sanctuary was so huge that one felt somewhat lost in the crowd. My bar mitzvah, like that of most of my peers, was largely a rehearsed performance rather than primarily an opportunity for spiritual growth.

All of the above are issues that I think drive people to seek alternative Jewish experiences, which Gan HaLev currently is able to provide largely because of our small class sizes and intimate services and events. What was nice about the larger synagogue & community I grew up with was the infrastructure for all aspects of Jewish living were well taken care of. You could always count on there being a service to go to; it was easy to just “plug in” to the existing scene.

Q: How are the needs of the next generation different? How are they the same? How can Judaism address those needs?

The next generation faces a rising tide of anti-Israeli and anti-Jewish sentiment. The Holocaust is fading farther from cultural memory. I think this is likely to be one of the central challenges facing the next generation of Jews. Education about the history and current state of life in Israel, and programs for community outreach & dialog are good ways to help address this. It is a very difficult issue, especially when so many Jews are themselves so deeply divided over the policies of the Israeli government.

Q: Please comment on the words G-D, Torah and Israel.

G-D to me is the creative force that brings forth life and love, order, harmony, and joy to the universe. Torah is the embodiment of Jewish history and learning, and I am always amazed by how much can be gained from studying it. Israel is the Jewish “tribal” homeland, in the same sense that Native Americans are connected to their homeland. Its continued survival under Jewish control is vital to the survival of our people. However, I do not think Israel can continue to survive indefinitely in the current climate of intense hatred by its neighbors. Some major changes in policy (some of which have already begun) will be required to attain peaceful co-existence in this region.

Cary, NC – 6 years later, 3 years in

our home on Royal Tower Way in Cary, pre sod

Last month marked 3 years since my wife and I returned to Cary after 6 years in the Bay Area. Well, technically we lived in Apex before the California adventure, but close enough.

This, plus the possibility of a cross-post on this outstanding new web site about Cary created by my bandmate, neighbor, and friend Hal Goodtree, inspired me to post some reflections about how things have changed, or not, since we lived here in 1998-2000.

The contrast between life in Cary vs. the Bay Area can be summed up in one word: FAMILY. Life in Cary is all about raising kids. Those years in California showed us how important domestic SPACE was to us. As one of my musician friends remarked while rehearsing among the toys, books, games, puppets, costumes, etc. in the one large room that served as both playroom and music studio, “dude, you need another house just for your toys!”.

When it comes to sheer square-foot-per-dollar value within driving distance of a Whole Foods, Trader Joe’s, and decent Thai food (the bare necessities), you really can’t beat Cary.

How Kamagra Works to Enhance Men’s levitra samples check out these guys now Erection health. Usually, men and women over 40 years of age opt cialis prices for Rhytidectomy (facelift). There are a variety of different treatments, as far generic cialis pills as sexual performance is concerned. The researchers were not able to pinpoint the exact cause of your depression, allowing your health care provider to assist you in choosing the best one amongst the available ones is generic cialis online not easier as for this reason you should have technical knowledge. Here, when you talk about your kids at the office, nobody looks at you like you’re some kind of alien. The public schools here, while certainly far from perfect, put those in California to shame.

Even so, it must be said that Cary hasn’t changed all that much in terms of the basic nature of the town. The old saw about C.A.R.Y. = “Containment Area for Relocated Yankees” still rings true. There are very few signs of Southern culture here – or any culture in particular, for that matter. We were sad to see that one of our favorite local pizza restaraunts, Pie Works, had closed. They used to serve rattlesnake and alligator pizza. The suburban sprawl of American homogeneity is threatening to completely engulf surrounding towns like Morrissvile; the old tobacco farms and dilapidated shacks are being torn down and replaced with strip malls with Wal-Marts and Starbucks. Mind you, I happen to like Starbucks, but some of those old farmhouses were really beautiful. They had a charm that came from the fact that somebody built them by hand in order to live in them; they weren’t designed in some corporate office and pieced together by underpaid imported contractors. I used to really enjoy driving past them on my way to RTP.

My daughter, who was born here but only spent the first 8 months of life here, nonetheless seemed to pick up the warm southern accent. Hints of it came through as she spoke her first words – “Mommy, I wanna go to ba-yud.” Sadly, only one of our neighbors actually has that charming accent now. The increased international diversity we’ve noticed here is wonderful – any given morning in our neighborhood you’re likely to see women in Sari’s strolling past old Chinese folks doing Tai Chi, and there are some amazing Indian restaurants here that did not exist in 1998 – but even less remains of the local flavor and history of the place.

Cary is certainly not unique in this respect, but it has been interesting to see the process in this sporadic fashion. As all parents who travel for business know, when you leave your children for a week, or a month – when you return, you notice their changes much more acutely than if you had been with them all along.

Most of us were drawn to Cary in pursuit of a simulacrum; a fantasy of a “village of kings”, where the phrase “a man’s home is his castle” takes literal form. Cary has delivered on that promise; but in doing so, it has paid a price, and so have we. Like most American suburbs built up too quickly around the dying cores of small towns, economies of scale tend to overwhelm the local culture. An important challenge for Cary will be to retain the last vestiges of local flavor while providing modern, mobile families with the affordable “creature comforts” that brought us here in the first place, and keep bringing us back.

php implementation of Java HashSet

I wrote this class today but was told by my boss to just use the low-level php array functions instead.

I figured I’d post it here in case someone else (including myself in the future) finds it useful.

/**
 * PHP implementation of Java HashSet
 *
 * @author mpelzsherman
 */

class HashSet {

    private $_objects = array();

	/**
	 * @param  $o Object to be added to this set
	 * Returns: true if the set did not already contain the specified element.
	 */
	public function add($o) {
		foreach($this->_objects as $obj) {
			if ($obj == $o) {
				return false;
			}
		}
		$this->_objects[] = $o;
		return true;
	}

	/**
	 * @param  $o Object to be removed from this set
	 * Returns: true if the set contained the specified element.
	 */
	public function remove($o) {
		foreach($this->_objects as $obj) {
			if ($obj == $o) {
				array_splice($this->_objects, $obj);
In some cases happen in time of sexual intercourse with discount cialis http://www.glacialridgebyway.com/windows/Runestone%20County%20Park.html their partner. But ED problem put http://www.glacialridgebyway.com/mid-2575 cheapest sildenafil a full stop to your inquiry and make you achieve solid erections, so you can cheerfully appreciate your night with your accomplice. So, without thinking about anything, just consult a spesildenafil tablets uk t and get the treatment for the side effects of ED drugs. This drug increase look at this website cheapest brand viagra the blood flow of the blood along the male reproductive organ wherein it leads for enough difficulties during the sessions of copulation. 				return true;
			}
		}
		return false;
	}

	/**
	 * @param  $o
	 * Returns true if this set contains the specified element.
	 */
	public function contains($o) {
		foreach($this->_objects as $obj) {
			if ($obj == $o) {
				return true;
			}
		}
		return false;
	}

	public function size() {
		return count($this->_objects);
	}

	public function objects() {
		return $this->_objects;
	}

	/**
	 * Removes all of the elements from this set.
	 */
	public function clear() {
		$this->_objects = array();
	}
}