New Year, New Post
I'd like to say that I have an excuse for not posting in months, and I do
. Unfortunately, I can't announce it for another two months, but it's fairly huge, and something that anyone in mobile development will be more than excited for.
Now that you are excited and can't wait for me to spill the beans, I will distract you with links to some incredibly cool things that you should know about a la LinkPost style (yeah, I'm a little cruel sometimes).
Google I/O 2012 is in JUNE and it's THREE DAYS! June 27-29th 2012 - Check the official blog post for details.
Using CSS3 to animate web banners (annoying yes, but the geek factor is off the grid!... yeah, bad and wicked late tron joke) - Check out this page and learn about it.
Knifeparty is ridiculously awesome if you likes the dub(ub-wub-wuuuuub-wub-ub-ubuwub)step! They released a free EP called 100% No Modern Talking which can be yours by visiting their website and giving them an email to spam (that requires no validation...). There is some language on "Internet Friends", but to each their own. In case you wondered, Knifeparty is two members of the freakishly awesome band pendulum, so you know they are good.
Derezzed on floppy drives... Man why did we kill these things? analog tech has such a good sound!
A post from WebResourcesDepot on the CSS3 presentation machine named impress.js, I love the trade-shows lately that give their presentations inside of a browser. Just makes powerpoint look as dated as it is. Amazing work, check it out.
Now that I work on a mac I have learned that life without XAMPP sucks. MAMP is workable, but I have an aversion to forking out money to access the apache server that is built into OSX. Luckily there is a much cooler alternative that isn't nagware and that will help you auto-install tons of webapps (including joomla and wordpress). Check out AMPPS, easy, free, and works on linux, mac, and windows. Good News! @blender has pointed out in the comments that XAMPP is totally mac ready and available, check it out and live life happy again!
I hate to glom onto other talent, but another post from webresourcesdepot is right up there on the awesome charts. Everything you need for node.js (my new favorite scripty server language). Go to his node.js post, revel in his links, built something useless, then something cool, and then something useful
That's all for now, but there are plenty more. Over at CSS-Tricks Chris has started a new podcast called ShopTalk, and they have already interviewed the Johnathon Snook (if you don't know of Mr. Snooks work, you need to leave right now and Google it. I don't even mind, I give you my permission, go, go now and do it!). Head over to the podcast and listen to it, remember they take questions and answer them so if you are stumped, give it a go and see if your question can get solved by some truly great minds on the web.
Lastly, HAPPY BIRTHDAY/ANNIVERSARY E-COM DEVBLOG! That's right, this makes year number 4 of me and my crew wrecking the internet and putting it back together the way it was meant to be with tips, links, tutorials, and the occasional waste of time. It's been a great four years and I hope that we can keep the magic going for another four. Hang out because I have a feeling that this year is going to be one of the best years the internet has ever seen. And don't worry about that Mayan 2012 thing, I heard it straight from the aliens that abducted Elvis to make him their ruler, it's a total hoax
Print This Post
Google I/O 2011
This post is mostly an announcement, but I thought I'd take a minute and share with everyone that Google is doing something great this year. Rather just have a few sessions recorded and a few slides to share a week or two after the Google I/O show this year, they will be offering some of the sessions live. Click the badge below to learn more, and on May 10th and 11th use it to watch the show!
This means you get to watch the show even if you were not able to come to the event. To see what sessions will streamed live check out the session schedule and look for the LIVESTREAMED text and video icon. Some entertainment will also be streamed (Jane's Addiction performance anyone?)
If you are going to the show and want to meet up, feel free to find me
. During lunch there is a high probability that I will be in the developers sandbox at the iFit Live booth.
Print This Post
A Few Tips on Avoiding Online Scams
This may be a little out of the norm for the dev blog but I think it's worth mentioning.
I got a call from a cousin of mine today asking me about a work from home website she was considering. She wanted me to look into it for her, so she emailed me the link. When I clicked on the link my browser couldn't find the url. I tried again, nothing. Again only this time I removed all query strings and went to just the home link of the url...still nothing. So I waited an hour or so, only to come back and get nothing. The following is my email response to my cousin.
I still can't get a page to load from this link, and googles link doesn't work either. That makes me a little nervous about this one, it's not uncommon to have a website up to take credit card transactions and then down a day or two later like it never existed. Only instead of $98 they got away with your credit card info. A few things to look for when paying online:
1) is the site secure? you can tell this by looking for an https in the address bar of the browser (i.e. https://www.site.com) the 's' is the important part, it literally means secure. But just because the 's' is there doesn't mean it's really secure. look for a padlock type image in the bottom right corner of your browser or sometimes it appears in the url bar as well (I think Internet Explorer puts it in the bottom right corner but I could be wrong) if the lock is unlocked or broken your connection is not secure. DO NOT process an account transaction over an unsecured line even if you trust the company. The reason is your information is sent over the internet in plain text and vulnerable to any sniffer out there. A secure line will encrypt your data and decrypt it when it arrives at it's destination.
2) Only shop at well known trusted sites. if you are not familiar with a particular site it's a good idea to Google it, check bbb.com for info on them and if your gut tells you "bad idea" follow it.
3) Never respond to Phishing emails, these are emails designed to get you to give up personal information. An example is something from a bank maybe you have an account and maybe you don't but they'll ask you to verify your account number via email. NEVER communicate with any financial institution through email if you are sending sensitive data. If you get this type of email from an institution you have a relationship with, call them first using a number from their website (Google it) or on your checkbook or credit card.
When it comes to work at home jobs I'm not really an expert but I do know there are a lot of scams out there. Some are just after $100 a person and there are a lot of people who will risk that, but more than likely if this site isn't up again by tomorrow (and my bet is it won't be) they were trying to harvest credit card numbers. Generally speaking, if it's something as easy as copy and paste links, or stuffing envelopes, or comes with a guarantee or promises instant wealth it's a scam. A monkey can be taught to copy and paste, and nobody can guarantee a job, even the top colleges don't claim that.
As far as certifications go, there are a lot out there, the best approach would be to do some research on the certification, is it legitimate? Is there a market for it? Most Certifications are printed on an 8x11 piece of card-stock paper, anyone can fake one on almost any printer, they might even have you print it yourself (which tells me they don't take their own certification seriously).
Print This Post
Site changes
A quick note, I've been playing with themes lately (I keep telling myself that I'm going to actually code one, but it never happens) so keep that in mind if the site keeps changing on you. I'm just trying to find a style that is pleasing to the eye, and works well for most visitors.
Print This Post
Configuration is frozen
While in your Java development journey, if you find yourself getting an Error 500 NullPointerException and your console shows "IllegalStateException: Configuration is frozen", you could be the victim of what I experienced this week.
I wanted my forwarding to actually redirect to a new action so that the decorator would be applied to the new action instead of the current one, so I tried this approach:
forward = mapping.findForward("blahblah"); forward.setRedirect(true); |
This doesn't work. The reason is because the forward that you are using is defined in the struts config file, so you are attempting to modify an existing forward. This is not what you want to do because it will affect ALL future uses of that forward, hence the error. Here is the correct way to accomplish this:
forward = new ActionForward(mapping.findForward("blahblah")); forward.setRedirect(true); |
UPDATE: An astute reader pointed out that this is probably only an issue if you haven't set redirect="true" in your struts config, and that you should always set redirect to true if you are forwarding to another action anyway. Good catch Casey!
Print This Post
jQuery Random Color Changer
So I had a lot of time on my hands today, and we were trying to figure out a good color palette for one of our customer service portals. Since I'm not in the least bit a designer we decided to wait for one of the Graphic Designers to take a stab at it, only problem with that is they were out to lunch. So someone gave me the idea to play around with the colors and make them change from time to time. I wasn't feeling particularly ambitious so I scoured the internet for a good jquery solution to randomly select colors and change background colors based on those that were randomly generated.
below is what I came up with:
/* -- jQuery Colourific */ /* -- v 1.0 - January 2008 */ /* -- by ben watts (http://www.benwatts.ca/sandbox/jquery-colourific/) */ //$(document).ready $(function(){ setupColourific(); }); // setupColourific function setupColourific(){ var elements = new Array(); elements[0] = $("td.Upload"); // the element that's changing elements[1] = $("td.Notes"); elements[2] = $("td.LoanTitle"); elements[3] = $("td.hdr"); elements[4] = $("body#body"); for(i = 0; i < elements.length; i++){ changeColour(elements[i]); } window.setInterval( function(){changeColour(elements[0]);}, 1000); window.setInterval( function(){changeColour(elements[1]);}, 1500); window.setInterval( function(){changeColour(elements[2]);}, 2000); window.setInterval( function(){changeColour(elements[3]);}, 2500); window.setInterval( function(){changeColour(elements[4]);}, 3000); } // changeColour function changeColour(e){ // random values between 0 and 255, these are the 3 colour values var r = Math.floor(Math.random()*256); var g = Math.floor(Math.random()*256); var b = Math.floor(Math.random()*256); // puts the hex value inside this element (e is a jquery object) //e.text(getHex(r,g,b)); // change the text colour of this element e.css("background-color", getHex(r,g,b)).fadeIn(); } // intToHex() function intToHex(n){ n = n.toString(16); // eg: #0099ff. without this check, it would output #099ff if( n.length < 2) n = "0"+n; return n; } // getHex() // shorter code for outputing the whole hex value function getHex(r, g, b){ return '#'+intToHex(r)+intToHex(g)+intToHex(b); } |
Obviously you'll need to change the selectors to something relevant for your purposes. It's probably not something you want to use on a regular basis but would make a great april fools day joke, or if you feel like a ceasure go ahead and mess with the time interval.
I can't take full credit for this script, the original can be found at This site
Print This Post
Handy PHP trick I learned today.
Nice to see the Dev blog is still here, and that I can remember my login. Here is a useful debugging trick I learned for PHP, hopefully it's not in one of Phil's link posts.
echo '<pre>'.print_r($app,true).'</pre>';
this bad boy will give you all of the values of an array, variable etc.
more to come soon.
Print This Post
Happy New Year – We’re two years old!
Hard to believe, but the E-com DevBlog is now over two years old. Time sure has flown and we are now reaching out to developers all over the globe. I started this blog with one of my co-workers so we could keep track of what we learned and hopefully pass it on to others. It has slowly evolved into a little bit of knowledge passing, and a monthly/bi-monthly/quarterly posting of useful weblinks (yes I know I haven't posted Novembers LinkPost, or the December one.. it's coming! I promise!).
In the spirit of keeping new useful things coming, and in the hope of a great year, I have completed an Adobe Air app called "VidCalc". Basically it's a tool to help you figure out video ratios (so you don't skew them when you try to resize), the file size of a constant bitrate encoded movie, and how long it will take to send a file down the pipe. I could explain it in greater detail, but you should probably go check out the project page to find out for yourself.
Have a great new year!
Print This Post
Flash Testing with FlashSwitcher
While working on launching a new site I suddenly realized that I didn't have a vm or extra compy around without flash installed. Yes I could have just changed the swfobject params to a higher version of flash to see what my error message would look like, but I was wondering if there were any good plugins or 'quick-fix' tools to use for testing various versions of flash on a page. That's how I stumbled onto Sephiroth's FlashSwitcher plugin for firefox.
Flash Switcher in Firefox Tray - (with my other tools
)
The plugin is fairly huge (14mb) but it makes sense as he's cramming 3 version of flash for 3 different operating systems in it. What it does is puts a little flash logo in the bottom right of your window. When left-clicked it shows you other versions of flash that you can test with (9.0 r124, 8.0 r24, or 7.0 r63). If you click on one, it will remove the currently installed version of flash and install the one you clicked on. IMPORTANT! before you click on one of the flash versions in the menu, use the sub-menu to "Save as..." your current version or it will be removed and you'll have to go download it and install it again. Once you've "Saved as..." it will keep your current version and list it with the others.

Flash Switcher with sub-menu active
Hopefully this will be useful to those of you playing with various versions of flash, or if you want to do a test for users without flash (just click remove to uninstall flash from your browser).
Print This Post
Uploading Files in an Apache Axis Webservice
Being somewhat new to the Apache Axis webservice world, I've been looking for a solution on how to upload a file via the webservice. I found some MIME and DIME formats and there was even some cool looking technologies about MTOM (see here).
In the end the simple answer I found, on the same page linked to above, was to encode the file as a Base64 string and put it in the request like a normal string. Then on the service side it is simply decoded.
For example:
On the client side:
String base64Encoding = Base64.encode(byteArrayFromFile); . . . //In the XML request .append("<ns1:encodedFile>") .append(base64Encoding) .append("</ns1:encodedFile>") |
And then in the service:
String base64String = request.getEncodedFile(); byte[] byteArray = Base64.decode(base64String); |
And then with the byteArray you can save it or do whatever you need.
Print This Post