<?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:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>OxyCo</title>
	<atom:link href="http://atma.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://atma.wordpress.com</link>
	<description>My adventures in Cocoa and OSX...</description>
	<pubDate>Sat, 18 Aug 2007 19:20:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Programming issues. Writing a tax calculator: part 2.</title>
		<link>http://atma.wordpress.com/2007/08/16/programming-issues-writing-a-tax-calculator-part-2/</link>
		<comments>http://atma.wordpress.com/2007/08/16/programming-issues-writing-a-tax-calculator-part-2/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 10:07:32 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2007/08/16/programming-issues-writing-a-tax-calculator-part-2/</guid>
		<description><![CDATA[After playing around with the tax calculator I managed to write the zero or negative number control inside the method as I wanted before. It may seem too easy for expert programmers but for me was a bit tricky. First I used the while loop keyword and saw the printf line printing itself on the [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After playing around with the <i>tax calculator</i> I managed to write the zero or negative number control inside the method as I wanted before. It may seem too easy for expert programmers but for me was a bit tricky. First I used the <i>while</i> loop keyword and saw the printf line printing itself on the screen inside an infinite loop! Then I woke up and used the <i>if/else</i> statements.<br />
The next problem was stopping the program from printing the lines that were at the main() function. The print method call, was printing 0&#8217;s anyway. So another <i>if/else</i> control on the print method was enough. I did change the print method, at the header file, in order to make it accept a single argument. I&#8217;m not sure if it was necessary for print to work as I wanted. Stop! Let&#8217;s test it! No! Here is the error:<b> &#8216;p&#8217; undeclared (first use in this function) </b> which is quite normal, because the method doesn&#8217;t expect any variable or argument. However, I could try to declare the variable inside the method, but when I did that and try to compile the program, xcode crashed! Yeah! Am I good or what? Anyway, declaring inside a method a value that should be retrieved from outside doesn&#8217;t make much sense anyway.<br />
So here is the code:<br />
<i>The .h file</i></p>
<blockquote>
<p>	#import<br />
	#import </p>
<p>	@interface TAX: Object<br />
	{<br />
		double price;<br />
	}</p>
<p>	-(void) setPrice: (int) p;<br />
	-(void) print: (int) p;</p>
<p>	@end
</p></blockquote>
<p>and the .m file:</p>
<blockquote><p>
	#import<br />
	#import<br />
	#import &#8220;ivacalc.h&#8221;</p>
<p>	@implementation TAX;</p>
<p>	-(void) print: (int) p<br />
	{<br />
		price = p;</p>
<p>		if ( p &gt; 0 )<br />
		{<br />
		printf(&#8221;The price is %.2f and the tax is %.2f.\nThe sum is %.2f\n&#8221;, price, price * 0.19, price + (price*0.19));<br />
		}<br />
		else<br />
		{<br />
		printf(&#8221;exiting\n&#8221;);<br />
		}<br />
	}</p>
<p>	-(void) setPrice: (int) p<br />
	{<br />
		if (p &lt; 1) // don&#8217;t do calculation for negative numbers<br />
		{<br />
			printf(&#8221;The price is 0 or negative!\n&#8221;);<br />
			p = 0;<br />
		}<br />
		else<br />
			p = price;<br />
	}</p>
<p>	@end</p>
<p>	int main(int argc, char *argv[])<br />
	{<br />
		int j;</p>
<p>		TAX *myTax = [[TAX alloc] init]; // allocating and initializing a TAX-fellow class!</p>
<p>		printf(&#8221;Price: &#8220;);<br />
		scanf(&#8221;%i&#8221;, &amp;j);<br />
		printf(&#8221;\n&#8221;);</p>
<p>		[myTax setPrice: j];<br />
		[myTax print: j];</p>
<p>		[myTax free];</p>
<p>		return 0;<br />
	}
	</p></blockquote>
<p>Now the program does check if the number entered is 0 or negative and prints an error message if it is.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=22&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2007/08/16/programming-issues-writing-a-tax-calculator-part-2/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Programming issues. Writing a tax calculator.</title>
		<link>http://atma.wordpress.com/2007/08/15/programming-issues-writing-a-tax-calculator/</link>
		<comments>http://atma.wordpress.com/2007/08/15/programming-issues-writing-a-tax-calculator/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 21:56:27 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2007/08/15/programming-issues-writing-a-tax-calculator/</guid>
		<description><![CDATA[My Objective C reading doesn&#8217;t go as I would like to, but in a way proceeds. Today I forgot the ObjC manual in the military chamber, while going home, so I couldn&#8217;t read much. I decide to solve a simple self assigned exercise. Nothing complicated, it could be done in less than 4 seconds using [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My Objective C reading doesn&#8217;t go as I would like to, but in a way proceeds. Today I forgot the ObjC manual in the military chamber, while going home, so I couldn&#8217;t read much. I decide to solve a simple self assigned exercise. Nothing complicated, it could be done in less than 4 seconds using <a href="http://www.python.org">Python</a> or even <a href="http://en.wikipedia.org/wiki/C_(programming_language)">C</a>.<br />
	Anyway the good thing about this book is that, as Stephen Kochan explains, I&#8217;ll start programming using the specific object oriented programming mindset, avoiding some issues that more experienced programmers have when they try to learn objective C and object oriented programming. First, I&#8217;ll show you my code:</p>
<p><i>The header file</i></p>
<blockquote><p>
	// ivacalc.h header</p>
<p>	#import<br />
	#import </p>
<p>	@interface TAX: Object<br />
	{<br />
		double price;<br />
	}</p>
<p>	-(void) setPrice: (int) p;<br />
	-(double) price;</p>
<p>	@end
</p></blockquote>
<p><i>The main program (implementation/main function)</i></p>
<blockquote><p>
// Calculating the tax of a give price v1.1<br />
// main program<br />
// ivacalc.m</p>
<p>#import<br />
#import<br />
#import &#8220;ivacalc.h&#8221;</p>
<p>@implementation TAX;</p>
<p>-(void) print<br />
{<br />
	printf(&#8221;The price is %.2f and the tax is %.2f.\nThe sum is %.2f\n&#8221;, price, price * 0.19, price + (price*0.19));<br />
}</p>
<p>-(double) price<br />
{<br />
	return price;<br />
}</p>
<p>-(void) setPrice: (int) p<br />
{<br />
	price = p;<br />
}</p>
<p>@end</p>
<p>int main(int argc, char *argv[])<br />
{<br />
	int j;</p>
<p>	TAX *myTax = [[TAX alloc] init]; // allocating and initializing a TAX-fellow class!</p>
<p>	printf(&#8221;Price: &#8220;);<br />
	scanf(&#8221;%i&#8221;, &amp;j);<br />
	printf(&#8221;\n&#8221;);</p>
<p>	[myTax setPrice: j];<br />
	[myTax print];</p>
<p>	[myTax free];</p>
<p>	return 0;<br />
}
</p></blockquote>
<p>	As you can see the program above is quite simple. It does not much. The hard part was defining correctly the interface and implementation sections and the inner goal is to get more familiar with methods and classes. However the first issue I&#8217;ve encountered was the data encapsulation. Which raises the question: <i>What would have happened if I had put the <b>scanf</b> code inside the <b>setPrice</b> method</i>? I could change the method, in order to make the method perform all the test + scanf execution internally. I tried to do it, I wrote the code but I` didn&#8217;t manage to get the print method accept a variable that is calculated from a method within the same class of the implementation section. I&#8217;m quite that this is possible though.<br />
	The problem is, which programming style is correct? When must I write a function or perform a specific operation inside the method and not on the main() function, as a C-style program, and then must I put the more possible options inside the method? Is there a universal answer or there are many, depending on the program?<br />
	I&#8217;ll continue writing code tomorrow! Bye</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=21&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2007/08/15/programming-issues-writing-a-tax-calculator/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Joining the Army</title>
		<link>http://atma.wordpress.com/2007/07/19/joining-the-army/</link>
		<comments>http://atma.wordpress.com/2007/07/19/joining-the-army/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 13:09:06 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2007/07/19/joining-the-army/</guid>
		<description><![CDATA[It&#8217;s been while that I don&#8217;t post to this blog. The main reason is that I joined the army since May 07 2007. For 12 months I&#8217;ll be there, paying my dues to my country. Actually paying the dues of political idiocy. In Greece the only country nowadays considered dangerous is Turkey. Okay, considering the [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s been while that I don&#8217;t post to this blog. The main reason is that I joined the army since May 07 2007. For 12 months I&#8217;ll be there, paying my dues to my country. Actually paying the dues of political idiocy. In Greece the only country nowadays considered dangerous is Turkey. Okay, considering the social incidents that took place the last 6 months in Turkey, they are right. However, I believe that war is not a solution and that a 12 months period is a bit <i>too much</i>.<br />
In the army you meet people that you would hardly meet in your life elsewhere. I met a shepherd! A real one! Even in Greece, they are hard to find! In Milan (Italy) where I was for almost 7 years, we hadn&#8217;t any! The my soldier colleagues are okay so we don&#8217;t have issues. Fortunately I&#8217;m at a base h north Greece which is not near the borders, so I have few chances of getting involved in uncomfortable events that happen every now and then between Greece and Turkey border.<br />
Category: Thoughts</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=20&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2007/07/19/joining-the-army/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Long time no post!</title>
		<link>http://atma.wordpress.com/2007/03/01/long-time-no-post/</link>
		<comments>http://atma.wordpress.com/2007/03/01/long-time-no-post/#comments</comments>
		<pubDate>Thu, 01 Mar 2007 23:52:42 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2007/03/01/long-time-no-post/</guid>
		<description><![CDATA[Dear Blog,
Long time until the last post I&#8217;ve made at this blog. The reason is that I had several other things in mind and I stopped reading about Objective C. The time is the first thing that one needs to handle, along with his temper. Well, for me it&#8217;s very hard to control both. Although [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Dear Blog,<br />
Long time until the last post I&#8217;ve made at this blog. The reason is that I had several other things in mind and I stopped reading about Objective C. The time is the first thing that one needs to handle, along with his temper. Well, for me it&#8217;s very hard to control both. Although I want to learn Cocoa and Objective C, as I already wrote elsewhere, I knew since day one it would be a difficult task not because of the language inherent difficulties, but mostly because of time. The serious lack of free time in my daily schedule doesn&#8217;t permit me to read and practice enough. However, I&#8217;m hopping to make a fresh start this week end!<br />
Hope everything goes for the best!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=16&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2007/03/01/long-time-no-post/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Learning how to read Binary</title>
		<link>http://atma.wordpress.com/2006/11/30/learning-how-to-read-binary/</link>
		<comments>http://atma.wordpress.com/2006/11/30/learning-how-to-read-binary/#comments</comments>
		<pubDate>Thu, 30 Nov 2006 20:55:02 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2006/11/30/learning-how-to-read-binary/</guid>
		<description><![CDATA[Some days ago I was reading at the handbook about the left shift operator &#8220;Wikipedia link didn&#8217;t help a lot, so I asked on IRC. The result was excellent! Now, although I&#8217;m not used to use binary by any means or understand on the fly the binary numbers - which means make on the fly [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Some days ago I was reading at the handbook about the <i>left shift operator</i> &#8220;Wikipedia link</a> didn&#8217;t help a lot, so I asked on IRC. The result was excellent! Now, although I&#8217;m not used to use binary by any means or understand on the fly the binary numbers - <i>which means make on the fly translation from binary to decimal</i> - but a guy show me a way to calculate binary numbers, the clue was:</p>
<blockquote><p>
	Let&#8217;s say that we have this binary number: <b>1001</b>. We have a binary number (base 2) composed by 4 elements/characters. Now to find a decimal we must apply the following formula: <b>a*3^2 + b*2^2 + c*1^2 + d*0^1</b>. Where a,b,c,d we must substitute the binary numbers from left to right, make sure you count the last character of the binary number as 0. So the result is: <b>1*2^3 + 0*2^2 + 0*2^1 + 1*2^0</b> = 8 + 0 + 0 + 1 = 9.
</p></blockquote>
<p>Isn&#8217;t that simple? Now back to our first issue, the <i>left shift operator</i> - <a href="http://www.webreference.com/js/tips/991018.html">link here</a> - shifts the first operand the specified number of bits to the left. Now I don&#8217;t understand where the hell is going to turn useful such an operator in Object Oriented programming, but I hope to find out someday.<br />
I&#8217;m happy enough to understand binary, you know.. I never really understood the famous Geek quote: <i>There are 10 kind&#8217;s of people those who understand binary and those who don&#8217;t</i> I hope to be able to laugh someday with that, I&#8217;ve read it a thousand times.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=14&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2006/11/30/learning-how-to-read-binary/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Inconsolata fonts for OSX</title>
		<link>http://atma.wordpress.com/2006/11/24/inconsolata-fonts-for-osx/</link>
		<comments>http://atma.wordpress.com/2006/11/24/inconsolata-fonts-for-osx/#comments</comments>
		<pubDate>Fri, 24 Nov 2006 16:47:38 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[OSX]]></category>

		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2006/11/24/inconsolata-fonts-for-osx/</guid>
		<description><![CDATA[After reading cosmix&#8217;s post about a font called Inconsolata I managed to install the font under MACOSX very easily, through fontbook - MacOSX application for managing fonts - and for the first time I realised the difference between different fonts. My TextMate looks more beautiful than ever! This font is amazing. Although it does not [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After reading <a href="http://blog.cosmix.org/2006/11/19/inconsolata/">cosmix&#8217;s</a> post about a font called <a href="http://levien.com/type/myfonts/inconsolata.html">Inconsolata</a> I managed to install the font under MACOSX very easily, through <a href="http://www.apple.com/macosx/features/fontbook/">fontbook</a> - <i>MacOSX application for managing fonts</i> - and for the first time I realised the difference between different fonts. My <a href="http://macromates.com/">TextMate</a> looks more beautiful than ever! This font is amazing. Although it does not support Greek I think I&#8217;ll made it my default font under TextMate.<br />
I am Greek as you probably realised/know so not having Greek support is not acceptable. However <a href="http://advogato.org/person/raph/">Raph Levien</a> managed to find out the post and promised some support if the interest is strong enough for Greek chars. Apparently there are some issues under Windows and I didn&#8217;t tried out under GNU/Linux and/or *BSD. I&#8217;ll try it out under FreeBSD when I have to time to install it on my x86 Desktop. <a href="http://levien.com/type/myfonts/Inconsolata.otf">Try the otf file now</a>!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=13&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2006/11/24/inconsolata-fonts-for-osx/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>MacOSX Developers Approach</title>
		<link>http://atma.wordpress.com/2006/11/20/macosx-developers-approach/</link>
		<comments>http://atma.wordpress.com/2006/11/20/macosx-developers-approach/#comments</comments>
		<pubDate>Mon, 20 Nov 2006 17:58:17 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Thoughts]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2006/11/20/macosx-developers-approach/</guid>
		<description><![CDATA[Scott Stevenson wrote an interesting article about the approach of most MacOSX developers. As I mentioned before, this is one of the key reasons I choose this platform and programming language. The hack value that most OSX applications have these days is above everything else. I&#8217;m flirting with the idea of a FreeBSD desktop with [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Scott Stevenson wrote an interesting <a href="http://theocacao.com/document.page/352">article</a> about the approach of most MacOSX developers. As I mentioned before, this is one of the key reasons I choose this platform and programming language. The hack value that most OSX applications have these days is above everything else. I&#8217;m flirting with the idea of a <a href="http://www.FreeBSD.org/">FreeBSD</a> desktop with <a href="http://www.beryl-project.org/">beryl</a> support for fancy graphics. I&#8217;ve seen many <a href="http://www.youtube.com">YouTube</a> video&#8217;s. It&#8217;s nice but the interface still misses the fresh feeling that Aqua gives. Not to mention of course other problems that Linux has in the desktop field (<i>bad implementation, buggy applications, not unique interface, etc</i>), I have no previous experience with FreeBSD but I think that the Desktop environment is unique for GNU/Linux and BSD&#8217;s.<br />
However Stevenson deals with the entire topic in a very interesting way. The conversation that follows through comments is also very interesting.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=12&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2006/11/20/macosx-developers-approach/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a Calculator Class</title>
		<link>http://atma.wordpress.com/2006/11/20/creating-a-calculator-class/</link>
		<comments>http://atma.wordpress.com/2006/11/20/creating-a-calculator-class/#comments</comments>
		<pubDate>Mon, 20 Nov 2006 17:46:01 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Objective C]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2006/11/20/creating-a-calculator-class/</guid>
		<description><![CDATA[Creating a calculator class in Objective C is not an easy task! Oh, c&#8217;mon sure it  . I&#8217;ve been reading about operators lately. Arithmetic operators, bit operators, assignment operators etc. The fact that many of these things were known helps me gap the lack of time to proceed with reading as I wanted too. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Creating a calculator class in Objective C is not an easy task! Oh, c&#8217;mon sure it <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . I&#8217;ve been reading about operators lately. Arithmetic operators, bit operators, assignment operators etc. The fact that many of these things were known helps me gap the lack of time to proceed with reading as I wanted too. Here is my last code:</p>
<blockquote><pre>
	#import &lt;objc/Object.h&gt;
	#import &lt;stdio.h&gt;

	@interface Calculator: Object
	{
		double accumulator;
	}

	// accumulator methods

	-(void) setAccumulator: (double) value;
	-(void) clear;
	-(double) accumulator;

	// arithmetic methods

	-(void) add: (double) value;
	-(void) subtract: (double) value;
	-(void) multiply: (double) value;
	-(void) divide: (double) value;

	@end

	@implementation Calculator;

	-(void) setAccumulator: (double) value
	{
		accumulator = value;
	}

	-(void) clear
	{
		accumulator = 0;
	}

	-(double) accumulator
	{
		return accumulator;
	}

	-(void) add: (double) value
	{
		accumulator += value;
	}

	-(void) subtract: (double) value
	{
		accumulator -= value;
	}

	-(void) multiply: (double) value
	{
		accumulator *= value;
	}

	-(void) divide: (double) value
	{
		accumulator /= value;
	}

	@end

	int main (int argc, char *argv[])
	{
		Calculator *calc;

		calc = [[Calculator alloc] init];

		[calc clear];
		[calc setAccumulator: 100.00];
		[calc add: 200.00];
		[calc divide: 15.00];
		[calc subtract: 10.00];
		[calc multiply: 5.00];

		printf(&#8221;The result is %g\n&#8221;, [calc accumulator]);
		[calc free];

		return 0;
	}
	</blockquote>
</pre>
<p>Okay, pretty simple you&#8217;ll say! But it&#8217;s not! Actually for the first time some things came natural! The allocation and initialisation of memory, I didn&#8217;t even think about the right syntax after the first line <i>[calc clear];</i> which helped write the program quickly. However I made some mistakes the first I wrote the program. The first one was not paying attention that the <i>accumulator</i> was of type &#8220;double&#8221; and not &#8220;void&#8221; which caused some warning but not fatal errors</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=11&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2006/11/20/creating-a-calculator-class/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Run out of time!</title>
		<link>http://atma.wordpress.com/2006/11/13/run-out-of-time/</link>
		<comments>http://atma.wordpress.com/2006/11/13/run-out-of-time/#comments</comments>
		<pubDate>Mon, 13 Nov 2006 11:20:29 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2006/11/13/run-out-of-time/</guid>
		<description><![CDATA[Oh it&#8217;s weird! Since the last post I didn&#8217;t had the time to open the Objective C manual!!! Isn&#8217;t that weird? Even now I&#8217;m writing this post from my working Office! Many things to do the last week. I hope to have some time to work with TextMate and Objective C a bit more. I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Oh it&#8217;s weird! Since the last post I didn&#8217;t had the time to open the Objective C manual!!! Isn&#8217;t that weird? Even now I&#8217;m writing this post from my working Office! Many things to do the last week. I hope to have some time to work with TextMate and Objective C a bit more. I&#8217;m on the 4th chapter and Objective C seems fairly easy, maybe I should wait a bit more before making this kind of statement heh!</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=10&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2006/11/13/run-out-of-time/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating Bundles with TextMate</title>
		<link>http://atma.wordpress.com/2006/11/05/creating-bundles-with-textmate/</link>
		<comments>http://atma.wordpress.com/2006/11/05/creating-bundles-with-textmate/#comments</comments>
		<pubDate>Sun, 05 Nov 2006 14:13:17 +0000</pubDate>
		<dc:creator>atma</dc:creator>
		
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://atma.wordpress.com/2006/11/05/creating-bundles-with-textmate/</guid>
		<description><![CDATA[As a starter I write small programs that I&#8217;d like to see executed at once. The book has two suggestions for those who are using MacOSX:
a) Use xCode ( which is a software that I&#8217;ll need to learn somewhere in the remote future )
b) Use Gcc through command line. ( which is what I had [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As a starter I write small programs that I&#8217;d like to see executed at once. The book has two suggestions for those who are using MacOSX:</p>
<p>a) Use <a href="http://www.apple.com/macosx/features/xcode/">xCode</a> ( which is a software that I&#8217;ll need to learn somewhere in the <i>remote</i> future )</p>
<p>b) Use Gcc through command line. ( which is what I had in mind since day 1 actually )</p>
<p>However I felt uncomfortable having a terminal open along with TextMate just to compile programs. So I start looking for a shortcut that will do the job for me, nothing complicated: Just compile the current .m file, run it and show eventual errors otherwise the output.<br />
I searched the manual and I found the <i>apple-command+B</i> shortcut which tries to compile the .m file with xCode unsuccessfully. The problem is that xCode looks for xCode-projects inside the working directory, so it does not <i>recognize</i> on the fly the specific file.<br />
After that I looked at <a href="http://macromates.com">macromates</a> for other info, because I was sure that something similar already exists. Nothing though, the Build command was bounded to xCode for .m files.<br />
At this point I joined the <a href="http://www.mirc.com/irc.html">IRC</a> textmate support channel on <a href="http://en.wikipedia.org/wiki/Freenode">Freenode</a>. A found a Greek guy under the nickname <b><a href="http://skiadas.dcostanet.net/afterthought/">cskiadas</a></b> which helped me create my first bundle!<br />
It was easier than expected! TextMate surprised me in a very positive way already! So what I did was:</p>
<p>Bundles -&gt; Bundle Editor -&gt; Edit Commands | New Commands</p>
<p>Following <a href="http://skiadas.dcostanet.net/afterthought/">cskiadas</a> advice I did not put the new bundle under <i>Objective-C Bundles</i>, I put it under my own Bundle category created by TextMate. The first thing we need to do is satisfy the <b>Scope Selector</b> which in my case was <i>source.objc</i>. Then following the GUI was easy to create a key shortcut I decide for <i>apple-command+B</i> which is the default shortcut for <i>Build</i>. I decide to watch the output in <i>tooltip</i> mode which is much more convenient and fancy than Document mode, which open&#8217;s another document and paste&#8217;s the output. Mr. <a href="http://skiadas.dcostanet.net/afterthought/">cskiadas</a> told me that <i>tooltip</i> may have issues with large text. Kept that in mind, but after all.. changing that option takes 3 seconds. Now the <i>hard part</i> was to put together the code that compiles &amp; run&#8217;s the file. Mr. <a href="http://skiadas.dcostanet.net/afterthought/">cskiadas</a> helped with a short example and key feature to go peaceful with .m files.. here is the code:</p>
<blockquote><pre>
	# just to remind you of some useful environment variables
	# see Help / Environment Variables for the full list
	#echo File: "$TM_FILEPATH"
	#echo Word: "$TM_CURRENT_WORD"
	#echo Selection: "$TM_SELECTED_TEXT"

	#!/usr/bin/sh  - atma 05/11/2006
	BASE=${TM_FILEPATH%.m}
	gcc "$TM_FILEPATH" -o "$BASE" -l objc

	# Simple bash check out and compile

	if [[ -e $BASE ]]
	  then
	     echo &#8220;Executing $BASE&#8221;
	     echo &#8220;&#8221;
	     exec $BASE
	else
	     echo &#8220;&#8221;
	     echo &#8220;File does not exist&#8221;
	fi
</blockquote>
</pre>
<p>The BASE=${TM_FILEPATH%.m} variable saved me from having hard time. The %m option means &#8220;without the .m extension&#8221;. The $TM_FILEPATH variable stands for <i>full path filename</i> as you can imagine. The rest is simple shell code which I put together with a little goggling ( I didn&#8217;t remember the -e variable for bash&#8217;s test ) just to make it more elegant.</p>
<p>Now when I type <i>apple-command+B</i> I get the compile &amp; run results on the fly, inside a tooltip!</p>
<p><a href='http://atma.files.wordpress.com/2006/11/tooltip.jpg' title='tooltip'><img src='http://atma.files.wordpress.com/2006/11/tooltip.thumbnail.jpg' alt='tooltip' /></a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/atma.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/atma.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/atma.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/atma.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/atma.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/atma.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/atma.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/atma.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/atma.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/atma.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/atma.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/atma.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=atma.wordpress.com&blog=169600&post=7&subd=atma&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://atma.wordpress.com/2006/11/05/creating-bundles-with-textmate/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/atma-128.jpg" medium="image">
			<media:title type="html">atma</media:title>
		</media:content>

		<media:content url="http://atma.files.wordpress.com/2006/11/tooltip.thumbnail.jpg" medium="image">
			<media:title type="html">tooltip</media:title>
		</media:content>
	</item>
	</channel>
</rss>