<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>josh is gross</title>
	<atom:link href="http://www.joshisgross.com/blog/feed" rel="self" type="application/rss+xml" />
	<link>http://www.joshisgross.com/blog</link>
	<description>there is no tagline</description>
	<lastBuildDate>Wed, 01 Sep 2010 10:45:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>My latest project: TwitterTranslate</title>
		<link>http://www.joshisgross.com/blog/my-latest-project-twittertranslate</link>
		<comments>http://www.joshisgross.com/blog/my-latest-project-twittertranslate#comments</comments>
		<pubDate>Tue, 24 Aug 2010 07:37:50 +0000</pubDate>
		<dc:creator>Joshua Gross</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1224</guid>
		<description><![CDATA[Tonight I made this little Safari 5 extension: TwitterTranslate Pretty simple &#8211; it finds any foreign tweets on your Twitter feed and translates them to English, or Spanish, or Japanese, or whatever your native language is. Enjoy! Tweet]]></description>
			<content:encoded><![CDATA[<p>Tonight I made this little Safari 5 extension: <a href='http://www.joshisgross.com/blog/TwitterTranslate' >TwitterTranslate</a></p>
<p>Pretty simple &#8211; it finds any foreign tweets on your Twitter feed and translates them to English, or Spanish, or Japanese, or whatever your native language is. Enjoy!
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/my-latest-project-twittertranslate" data-related="DanTaylorSEO" data-text="My latest project: TwitterTranslate" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/my-latest-project-twittertranslate/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>India to monitor BlackBerry messages</title>
		<link>http://www.joshisgross.com/blog/india-to-monitor-blackberry-messages</link>
		<comments>http://www.joshisgross.com/blog/india-to-monitor-blackberry-messages#comments</comments>
		<pubDate>Fri, 13 Aug 2010 18:04:08 +0000</pubDate>
		<dc:creator>Joshua Gross</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1203</guid>
		<description><![CDATA[As expected, more governments are jumping on the BlackBerry-monitoring bandwagon. The latest to join the craze is India, which has set an August 31 deadline for RIM to &#8220;provide technical solutions that will allow security agencies to monitor the company&#8217;s &#8230; <a href="http://www.joshisgross.com/blog/india-to-monitor-blackberry-messages">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.joshisgross.com/blog/a-chink-in-rims-armor">As expected</a>, more governments are jumping on the BlackBerry-monitoring bandwagon. The latest to join the craze is India, <a href="http://online.wsj.com/article/SB10001424052748703960004575427312899373090.html?mod=googlenews_wsj">which has set an August 31 deadline</a> for RIM to &#8220;provide technical solutions that will allow security agencies to monitor the company&#8217;s BlackBerry corporate email and messenger services.&#8221;
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/india-to-monitor-blackberry-messages" data-related="DanTaylorSEO" data-text="India to monitor BlackBerry messages" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/india-to-monitor-blackberry-messages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A chink in RIM&#8217;s armor</title>
		<link>http://www.joshisgross.com/blog/a-chink-in-rims-armor</link>
		<comments>http://www.joshisgross.com/blog/a-chink-in-rims-armor#comments</comments>
		<pubDate>Thu, 12 Aug 2010 01:19:02 +0000</pubDate>
		<dc:creator>Joshua Gross</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[rim blackberry]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1155</guid>
		<description><![CDATA[The UAE and Saudi Arabia, in remarkably short time, convinced RIM to set up data centers and allow surveillance of BlackBerry Messaging in their nations. India and the United States have been asking for surveillance options for years, but Saudi &#8230; <a href="http://www.joshisgross.com/blog/a-chink-in-rims-armor">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The UAE and Saudi Arabia, in remarkably short time, convinced RIM to set up data centers and allow surveillance of BlackBerry Messaging in their nations. India and the United States have been asking for surveillance options for years, but Saudi Arabia convinced them to set it up within the span of a week. The UAE has a deadline of October 11, that it seems likely, RIM will meet.</p>
<p>RIM has built a reputation of having a very secure network, which is unique for the mobile messaging industry. Messages on the BlackBerry network are encrypted, so even intercepting wireless signals can fail to be effective.  RIM&#8217;s data centers are in Canada and, to the best of my knowledge, even the Canadian and United States governments don&#8217;t have easy access to messages in RIM&#8217;s servers. How did the UAE and Saudi Arabia convince RIM,  so quickly, to give them access to messaging data within their nations?</p>
<blockquote><p>With a relatively small security force, the UAE relies heavily on electronic eavesdropping to monitor for any potentially subversive activities. The Gulf nation has been particularly on edge after a Hamas leader was assassinated in Dubai earlier this year&#8221; &#8211; Tom Peter, <a href="http://www.csmonitor.com/World/Middle-East/2010/0803/BlackBerry-ban-Is-UAE-trying-to-crack-down-on-Dubai-s-wild-ways">Christian Science Monitor</a></p></blockquote>
<p>Since that assassination, the UAE has put pressure on RIM to open up message data for snooping. Supposedly, BlackBerry messaging was involved in the assassination &#8211; but even if it wasn&#8217;t, BlackBerry messaging remains conspicuously absent from the UAE&#8217;s surveillance program, and that&#8217;s making the nation&#8217;s government nervous. </p>
<p>But RIM has, until now, remained consistent and resilient: they <a href="http://www.switched.com/2010/08/04/saudi-arabia-announces-immediate-suspension-of-blackberry-data-s?icid=sphere_blogsmith_inpage_engadget" target="blank">do not give surveillance abilities to one government and not others</a>. Even if they did, they don&#8217;t possess the keys used for encrypting corporate networks. This is reassuring for businesspeople, government officials, and maybe even terrorists who travel internationally and send confidential information over the BlackBerry network. </p>
<p>Until Saudi Arabia called RIM&#8217;s bluff and shut off the BlackBerry network for two hours. RIM quickly conceded and agreed to set up a data center in Saudi Arabia that the government could snoop on. Now RIM has lost their higher ground and they&#8217;ll have to concede to other nations&#8217; demands: UAE wants their own data center to snoop on, India does too, Kuwait wants pornography filtered from the BlackBerry network, and other nations are sure to have demands of their own in the next few weeks.</p>
<p>Most likely, this will just mean headaches for RIM and more overhead operating overseas. They&#8217;ll no longer be able to boast such a secure network, except to corporate users with their own data centers who should be unaffected. But realistically, most BlackBerry users won&#8217;t be affected. Consumers who use it domestically (in the U.S., Canada, Europe, etc) don&#8217;t care about what&#8217;s going on in the UAE or Saudi Arabia or India. Corporate users will be on a corporate server if it matters to them. But now that RIM has caved to the UAE and Saudi Arabia, they will <a href="http://www.ft.com/cms/s/0/8960eb3e-a592-11df-a5b7-00144feabdc0.html" target="blank">have to cave to other nations&#8217; requests too</a>.</p>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/a-chink-in-rims-armor" data-related="DanTaylorSEO" data-text="A chink in RIM&#8217;s armor" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/a-chink-in-rims-armor/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Environmental History of Ladysmith</title>
		<link>http://www.joshisgross.com/blog/environmental-history-of-ladysmith</link>
		<comments>http://www.joshisgross.com/blog/environmental-history-of-ladysmith#comments</comments>
		<pubDate>Tue, 03 Aug 2010 19:31:42 +0000</pubDate>
		<dc:creator>Joshua Gross</dc:creator>
				<category><![CDATA[History]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1142</guid>
		<description><![CDATA[In my Freshman year at UW-Madison I wrote this paper on the environmental history of Ladysmith, WI, my mother&#8217;s hometown. I&#8217;m linking to the PDF here for posterity. Ladysmith, Wisconsin &#8211; Mushroom City Tweet]]></description>
			<content:encoded><![CDATA[<p>In my Freshman year at UW-Madison I wrote this paper on the environmental history of Ladysmith, WI, my mother&#8217;s hometown. I&#8217;m linking to the PDF here for posterity.</p>
<p><a href="http://www.joshisgross.com/downloads/Ladysmith-MushroomCity-JoshuaGross2009.pdf">Ladysmith, Wisconsin &#8211; Mushroom City</a>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/environmental-history-of-ladysmith" data-related="DanTaylorSEO" data-text="Environmental History of Ladysmith" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/environmental-history-of-ladysmith/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iPhone photo and music compression</title>
		<link>http://www.joshisgross.com/blog/iphone-compression</link>
		<comments>http://www.joshisgross.com/blog/iphone-compression#comments</comments>
		<pubDate>Tue, 03 Aug 2010 05:49:19 +0000</pubDate>
		<dc:creator>Joshua Gross</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1134</guid>
		<description><![CDATA[While happily exceeding the bandwidth limit on my 200 MB 3G data plan with AT&#038;T, it occurred to me that a large chunk of that bandwidth has been devoted to uploading photos. I decided to look into if/how the iPhone &#8230; <a href="http://www.joshisgross.com/blog/iphone-compression">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While happily exceeding the bandwidth limit on my 200 MB 3G data plan with AT&#038;T, it occurred to me that a large chunk of that bandwidth has been devoted to uploading photos. I decided to look into if/how the iPhone stores photos and how they&#8217;re compressed, and found some details on music compression along the way. </p>
<p><b>Music compression</b></p>
<p>Over at <a href="http://justanotheriphoneblog.com/wordpress/general/should-you-use-itunes-9-1-to-compress-your-iphones-music-that-depends">Just Another iPhone Blog</a>, <a href="http://twitter.com/ragart">@ragart</a> details the new option in iTunes 9.1 that allows music compression on the iPhone. This is pretty straightforward: it just lowers the bitrate of your music and saves about 40% disk space in the process. You&#8217;ll notice the lower quality if you&#8217;re using decent earbuds, headphones or a stereo setup. </p>
<p><b>Image compression</b></p>
<p>To see how compression works, I did some very informal testing. I uploaded three Photos to MobileMe: one is a portrait indoors, one is a sunset photo, and one is a poster outside. I uploaded them to my MobileMe account and according to MobileMe, the original photos are 2592&#215;1936 pixels and average 1.5 MB each.</p>
<p>The &#8220;actual size&#8221; photos on MobileMe are scaled down to 764&#215;1024 pixels and average 149 KB each. This means that the scaled-down photos are 10% the disk space of the originals. Running <a href="http://freshmeat.net/projects/jpegoptim/">jpegoptim</a> on all the photos resulted in savings of only 2 KB per image, so MobileMe is doing a pretty good job at compression.</p>
<p>Which leads me to this question: Why should I be uploading 1.5 MB photos over 3G when all I&#8217;ll ever be viewing are the scaled-down images at 10% the file size? Other popular services are scaling down too, think Facebook and Twitter image services.</p>
<p>I&#8217;ll post my answer to that question another time. Until then, let me hear your thoughts.</p>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/iphone-compression" data-related="DanTaylorSEO" data-text="iPhone photo and music compression" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/iphone-compression/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iPhone 4 MMS / Group Messaging</title>
		<link>http://www.joshisgross.com/blog/iphone-4-mms-group-messaging</link>
		<comments>http://www.joshisgross.com/blog/iphone-4-mms-group-messaging#comments</comments>
		<pubDate>Sat, 24 Jul 2010 05:18:49 +0000</pubDate>
		<dc:creator>JoshuaGross</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1091</guid>
		<description><![CDATA[I just got an iPhone 4, less than a week ago. It&#8217;s my first iPhone. As a self-described textaholic, I&#8217;ve been having a lot of fun with it. The only trouble I&#8217;ve had texting so far is with MMS and &#8230; <a href="http://www.joshisgross.com/blog/iphone-4-mms-group-messaging">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just got an iPhone 4, less than a week ago. It&#8217;s my first iPhone. As a self-described textaholic, I&#8217;ve been having a lot of fun with it.</p>
<p>The only trouble I&#8217;ve had texting so far is with MMS and group messaging. If you turn on MMS and group messaging, all group messages will be sent as MMS regardless of whether or not they include photos/video/etc. This is because all the recipients are sent along with each text, so if you send a group text to iPhone users, any replies will go to all of the original recipients.</p>
<p>Cool, right? Usually &#8211; but if one of your recipients can&#8217;t receive MMS (probably because of their phone&#8217;s model) they won&#8217;t receive that text at all. Or any replies.</p>
<p>Unless you send texts exclusively to iPhone users, it&#8217;s probably safest to turn MMS on and keep group messaging off.</p>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/iphone-4-mms-group-messaging" data-related="DanTaylorSEO" data-text="iPhone 4 MMS / Group Messaging" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/iphone-4-mms-group-messaging/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Certain Elephant #98</title>
		<link>http://www.joshisgross.com/blog/a-certain-elephant-98</link>
		<comments>http://www.joshisgross.com/blog/a-certain-elephant-98#comments</comments>
		<pubDate>Sat, 17 Jul 2010 18:42:12 +0000</pubDate>
		<dc:creator>JoshuaGross</dc:creator>
				<category><![CDATA[A Certain Elephant]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1088</guid>
		<description><![CDATA[Previous Please rate: Next Updated Sometimes Help me transcribe this comic Tweet]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-10" src="http://www.joshisgross.com/blog/wp-content/uploads/2010/07/Strip-98-Jul-17-2010.png" alt="A Certain Elephant #98: Tina's Sense of Awesome: feeling okay." title="Tina's Sense of Awesome: feeling okay." alt="Tina's Sense of Awesome: feeling okay." /></p>
<div style="position: relative; height: 18px; border-bottom: 1px #eeeeee solid; margin-bottom: 15px;">
<div style="width: 200px; position: absolute; left: 000px; top: 0px;"><a href="http://www.joshisgross.com/blog/a-certain-elephant-97">Previous</a></div>
<div style="width: 200px; height: 100px; position: absolute; left: 200px; top: 0px; text-align: center; overflow: visible;">Please rate: </div>
<div style="width: 200px; height: 100px; position: absolute; left: 250px; top: 0px; text-align: center; overflow: visible;" id="rating_98" class="starbox"></div>
<div style="width: 200px; position: absolute; left: 400px; top: 0px; text-align: right;">Next</div>
</div>
<p>Updated Sometimes</p>
<p><a href="http://www.ohnorobot.com/transcribe.pl?comicid=apQslmIECCGOc1303;title=%2398: Tina%27s+Sense+of+Awesome%3A+feeling+okay.;url=http%3A//www.joshisgross.com/blog/a-certain-elephant-98"><small>Help me transcribe this comic</small></a><br />
  <script language="javascript" type="text/javascript"><!--
		function wasRated98(element, memo)
		{
			new Ajax.Request('wpace-ratings.php?ace_id=98',
				{
					method: "get",
					parameters: memo,
					onComplete: function ()
					{
						//var indicator = event.element().down('.indicator');
						//var restore = indicator.innerHTML;
						//indicator.update('Thanks for voting');
						//window.setTimeout(function() { indicator.update(restore) }, 2000);
					},
					onFailure: function() { alert("bawww2"); }
					// onFailure: function() {alert(
					// onComplete: function() {;}
				}
			);
		}
		new Ajax.Request('wpace-ratings.php?ace_id=98',
			{
				method: "get",
				parameters: "",
				onComplete: function (transport)
				{
					transport.responseText.match(/^([0-9\.]+)\/([0-9\.]+)/);
					var average_rating = parseFloat(RegExp.$1);
					var rating_total = parseFloat(RegExp.$2);
					new Starbox('rating_98', average_rating, { indicator: '#{average} rating from #{total} votes', total: rating_total, onRate: wasRated98});
				},
				onFailure: function() { alert("bawww1"); }
				// onComplete: function() {;}
			}
		);
	//-->
	</script>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/a-certain-elephant-98" data-related="DanTaylorSEO" data-text="A Certain Elephant #98" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/a-certain-elephant-98/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP best practices #1: duplication is evil</title>
		<link>http://www.joshisgross.com/blog/php-best-practices-1-duplication-is-evil</link>
		<comments>http://www.joshisgross.com/blog/php-best-practices-1-duplication-is-evil#comments</comments>
		<pubDate>Mon, 05 Jul 2010 06:15:24 +0000</pubDate>
		<dc:creator>JoshuaGross</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[coding php]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1080</guid>
		<description><![CDATA[I am very opinionated about my code.  The source of most of my opinions is the DRY/DIE principal: Don&#8217;t Repeat Yourself / Duplication Is Evil.   Take, for instance, a Human Resources application I worked on recently. It is a &#8230; <a href="http://www.joshisgross.com/blog/php-best-practices-1-duplication-is-evil">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div>
<p>I am very opinionated about my code.  The source of most of my opinions is the DRY/DIE principal: Don&#8217;t Repeat Yourself / Duplication Is Evil.</p>
<p> </p>
<p>Take, for instance, a Human Resources application I worked on recently. It is a collection of web forms to get information to and from the HR department at work.  I inherited the system and had to make several improvements: form field validation had to be more robust, submitted form data had to be formatted in a prettier way, fields had to be removed/added, etc.</p>
<p>This was a pain. This application was simple &#8211; two forms, less than 50 fields total across each. Total lines of PHP code: 1000 maximum, including comments and HTML. That&#8217;s tiny! And yet, within this tiny code base, information was duplicated <em>at least </em>six times. And it was inconsistent &#8211; each duplicated piece of information told a different, contradictory story about the web form.</p>
<p>This is why I have internalized the DRY/DIE principal. If you stick with this principal from the get-go, applications are much more robust and easier to maintain. Luckily, my story has a happy ending: I ported 90% of it to <a href="http://github.com/JoshuaGross/php-frame">PHP-Frame</a> and modified the forms with time to spare, and even got a few nice cosmetic extras in.</p>
<p>tl;dr for this post: next project you&#8217;re working on, count how many places you duplicate similar information. Try to minimize that number. I reduced it from 6 to 2 in my application (all the form field validation requirements laid out in the application&#8217;s Model; and all the form fields laid out in HTML).  Many methods can be used to avoid (or eliminate, when refactoring) duplicated code and information, including solid framework design (which I have focused on thus far) and using generated code (which I haven&#8217;t delved into very much). Regardless of which path you take: don&#8217;t duplicate <strong>code</strong>, and don&#8217;t duplicate <strong>information</strong>.  Duplication is evil.</p>
<p> </p>
<p>Further reading:</p>
<p><a href="http://en.wikipedia.org/wiki/Rule_of_three_(programming)">Rule three [wikipedia]</a></p>
<p><a href="http://en.wikipedia.org/wiki/Single_Source_of_Truth">Single source of truth [wikipedia]</a></p>
<p><a href="http://en.wikipedia.org/wiki/Don't_repeat_yourself">Don&#8217;t Repeat Yourself [wikipedia]</a></p>
<p><a href="http://en.wikipedia.org/wiki/Separation_of_concerns">Separation of concerns [wikipedia]</a></p>
</div>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/php-best-practices-1-duplication-is-evil" data-related="DanTaylorSEO" data-text="PHP best practices #1: duplication is evil" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/php-best-practices-1-duplication-is-evil/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Best Practices: Introduction</title>
		<link>http://www.joshisgross.com/blog/php-best-practices-introduction</link>
		<comments>http://www.joshisgross.com/blog/php-best-practices-introduction#comments</comments>
		<pubDate>Fri, 02 Jul 2010 06:22:51 +0000</pubDate>
		<dc:creator>JoshuaGross</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1076</guid>
		<description><![CDATA[  I started programming when I was about 12, did so continuously until I was 18, took a couple years off to be a kid again, and recently started programming again seriously (in professional, production, multiple-developer environments). I have a &#8230; <a href="http://www.joshisgross.com/blog/php-best-practices-introduction">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p> </p>
<div id="_mcePaste">I started programming when I was about 12, did so continuously until I was 18, took a couple years off to be a kid again, and recently started programming again seriously (in professional, production, multiple-developer environments).</div>
<p>I have a lot of standards and ideals with programming, but there are also a lot of gaps. This &#8220;best practices&#8221; series will be my attempt to explain every facet of my programming philosophy, and hopefully start a conversation.</p>
<p>I think this conversation is necessary because most code we see on a daily basis is bad &#8211; real bad. It&#8217;s bloated and slow when it works at all. It&#8217;s brittle and doesn&#8217;t like to change. It probably took forever to get the initial product, but it probably needs a LOT of work &#8211; and that&#8217;s unfortunate since it&#8217;s so difficult to change.</p>
<p>I will probably talk a lot about unit testing and MVC. The reason you should read more is because I don&#8217;t like the way those are done now, at all; I think we can do better. The reason I want you to read more is because I know you, as a programmer, are uncomfortable with a lot of what you do. There should be a better way to do things, and I intend to discover it &#8211; with your help.</p>
<p> </p>
<p>So, before I write my next post, a note : any methods I come up with should be general enough to port to other languages. PHP is what I&#8217;m most familiar with, but I don&#8217;t intend to be exclusive.</p>
<p> </p>
<p>Thanks for reading.</p>
<p> </p>
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/php-best-practices-introduction" data-related="DanTaylorSEO" data-text="PHP Best Practices: Introduction" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/php-best-practices-introduction/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fancy command-line alarm for Mac OS X</title>
		<link>http://www.joshisgross.com/blog/fancy-command-line-alarm-for-mac-os-x</link>
		<comments>http://www.joshisgross.com/blog/fancy-command-line-alarm-for-mac-os-x#comments</comments>
		<pubDate>Thu, 01 Jul 2010 05:41:09 +0000</pubDate>
		<dc:creator>JoshuaGross</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.joshisgross.com/blog/?p=1077</guid>
		<description><![CDATA[I have a Calc exam in the morning. Instead of studying for it, I decided to program a command-line alarm for myself so I don&#8217;t sleep through the exam. It doesn&#8217;t help that my phone is MIA and I&#8217;ve never &#8230; <a href="http://www.joshisgross.com/blog/fancy-command-line-alarm-for-mac-os-x">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I have a Calc exam in the morning. Instead of studying for it, I decided to program a command-line alarm for myself so I don&#8217;t sleep through the exam. It doesn&#8217;t help that my phone is MIA and I&#8217;ve never owned a regular alarm clock.</p>
<p>Here:</p>
<p><code><br />
#!/bin/bash<br />
osascript -e 'tell app "iTunes" to pause' > /dev/null<br />
osascript -e "set Volume 3"<br />
say "Wake up, Josh. Time to get out of bed. You have an exam to take."<br />
sleep 5<br />
osascript -e "set Volume 0.5"<br />
osascript -e 'tell app "iTunes" to play playlist "morning music"' > /dev/null<br />
sleep 5<br />
osascript -e "set Volume 1"<br />
sleep 5<br />
osascript -e "set Volume 1.5"<br />
sleep 5<br />
osascript -e "set Volume 2"<br />
sleep 5<br />
osascript -e "set Volume 2.5"<br />
sleep 5<br />
osascript -e "set Volume 3"<br />
</code></p>
<p>Save it in your ~/bin folder, reference it from your crontab, set up a &#8220;Morning music&#8221; playlist in iTunes and customize the wakeup message. Also, the tiered volume is fun but really janky. </p>
<p>And my crontab, IN CASE YOU WONDERED: </p>
<p></code><br />
0 8 * * mon,tue,wed,thu,fri ~/bin/alarm.sh > /dev/null<br />
30 8 * * mon,tue,wed,thu,fri ~/bin/alarm.sh > /dev/null<br />
0 9 * * sat,sun ~/bin/alarm.sh > /dev/null<br />
30 9 * * sat,sun ~/bin/alarm.sh > /dev/null<br />
</code></p>
<p>A snooze feature would be nice, but that can wait.
<div style="display:block;">
<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.joshisgross.com/blog/fancy-command-line-alarm-for-mac-os-x" data-related="DanTaylorSEO" data-text="Fancy command-line alarm for Mac OS X" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.joshisgross.com/blog/fancy-command-line-alarm-for-mac-os-x/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
