<?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>Alex Kaminski&#039;s Blog &#187; Programming</title>
	<atom:link href="http://alexkaminski.org/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexkaminski.org</link>
	<description>Audentes fortuna juvat.</description>
	<lastBuildDate>Wed, 16 Jun 2010 04:37:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>iPhone SDK Tutorial: A Simple &quot;Hello World&quot; Program.</title>
		<link>http://alexkaminski.org/2008/10/iphone-sdk-tutorial-a-simple-hello-world-program/</link>
		<comments>http://alexkaminski.org/2008/10/iphone-sdk-tutorial-a-simple-hello-world-program/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 23:01:22 +0000</pubDate>
		<dc:creator>Alex Kaminski</dc:creator>
				<category><![CDATA[Knowledge]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://alexkaminski.org/?p=61</guid>
		<description><![CDATA[The iPhone SDK is a great platform for developers. It gives developers a great opportunity to reach a huge market of users easily. So, let&#8217;s great started so you can start building your own great apps.  XCode and Objective-C I am assuming most of you have never worked with Objective-C or XCode before. Neither had [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-click">
<div class="wp-caption alignright" style="width: 260px"><a href="http://www.crunchbase.com/product/iphone"><img title="Image representing IPhone as depicted in Crunc..." src="http://www.crunchbase.com/assets/images/resized/0001/9797/19797v1-max-250x250.jpg" alt="Image representing IPhone as depicted in Crunc..." width="250" height="195" /></a><p class="wp-caption-text">Image via CrunchBase</p></div>
</div>
<p>The iPhone SDK is a great platform for developers. It gives developers a great opportunity to reach a huge market of users easily. So, let&#8217;s great started so you can start building your own great apps. </p>
<p><strong>XCode and Objective-C</strong></p>
<p>I am assuming most of you have never worked with Objective-C or XCode before. Neither had I until I wanted to develop iPhone apps. The first thing you should note is that Objective-C has a very different syntax than languages such as C# and Java. Let&#8217;s go over some basic differences by comparing the same code in Objective-C and Java. </p>
<p>Objective-C: </p>
<blockquote><p>PointCountsViewController<span> *aViewController = [[</span>PointCountsViewController<span> </span><span>alloc</span><span>] </span><span>initWithNibName</span><span>:</span><span>@&#8221;PointCountsViewController&#8221;</span><span> </span><span>bundle</span><span>:[</span><span>NSBundle</span><span> </span><span>mainBundle</span><span>]];</span></p></blockquote>
<p>Java:</p>
<blockquote><p>PointCountsViewController aViewController = new PointCountsViewController(&#8220;PointCountsViewController&#8221;, mainBundle);</p></blockquote>
<p>As you can tell when calling an object&#8217;s method, instead of doing something like object.method(parameter) in Objective-C you would do: [object method:parameter];</p>
<p>Similar to C++ each file has a header file and a source file. The header file has the extension of .h while the source file has extension of .m. Whenever you create a class you create the interface in the header file and implemented it in the source file. </p>
<p><img class="alignright size-full wp-image-63" style="margin-left: 15px; margin-right: 15px;" title="iconpng-helloworld" src="http://alexkaminski.org/wp-content/uploads/2008/10/iconpng-helloworld1.jpg" alt="" width="162" height="369" /></p>
<p>Now that we are familiar with some basic concepts of Objective-C, let&#8217;s take a look at how XCode is organized. </p>
<p>All of the code files are placed within the Classes folder. Things such as images and the .xib files are placed in the Resources folder. The .app that is produced when you compile is built and placed within the Products folder. You can essentially ignore everything else (at this point). </p>
<p>The .xib file that I mentioned earlier is a file that stores the interface/gui of your application. You can edit it using Interface Builder by simply double clicking it. </p>
<p><strong>Creating the Project</strong></p>
<p>Now that you are familiar with what files you will use and some basic Objective-C syntax, let&#8217;s get started and create a new project. </p>
<p>Go to File -&gt; New Project -&gt; iPhone OS -&gt; Application -&gt; View-Based Application</p>
<p>Name your application: HelloWorld and create the project. </p>
<p>Now, let&#8217;s open up the Resources folder. Double click on the HelloWorldViewController.nib file. The file should load up in Interface Builder. This is where you can drag and drop items to create your application&#8217;s interface. The first thing we want is to add a label. So, let&#8217;s get a Label from the Library (if your library isn&#8217;t open, go to Tools -&gt; Library to open it) and drag it into the view.</p>
<p><strong>Let&#8217;s Get Coding</strong></p>
<p>Now that we have designed the GUI of our application, let&#8217;s create the code that prints out hello world on screen touch. </p>
<p>Open up HelloWorldViewController.h and replace the file with the following code: </p>
<blockquote><p><span>#import </span>&lt;UIKit/UIKit.h&gt;</p>
<p><span>@interface</span> HelloWorldViewController : UIViewController { </p>
<p><span> </span><span>IBOutlet</span> <span>UILabel</span> *lblText;</p>
<p>}</p>
<p>@property<span> (</span>nonatomic<span>, </span>retain<span>) </span><span>UILabel</span><span> *</span><span>lblText</span><span>;</span></p>
<p>@end</p></blockquote>
<p>What this code does is create an object of UILabel that we will (in a few steps) link up with the label we created in interface builder. </p>
<p>Now let&#8217;s add the real code that does all the work. Open up HelloWorldViewController.m and put the following code inside:</p>
<blockquote><p>@synthesize<span> lblText;</span></p>
<p>- (<span>void</span>)touchesBegan:(<span>NSSet</span> *)touches withEvent:(<span>UIEvent</span> *)event</p>
<p>{</p>
<p><span>    lblText</span><span>.</span><span>text</span><span> = </span>@&#8221;Hello World&#8221;<span>;</span></p>
<p>    [<span>super</span> <span>touchesBegan</span>:touches <span>withEvent</span>:event];</p>
<p>}</p></blockquote>
<p>What this code does is sense when a touch has occurred anywhere on the screen, and when it has we update the label to say &#8220;Hello World&#8221;.</p>
<p><a href="http://alexkaminski.org/wp-content/uploads/2008/10/drag1.png"><img class="alignright size-medium wp-image-65" title="drag" src="http://alexkaminski.org/wp-content/uploads/2008/10/drag-300x167.png" alt="" width="300" height="167" /></a>We are still not done. The label that we created by declaring IBOutlet UILabel lblText is not linked up to the label that we create in Interface Builder. So, now let&#8217;s open up interface builder again. Go to the inspector (if it&#8217;s not already open, open it from Tools -&gt; Inspector) and click on the tab that has a blue circle with an arrow inside. Now go back to the view and click on your label. Now that it is selected click on the blue circle next to &#8220;New Referencing Outlet&#8221; in the Inspector and drag it to the File Owner window. </p>
<p>Essentially that&#8217;s it. Build and Go and you should see your app in the iPhone simulator. <img src='http://alexkaminski.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/4451d781-a38f-49a4-8383-220193ae9273/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=4451d781-a38f-49a4-8383-220193ae9273" alt="Reblog this post [with Zemanta]" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://alexkaminski.org/2008/10/iphone-sdk-tutorial-a-simple-hello-world-program/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What questions to ask a potential hire?</title>
		<link>http://alexkaminski.org/2008/10/what-questions-to-ask-a-potential-hire/</link>
		<comments>http://alexkaminski.org/2008/10/what-questions-to-ask-a-potential-hire/#comments</comments>
		<pubDate>Fri, 03 Oct 2008 05:43:26 +0000</pubDate>
		<dc:creator>Alex Kaminski</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Startups]]></category>

		<guid isPermaLink="false">http://alexkaminski.org/?p=32</guid>
		<description><![CDATA[Recently we were looking for a new developer intern at AdExchanged (If you&#8217;re interested in the position, let us know). Since we&#8217;re using ASP.NET and very few college students have experience with that platform I wanted to come up with 10 quick and easy questions that would determine how much knowledge the applicant had. I [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img zemanta-action-click">
<div class="wp-caption alignright" style="width: 212px"><a href="http://commons.wikipedia.org/wiki/Image:Webservices.png"><img title="**Web service" src="http://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Webservices.png/202px-Webservices.png" alt="**Web service" width="202" height="183" /></a><p class="wp-caption-text">Image via Wikipedia</p></div>
</div>
<p>Recently we were looking for a new developer intern at <a href="http://www.adexchanged.com">AdExchanged</a> (If you&#8217;re interested in the position, <a href="http://adexchanged.com/Feedback.aspx">let us know</a>). Since we&#8217;re using ASP.NET and very few college students have experience with that platform I wanted to come up with 10 quick and easy questions that would determine how much knowledge the applicant had.</p>
<p>I came up with these ten questions:</p>
<div style="margin-left: 20px;">1. Given the SQL command “select * from Users” how would you add pagination on the SQL side? </p>
<p>2. What is a web service?</p>
<p>3. How does a web service relate to SOAP?</p>
<p>4. How would you write the auto-complete for the facebook search bar. (Describe both the backend and the javascript)</p>
<p>5. How do you normalize data in a database?</p>
<p>6. What is JSON?</p>
<p>7. How is JSON different from XML?</p>
<p>8. If you wanted to create a 80% black transparent overlay on top of the whole HTML page, what would be the CSS to do so?</p>
<p>9. In SQL, how is a “left outer join” different from a “right outer join”?</p>
<p>10. What are the pros/cons to using a compiled vs. an interpreted language for web development? What is an example of a compiled language besides for JAVA and C++? What is an example of an interpreted language?</p></div>
<p>These are basic questions that all developers should be able to answer. My goal was to simply root out the people who will need on the job training for simple things (which surprisingly is a lot).</p>
<p>What do you guys think are these questions any good? Should I be asking more &#8220;thinking&#8221; and &#8220;algorithms&#8221; questions?</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Zemified by Zemanta" href="http://reblog.zemanta.com/zemified/2f78bb48-033f-4280-b405-07dc1ea4756e/"><img class="zemanta-pixie-img" style="border: medium none ; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=2f78bb48-033f-4280-b405-07dc1ea4756e" alt="Reblog this post [with Zemanta]" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://alexkaminski.org/2008/10/what-questions-to-ask-a-potential-hire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Overview of Database Design for the Web</title>
		<link>http://alexkaminski.org/2008/03/quick-overview-of-database-design-for-the-web/</link>
		<comments>http://alexkaminski.org/2008/03/quick-overview-of-database-design-for-the-web/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 00:21:00 +0000</pubDate>
		<dc:creator>Alex Kaminski</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://alexkaminski.org/?p=4</guid>
		<description><![CDATA[So you&#8217;re just getting started building your website and need features that require a database (such as user login and profiles). If you&#8217;ve never used a database before, this might seem daunting and complex. Well, it&#8217;s not, it just takes practice and basic programming skills. What&#8217;s a Database and why do I need one? Before [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;re just getting started building your website and need features that require a database (such as user login and profiles). If you&#8217;ve never used a database before, this might seem daunting and complex. Well, it&#8217;s not, it just takes practice and basic programming skills.<br />
<span style="font-weight: bold;"><br />
</span></p>
<div><span style="font-weight: bold;">What&#8217;s a Database and why do I need one?</span></div>
<div>Before we go further, let&#8217;s explain what a database does and why its necessary. Essentially, a database is used to store information. The kind of information that can be stored varies from user comments on a blog post to credit card details of an online purchase. If you want to create a website that saves or accesses information in anyway, you will need to use some type of database. </div>
<div><span style="font-weight: bold;">What does it look like?</span></div>
<div>A database is composed of tables. These tables have rows that store different information in each column. So a database will look something like this:</p>
<div><span style="white-space:pre"> </span>- Database</div>
<div><span style="white-space:pre"> </span>- Table users</div>
<div><span style="white-space:pre"> </span>- Table comments</div>
<div>Now, let&#8217;s see how these tables would look like:</div>
<p><img id="BLOGGER_PHOTO_ID_5184074134121539154" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_cOaqFyAII_w/R_GH9WWa5lI/AAAAAAAAAEM/EoQLPaZIdao/s320/Picture+3.png" border="0" alt="" /></p>
<div>
<div style="text-align: center;"><img id="BLOGGER_PHOTO_ID_5184074348869903970" style="cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_cOaqFyAII_w/R_GIJ2Wa5mI/AAAAAAAAAEU/Qq-j65aKQ7M/s320/Picture+4.png" border="0" alt="" /></div>
<div style="text-align: left;">You&#8217;ll notice that we don&#8217;t have one table, but instead split the information among two tables: users and comments. </div>
<div style="text-align: left;"><span style="font-weight: bold;">So why can&#8217;t I just have all my information in one table?</span></div>
<div style="text-align: left;"><span style="font-weight: bold;"><br />
</span></div>
<div style="text-align: left;">Most programmers do exactly that when they design their first table in a database. Let&#8217;s look at a design like that:</div>
<div style="text-align: left;"><img id="BLOGGER_PHOTO_ID_5184078965959747186" style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_cOaqFyAII_w/R_GMWmWa5nI/AAAAAAAAAEc/gS-K9PyW6oI/s320/Picture+5.png" border="0" alt="" /></div>
<div style="text-align: left;">Notice that in the above table design the user John Smith had two comments. In order to create the second comment, we had to create another row repeating his user_id, name, and email information. This type of design is crude and inefficient. Imagine if the user decided to change his email and you need to update your database. In this type of one-table design you would have to iterate through each row that belongs to the user and update their email. Seems inefficient right?</div>
<div style="text-align: left;"><span style="font-style: italic;">So what do we do?</span> We split the information up into two tables (as shown in the images above). This reduces any data redundancy and makes the whole database design more efficient. </div>
</div>
<div style="text-align: left;"><span style="font-weight: bold;">How to scale your database</span></div>
<div style="text-align: left;"><span style="font-weight: bold;"><br />
</span></div>
<div style="text-align: left;">One of the best ways to scale your database is to split your data up among various tables. This allows you to split your tables up and place them in other databases. These databases can be located on other database servers, thus reducing the strain of having one database server run all the requests. </div>
<div style="text-align: left;"><span style="font-weight: bold;">What do I do next?</span></div>
<div style="text-align: left;"><span style="font-weight: bold;"><br />
</span></div>
<div style="text-align: left;">Next, you should decide on a type of database. There are free ones available such as MySql or more robust but expensive ones such as Microsoft Sql Server. You&#8217;ll need to learn the SQL programming language, which is how you interact with the database and create, edit information. I&#8217;m not going to try and teach you the SQL language, but I&#8217;ll direct you to a <a href="http://w3schools.com/sql/default.asp">website</a> that has great tutorials on this subject. </div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://alexkaminski.org/2008/03/quick-overview-of-database-design-for-the-web/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

