snovak's blog

RegEx for CSS

I've spent a good amount of time on code refactoring over a large code base.

Maybe for the future I will code up a RegEx generator to help search for all (or obvious) occurances of CSS patterns.  For now, I will just start posting helpful RegEx here: 

For instance, doing a code review, and I'm trying to find all occurrences of this rule (below) in our JSP code base, which is huge. 

#error .moduleStructContent .errorHeader {float:none}

You should try to run this in Eclipse (Ctrl+H) make sure your narrow your search as much as possible using file name patterns in this case I'm searching JSPs (*.jsp) or alternatively (*.js*) if you want to include your .js code as well.


Maybe this is not the most elegant solution. But, for right now, it's working. I'll try to find something later that will return more accurate results.


This will at least give you a good place to start testing any occurance of this rule. 

This is a cool tool to help construct your RegEx.  It came in useful to remind me of the [\s\S]*, which matches any character or whitespace across multiple lines, which is key for this sort of search. 

A Shift in Education

With the birth of my daughter right around the corner, I have been thinking a lot about her education.  And, I am very much in the favor of a home school education.  Well.. that's not completely accurate.  I am very much in favor of an internet based education.  The location of the delivery is still in the air.  

In my own experience, I have witnessed the meaning of a college degree in today's economy.  There is a certain prestige of having an expensive piece of paper that you've earned through hardwork and perseverence.  But, more and more, I am seeing the "success" market (as opposed to the "job" market) seeking out individuals who have achieved rather than simply learned.  With the constantly maturing internet economy, I think there is an inevitable shift pending in education.  In fact, I think the shift is in mid swing.  Technology and the internet has revolutionized so much already in many aspects of business.  Elements of education have already shifted from text book education to video education, to the inevitable computerized learning systems.  

The entertainment systems of the world have ben extremely sucessful over the years.  Entertainers have studied the human psycology of... well.... entertainment; how to captivate, how to amuse, and how to motivate.... etc.  And, entertainment has been a valuable tool to communicate various messages, ideas, and dispositions very effectively.  It is high time that main stream educators utilized the currently available technologies, and strategies available, including entertainment, to educate our children.  

The Khan Academy

A good introduction to the Khan Academy can be found in Salman Khan's TED Talk.  The main element of the Khan Academy that impresses me is their linear lesson system.  This is a system that allows the student to progress at their own rate.  If you browse to ~7:50 of Khan's Talk he elaborates on the point. (go ahead, I'll wait).  

So, my proposal for the world, should you choose to accept it is, why not use the Khan Academy system now?  OR, create something like it?  It will get better over time.  Make a Wiki sort of system out of it.  Let people contribute.  As proven with Wikipedia, people will show up.  

There and back again.


Ahhh yes,, hopefully this will the first post in a long line of honest, to myself at least, blog entries where I will share with you the fruitlessness of my labours for the past 10 years.  Fruitlessness in that I don't make much money.  In fact, I'm flat broke.  And, I'm not that happy, mostly because I'm tired of being broke. This is going to be an account of how I get out of my current reality an into a life that I will create for myself. If I have nothing else, I have optimism.  

I've spent a lot of time getting to where I am right now, which as I just stated is not very far at all.  I have a lot of knowledge.  I'm revered as a fairly smart guy, with an Masters of Fine Art in Computer Animation.  I'm a less than part time leader of a local chapter of a world wide special interest group for computer graphics (SIGGRAPH), to which I've donated a mind numbing amount of time.  All to find out that I've been following a path to a dead end.  For me at least.  I could probably move away from my home town, which I've lived in since I was 2, and persue a giant video game or motion picture company.  Once there, I would sit in a dark room and proceed to put all of that knowledge that I've worked up over the years and work my life away.  Yeah, the pay would be pretty good, in few cases (ref Digital Domain Stereoscopic dept interview).  But, after you get over the glam of being a part of the awesomeness which is a major videogame or major motion picture where you were enevitably the lead pebble texture artist, you realize that you're working really hard all the time, your life is largely dictated by insane crunch time schedules, and (your life) is largely not your own.  

I realized that that is not where I want to be.  So, I fell back on my stand-by ability as a web designer and developer.  This I do really well too, and my computer animation ability sometimes folds into my freelance jobs on the web.  Perfect!......... No, not so much.  Turns out I'm not that great of a business man.  My ability to negotiate the price that my work is worth is terrible.  For some reason it's difficult to rationalize the worth of multiple years of design study, degrees, and experience when some dude in pakistan can undercut you by 90%.  Hmm.. go figure.  I could make a business of web development contracting and consulting.  But really, how long will it last until all freelance or small time web development is outsourced to 3rd world countries?  Probably not long.  Furthermore, I'll never really be happy creating brands and web sites for other people.  What I do for them is not my creation.  It's an abomination of someone else's will guiding my ability.  Moving on.   

Well here I am, an ant fart's distance from being flat broke with all the ambition in the world.  If that's all I need, I'm set.   I realize that to find happiness in what I do, I'm going to have to create something tailored to that which I'm passionate about.  One problem is though, I have a lot of passion for a lot of different disciplines.  But, the common thread in all of them, they have to do with creativity and enginuity.  Computer Graphics, Programming, Web Technology, Web Marketing, Design, Engineering, I can't seem to get enough of it all.  The trick is going to be the molding of all of that interest into something that will turn a profit.  

Before I was REALLY a computer geek.  I was a car geek.  I loved the machines.  I was really into performance, tuning, tweaking, upgrading, swapping engines.  That was my thing, engine swaps, or putting hopped up engines in more modest vehicles.   My favorite was a truck that I drove in high school, which I lovingly named the MUT, as she was largely a sum of her parts.  It was an 84 GMC S-15 extra-cab long bed, with a Buick Grand National intercooled turbo charged engine swapped in.  Dropped on coil overs and ladder bars, a narrowed Ford 9 inch rear end and wide low profile tires on the back.  I remember 205-50-15 would barely stretch across those rear wheels.  Oh, it was tubbed too.  In side, there were nice two tone leather seats from a Mustang.  It was clean, long story short, she was bad!  I had my week days devided in half between high school and technical school.  I went to McFatter Vocational/Technical for Automotive Technology.  I was still younger than 18 so I lied about my age to get a job at a local garage, changing tires.  

I also worked for a stint at DiabloSport in Boca Raton, doing technical support.  DiabloSport makes tuning products for all Ford vehicles, including Dodge Diesels, at the time.  They now make a product to reflash Chevy vehicles.  Working at Diablo, I met the head engine tuner, Pat Stajdel.  Pat has since left DiabloSport to build his own brand of tuning products at Sniper Inc.  Over the years we largely lost touch.  That is, until I decided to ask Pat to make me a dealer of Sniper products.  Short story short, he agreed.  And, I'm stoked about bringing all of the ability that I've gained over the years back into the automotive field.  I feel I'm getting closer to that ultimate goal, the marriage of all of my interest and ability into the mutant love of my life, my work. 

So, in a way, I've come full circle.  At the beginning of the trip around is my new business,  MPG Labs.


Subscribe to RSS - snovak's blog