<?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"
	>

<channel>
	<title>Alexey Bulgakov</title>
	<atom:link href="http://www.alexbulgakov.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alexbulgakov.com</link>
	<description>one more internet geek</description>
	<pubDate>Thu, 02 Jul 2009 20:36:37 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>cocos2d runAction: animStart/animStop</title>
		<link>http://www.alexbulgakov.com/2009/04/14/cocos2d-runaction-animstartanimstop/</link>
		<comments>http://www.alexbulgakov.com/2009/04/14/cocos2d-runaction-animstartanimstop/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 19:56:40 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[development]]></category>

		<category><![CDATA[cocoa touch]]></category>

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

		<category><![CDATA[iphone development]]></category>

		<category><![CDATA[iphone sdk]]></category>

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

		<category><![CDATA[objective c]]></category>

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=28</guid>
		<description><![CDATA[i&#8217;ve faced up with cocos2d engine, which is great by the way&#8230;
few days ago i was need to understand, when you run action, how detect if it is still running or just stopped..
so, i&#8217;ve read their documentation, but didn&#8217;t get how to do that according docs. So i&#8217;ve decided to make it through system scheduler, [...]]]></description>
			<content:encoded><![CDATA[<p>i&#8217;ve faced up with cocos2d engine, which is great by the way&#8230;</p>
<p>few days ago i was need to understand, when you run action, how detect if it is still running or just stopped..<span id="more-28"></span></p>
<p>so, i&#8217;ve read their documentation, but didn&#8217;t get how to do that according docs. So i&#8217;ve decided to make it through system scheduler, that is the same as NSTimer in core iphone objective c. We make our scheduler  run and then release it when animation is stopped.</p>
<p>for example, we have object which we need to rotate. how to find out, when the rotation circle is over?</p>
<p>yes, we need to use <strong>step</strong> function, which give us understanding if it is still running &#8216;<strong>1</strong>&#8216; or not &#8216;<strong>0</strong>&#8216;</p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>StartAnim<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>direction Duration<span style="color: #002200;">:</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>dur <span style="color: #002200;">&#123;</span>
     <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>direction<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
      <span style="color: #a61390;">id</span> rightRotation <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>RotateBy actionWithDuration<span style="color: #002200;">:</span>dur  angle<span style="color: #002200;">:</span><span style="color: #2400d9;">360</span><span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#91;</span>object runAction<span style="color: #002200;">:</span>rightRotation<span style="color: #002200;">&#93;</span>;
     <span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #002200;">&#123;</span>
      <span style="color: #a61390;">id</span> leftRotation <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>RotateBy actionWithDuration<span style="color: #002200;">:</span>dur  angle<span style="color: #002200;">:-</span><span style="color: #2400d9;">360</span><span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#91;</span>object runAction<span style="color: #002200;">:</span>leftRotation<span style="color: #002200;">&#93;</span>;
     <span style="color: #002200;">&#125;</span>
     <span style="color: #002200;">&#91;</span>self schedule<span style="color: #002200;">:</span> <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>update<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span> interval<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><span style="color: #002200;">&#93;</span>;
<span style="color: #002200;">&#125;</span> 
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>update<span style="color: #002200;">:</span> <span style="color: #002200;">&#40;</span>ccTime<span style="color: #002200;">&#41;</span> <span style="color: #a61390;">time</span> <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>object step_<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">==</span> <span style="color: #2400d9;">1</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
                <span style="color: #002200;">&#91;</span>self start<span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#125;</span> <span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>object step_<span style="color: #002200;">:</span><span style="color: #2400d9;">0.5</span><span style="color: #002200;">&#93;</span> <span style="color: #002200;">==</span> <span style="color: #2400d9;">0</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
                <span style="color: #002200;">&#91;</span>self stop<span style="color: #002200;">&#93;</span>;
                <span style="color: #002200;">&#91;</span>self unschedule<span style="color: #002200;">:</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>update<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span>;
        <span style="color: #002200;">&#125;</span>
<span style="color: #002200;">&#125;</span> 
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>start <span style="color: #002200;">&#123;</span>
        NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;start&quot;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span> 
&nbsp;
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>stop <span style="color: #002200;">&#123;</span>
        NSLog<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;stop&quot;</span><span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2009/04/14/cocos2d-runaction-animstartanimstop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>happy coding :)</title>
		<link>http://www.alexbulgakov.com/2009/04/06/happy-coding/</link>
		<comments>http://www.alexbulgakov.com/2009/04/06/happy-coding/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 15:31:27 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

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

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

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=24</guid>
		<description><![CDATA[i&#8217;m so glad to code at my brand new white macbook  
inside i have:
Intel Core 2 Duo 2.0 GHz
Bus Speed 1.07 Ghz
RAM: 4 Gb DDR2 SDRAM 667 MHz
HDD: 500 Gb 7200 rpm
NVIDIA GeForce 9400M 256 Mb
amazing macbook! really enjoy to work on it (=
]]></description>
			<content:encoded><![CDATA[<p>i&#8217;m so glad to code at my brand new white macbook <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-24"></span><a href="http://www.alexbulgakov.com/wp-content/uploads/2009/04/img_0199.jpg" onclick=""><img class="alignnone size-medium wp-image-25" title="macbook" src="http://www.alexbulgakov.com/wp-content/uploads/2009/04/img_0199-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p>inside i have:</p>
<p>Intel Core 2 Duo 2.0 GHz</p>
<p>Bus Speed 1.07 Ghz</p>
<p>RAM: 4 Gb DDR2 SDRAM 667 MHz</p>
<p>HDD: 500 Gb 7200 rpm</p>
<p>NVIDIA GeForce 9400M 256 Mb</p>
<p>amazing macbook! really enjoy to work on it (=</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2009/04/06/happy-coding/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Do You REALLY Need a College Degree to Get a Programming Job?</title>
		<link>http://www.alexbulgakov.com/2009/03/23/do-you-really-need-a-college-degree-to-get-a-programming-job/</link>
		<comments>http://www.alexbulgakov.com/2009/03/23/do-you-really-need-a-college-degree-to-get-a-programming-job/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 09:30:31 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[college degree]]></category>

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

		<category><![CDATA[IT workers]]></category>

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

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=23</guid>
		<description><![CDATA[i&#8217;ve found an interesting article about IT field and College Degree - College Degree is a must in our field? how do you think? some people waste a lot of years to gain degree in Computer Science and they think that then they will earn a lot of bucks from it&#8230; but another people just [...]]]></description>
			<content:encoded><![CDATA[<p>i&#8217;ve found an interesting article about IT field and College Degree - College Degree is a must in our field? how do you think? some people waste a lot of years to gain degree in Computer Science and they think that then they will earn a lot of bucks from it&#8230; but another people just sit that time in their garages, code and create future&#8230; i&#8217;m not telling you that you don&#8217;t need a degree but also degree is not a must in our modern world i think. However, if you are interested in it, just check an article.<span id="more-23"></span></p>
<p>There&#8217;s plenty of articles about <a href="http://www.javaworld.com/javaworld/jw-03-2007/jw-0305-jobs.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.javaworld.com');">the shortage of skilled IT workers</a> <span class="print-footnote">[1]</span>, and the difficulty experienced by companies in finding qualified software developers. The whining would be far more credible if the Want Ads didn&#8217;t have a silly, arbitrary qualification: a college degree.</p>
<p>There&#8217;s nothing wrong with a software developer getting a college degree in CompSci, especially when it accompanies an opportunity to learn useful skills. My problem is with hiring managers who think the degree an absolute necessity, and who exclude otherwise-brilliant candidates who didn&#8217;t spend four extra years in a classroom. If you never graduated from a university, you may discover that getting a programming job without a degree is like trying to get a Teamsters job without a union card. Which is, not to put too fine a point on it, really dumb.</p>
<p>Frankly, I have always found this attitude unfathomable. But I&#8217;m willing to be wrong (really) and to listen to the opposite viewpoint. So I asked for input about the reasons someone might require a college degree as part of their company policy. I hoped to be given an &#8220;Oh! Now I understand!&#8221; moment in which I whacked myself on the head. So much for <em>that</em> idea.</p>
<p>A strangely common explanation for requiring a college degree is that it demonstrates &#8220;commitment.&#8221; As a recruiter friend said, &#8220;One client described it to me as less about the education or the degree and much more, for them anyway, about the sense of commitment the person shows to starting and finishing something. They indicated that they saw the lack of degree in parallel to the lack of loyalty or dedication to the employer.&#8221; Or as someone else said, &#8220;It helps demonstrate that that person can set a goal and then achieve it. It also shows that the person had the vision to realize that four years spent now will probably pay off in the long run.&#8221;</p>
<p>Maybe, <em>maybe</em> you could get away with that attitude if the manager is trying to fill an entry level position, and expects the pool of candidates to be very young or have little experience. In such cases, the youngsters have had little time to &#8220;achieve&#8221; much of anything, so the ability to do an all-nighter in pursuit of a good grade is — arguably — an indication of seriousness.</p>
<p>But even then, it&#8217;s not really a measurement of commitment. It&#8217;s a measurement of the candidate&#8217;s parents&#8217; ability to pay a college tuition. Yet, someone who dropped out of school because he could no longer afford it and had to earn a living might care just as desperately about the field. Requiring a college degree (in anything, not just CompSci) excludes the people who are <em>really</em> committed to learning programming skills, because they did it on their own time, or worked full-time days while they attended a Tech School at night. Becoming a programmer because you <em>want to</em> demonstrates resourcefulness and determination. Aren&#8217;t those equally important as &#8220;commitment&#8221;?</p>
<p>Another major problem with the &#8220;commitment&#8221; excuse is that its relevance fades over time. I might have been a drifter or impatient idealist at age 20 (and in fact I was: I dropped out of a poison ivy league university to Save the World). In the ensuing 30 years, I might possibly have learned something — ya think? Yet, if I apply for a &#8220;college degree required&#8221; position today, my résumé wouldn&#8217;t make it past the HR department. (Because, as we all know, HR departments exist to eliminate candidates, not to find them.) I&#8217;ve seen several programming jobs listed that specify &#8220;college degree or five years experience,&#8221; and I&#8217;m fine with that. But I also know a major innovator in programming languages who was told he couldn&#8217;t teach a class in the field he invented, because he never bothered to get a sheepskin.</p>
<p>So far, I&#8217;m assuming that a company demanding a degree insists you have one <em>in Computer Science</em>, but I&#8217;ve rarely see them specify what your major should be. As several people pointed out to me (and I agree wholeheartedly on this point), the best programmers often come from other disciplines. (IBM at least used to give a +1 to any candidate with a degree in music.) To the degree that college does teach you &#8220;how to think&#8221; (though I suspect it&#8217;s more likely to teach you how to <em>drink</em>), it&#8217;s more important for students to acquire the skill of learning quickly than to have college experience in programming a now-&#8221;legacy&#8221; language.</p>
<p>As one correspondent, John M, explained eloquently, &#8220;The drop-dead killer programmers you want on your team, as likely as not, were not CompSci or Software Engineering majors. They&#8217;re doing programming because they <em>like</em> to do programming. They&#8217;re intrinsically interested in communicating with the machine, and what they can get the machine to do. The college kids you interview are in Comp Sci or Software Engineering because they think they&#8217;ll earn big bucks. That&#8217;s why <a href="http://www.joelonsoftware.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.joelonsoftware.com');" target="_new">Joel Spolsky</a> <span class="print-footnote">[2]</span> insists that any job interview should include asking the candidate to write code. I&#8217;ve had Dean&#8217;s List students from major engineering schools who couldn&#8217;t solve a simple problem — and couldn&#8217;t be coached into figuring out what to do. I have a young man working for me now who majored in Music Composition who rolled his eyes at the problem and said, &#8220;You probably don&#8217;t want to do it that way—the new LINQ to XML tools make it easier&#8230;.&#8221;</p>
<p>For fairness, let me cite a few of the more sensible responses I encountered:</p>
<li><em>A college degree in CompSci gives you fundamental skills, such as data structures, how to handle large problems in a systemic way, or an awareness of accounting</em>(relevant, since many apps interface with accounting systems). Someone with a university degree understands the difference between &#8220;coding&#8221; and &#8220;software engineering,&#8221; my correspondents argued.I&#8217;ll give a nod to this viewpoint, because a good degree program does expose students to these important concepts. But I&#8217;d argue that few college graduates get a holistic view of the field until they&#8217;re out of school on their first job, busy un-learning all the technically interesting &#8220;techiques&#8221; they were taught, and finding out how programming works in the real world. (The most arrogant programmers are the ones who just graduated, as I&#8217;m sure you&#8217;ve noticed. They&#8217;re also the best and smartest in the industry. You can believe them, because they&#8217;ll tell you so.)A degree does not guarantee that the job applicant <em>learned</em> these skills. Programming skill is not a sun lamp. Being exposed to it doesn&#8217;t mean you soak it in.Nor does it mean that someone who worked her way through tech school, or who is self-taught from many fine programming books, lacks an understanding of Computer Science basics. Instead of asking for a degree, the <a href="http://www.javaworld.com/community/node/2614" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.javaworld.com');">interview process</a> <span class="print-footnote">[3]</span> at these companies should include the question, &#8220;What&#8217;s the last programming book you read? When? What did you learn from it?&#8221;</li>
<li><em>Some programming tasks need specialized knowledge you&#8217;d only get in school.</em> As one person said, if the software to be written has complex algorithms, such as those that are calculus-intensive, a degree is usually a must. &#8220;You might find some unique individual without a degree who can code such algorithms, but that would be a very odd case. Or maybe the person did go to college but did not complete. It is unlikely that someone off the street without schooling could do that task.&#8221;Here I disagree. If you need specific knowledge, advertise for that need. Someone can major in CompSci without taking calculus; the degree wouldn&#8217;t assure you she had that knowledge. But if the job listing makes it clear that advanced math skills are a prerequisite, you have a better chance of finding the right individual. Degree status isn&#8217;t part of it.The other assumption in this argument is that domain knowledge can&#8217;t or won&#8217;t be learned outside of school. That&#8217;s really strange. Because someone who works in a given area is likely to learn a lot more about it than somebody who took a three-hour course in it, a decade ago.For example, one correspondent without an undergrad degree was contacted by a recruiter whose client wanted software developers who understood their specific industry. &#8220;The project they were undertaking was an exact mirror for the project I had just completed for their chief competitor. My references were excellent and were from industry leaders that their very own senior management had long relationships with. My qualifications were so solid, I expected an interview to be merely for ceremony.&#8221; Instead, the hiring company decided not to speak with him. &#8220;His client required a college degree. It wasn&#8217;t important if the degree was in the artistic studies of microscopic archeology but a degree was required. They refused to review my résumé.&#8221;</li>
<li><em>The degree is a measurement of achievement for those who have no other metric.</em> One individual asked, &#8220;How familiar with software development is the person doing the hiring? If little, then would you want to rely on someone who claims to have a lot of experience without a degree? What would be the measure of identifying how knowledgeable the person truly is?&#8221; That&#8217;s a fair point — and one that is a worthwhile question outside of the hiring process. (Certainly, it applies to any computer consultant who needs to sell herself to a non-technical client&#8230; a topic I&#8217;d better leave for another time.)But I&#8217;d hate to think about the decision-making process in which one candidate is chosen over another because the former, to paraphrase <a href="http://robertklein.com/kleinbio.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/robertklein.com');" target="_new">comedian Robert Klein</a> <span class="print-footnote">[4]</span>, was admitted to a college that&#8217;d accept anyone who could make it to the bursar&#8217;s office. If the hiring manager isn&#8217;t qualified to judge someone&#8217;s knowledge, hire a consultant to interview the candidate and write a report the boss can understand.Or take the aforementioned John M&#8217;s advice: &#8220;By contrast, I can think of three strong predictors: Has the candidate been involved with the full life-cycle of a serious project? Is the candidate presently doing software development outside of work (i.e. for a social organization, his church website, a non-profit, or a hobby interest)? And does the candidate have strong performance experience with music? Two of the three warrant giving this person a close look; find all three and you&#8217;ve likely got your new team member. The college degree? It&#8217;s a nice-to-have.&#8221;If a company really and truly wants <a href="http://www.javaworld.com/community/node/2537" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.javaworld.com');">the best programmers</a> <span class="print-footnote">[5]</span> it can hire, it should ditch the &#8220;college degree&#8221; requirement. <em>Now</em>.<strong>author</strong>: Esther Schindler<strong>source</strong>: Javaworld</li>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2009/03/23/do-you-really-need-a-college-degree-to-get-a-programming-job/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Convert Unix TimeStamp to NSDate &#038; calculate difference between 2 dates</title>
		<link>http://www.alexbulgakov.com/2009/03/20/convert-unix-timestamp-to-nsdate-calculate-difference-between-2-dates/</link>
		<comments>http://www.alexbulgakov.com/2009/03/20/convert-unix-timestamp-to-nsdate-calculate-difference-between-2-dates/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 11:35:15 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[development]]></category>

		<category><![CDATA[iphone sdk]]></category>

		<category><![CDATA[objective c]]></category>

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=22</guid>
		<description><![CDATA[today, i&#8217;ve faced up with unix timestamp and converting it to NSDATE task.
for example, we have date in &#8216;1226357333&#8242; format, how should we convert it on iphone?
answer is pretty simple  

NSTimeInterval unixDate = 1226357333;
NSDate *date = &#91;NSDate dateWithTimeIntervalSince1970:unixDate&#93;;

what we need is just place our magic number into NSTimerInterval and then convert it through dateWithTimeIntervalSince1970 function.
okay, [...]]]></description>
			<content:encoded><![CDATA[<p>today, i&#8217;ve faced up with unix timestamp and converting it to NSDATE task.</p>
<p>for example, we have date in &#8216;1226357333&#8242; format, how should we convert it on iphone?</p>
<p>answer is pretty simple <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-22"></span></p>

<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">NSTimeInterval unixDate <span style="color: #002200;">=</span> <span style="color: #2400d9;">1226357333</span>;
<span style="color: #400080;">NSDate</span> <span style="color: #002200;">*</span>date <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDate</span> dateWithTimeIntervalSince1970<span style="color: #002200;">:</span>unixDate<span style="color: #002200;">&#93;</span>;</pre></div></div>

<p>what we need is just place our magic number into <strong>NSTimerInterval</strong> and then convert it through <strong>dateWithTimeIntervalSince1970</strong> function.</p>
<p>okay, the next thing is to calculate how much time did pass from one date to another</p>
<p>for example we have timestamp at <strong>2008-11-11 00:48:53 +0200</strong></p>
<p>and right now is <strong>2009-03-20 12:31:08 +0200</strong></p>
<p>how should we calculate the difference?</p>
<p>that is quite simple too <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">NSTimeInterval unixDate <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1226357333</span><span style="color: #339933;">;</span>
&nbsp;
NSDate <span style="color: #339933;">*</span><span style="color: #990000;">date</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>NSDate dateWithTimeIntervalSince1970<span style="color: #339933;">:</span>unixDate<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
NSDate <span style="color: #339933;">*</span>currentDate <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>NSDate <span style="color: #990000;">date</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
NSTimeInterval difference <span style="color: #339933;">=</span> 
                      <span style="color: #009900;">&#91;</span>currentDate timeIntervalSinceDate<span style="color: #339933;">:</span><span style="color: #990000;">date</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">86400</span><span style="color: #339933;">;</span>
NSLog<span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #0000ff;">&quot;Days difference: <span style="color: #009933; font-weight: bold;">%f</span>&quot;</span><span style="color: #339933;">,</span> difference<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>as you see, we&#8217;ve used <strong>date</strong> variable with converted unix stamp and <strong>currentDate</strong> variable.</p>
<p>then we&#8217;ve calculated the difference through <strong>timeIntervalSinceDate</strong> function</p>
<p>but here is a thing, timeIntervalSinceDate return seconds to us, so we need convert them to suitable format, you may divide <strong>difference </strong>at<strong> </strong>60 - mins, 3600 - hours, 86400 - days etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2009/03/20/convert-unix-timestamp-to-nsdate-calculate-difference-between-2-dates/feed/</wfw:commentRss>
		</item>
		<item>
		<title>26 Ways To Know Your Software Development Project Is Doomed</title>
		<link>http://www.alexbulgakov.com/2008/12/11/26-ways-to-know-your-software-development-project-is-doomed/</link>
		<comments>http://www.alexbulgakov.com/2008/12/11/26-ways-to-know-your-software-development-project-is-doomed/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 16:47:22 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[interesting stuff]]></category>

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=21</guid>
		<description><![CDATA[today i&#8217;ve found an interesting article about software project workflow process  enjoy it

The project name changes for the third time in as many months.
The development manager decides that it is better to write a completely separate version of the software for the U.K. rather than tointernationalize a single version.
The requirements definition is begun four months after [...]]]></description>
			<content:encoded><![CDATA[<p>today i&#8217;ve found an interesting <a href="http://www.cio.com/article/print/470103" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">article</a> about software project workflow process <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> enjoy it</p>
<ul>
<li>The project name changes for the third time in as many months.</li>
<li>The development manager decides that it is better to write a completely separate version of the software for the U.K. rather than to<a href="http://www.cio.com/article/29536/English_to_You_Greek_to_Them_the_Importance_of_Internationalization" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">internationalize a single version</a>.</li>
<li>The <a href="http://www.cio.com/article/29903/Five_Things_IT_Managers_Should_Know_About_Software_Requirements" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">requirements definition</a> is begun four months after development started.</li>
<li>The newly hired director of R&amp;D proudly informs the board of directors that the project will be 99 percent completed <a href="http://advice.cio.com/towards-sanity-in-software-project-estimation-a-chat-with-steve-mcconnell" onclick="javascript:pageTracker._trackPageview('/outbound/article/advice.cio.com');">six months ahead of schedule</a>, and assures the board that the software can ship directly to clients without going through beta testing.<span id="more-21"></span></li>
<li>You are a Web developer. You open the ZIP file with the HTML documents the client produced for the site scripts you need to integrate with the Web application. And you discover the client&#8217;s HTML documents are all Microsoft Word files, saved in HTML format.</li>
<li>You realize the reason the company hired you as a consultant is to referee a dispute among two competing departments over which technical platform to use.</li>
<li>The memo says you will develop a 64-bit application using a 16-bit platform.</li>
<li>The developer doesn&#8217;t understand the spec document and continues to develop anyway. And the QA team doesn&#8217;t know how to test, but they &#8220;test&#8221; anyway.</li>
<li>When you see the project budget, you realize that over half of it was spent on a Web designer to create a Photoshop mock-up of the home page—with no regard to <a href="http://advice.cio.com/uisins" onclick="javascript:pageTracker._trackPageview('/outbound/article/advice.cio.com');">whether that design is feasible</a>. Or with any attention to the thousands of pages of content that will exist underneath that home page.</li>
<li>The user or client requests new features instead of focusing on bug fixing and performance enhancements.</li>
<li>You find a list of <a href="http://www.ibm.com/developerworks/websphere/library/techarticles/0306_perks/perks2.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ibm.com');" target="_blank">16 software development best practices</a> and realize that not a single one of them is being followed.</li>
<li>You are asked to port your project from Windows to MS-DOS.</li>
<li>The technical project manager asks you to compose the <a href="http://www.cio.com/article/182300/Study_Bad_Requirements_Gathering_Hurts_IT_Projects" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">list of user requirements</a>—without consulting any actual potential users.</li>
<li>People started sending notes &#8220;to file&#8221; rather than to each other. The notes are alibis about why the sender has nothing to do with the upcoming (but unacknowledged) failure.</li>
<li>Status reports are seen as insubordinate.</li>
<li>The new CIO <a href="http://www.cio.com/article/27099/_Signs_You_re_About_to_Get_Fired" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">replaces all the people who have deep organizational knowledge</a> with outsiders from his old firm.</li>
<li>It is a big project and is named Project Iceberg. Or it&#8217;s the third time the company is trying to pull this off, and the project is code-named &#8220;Phoenix.&#8221; Somehow, you don&#8217;t believe this one can<a href="http://www.mythicalrealm.com/creatures/phoenix.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mythicalrealm.com');" target="_new">spring from the ashes</a>.</li>
<li>Even the customers who got the free version are pissed off.</li>
<li>The manager of your mission-critical project (handling 80 percent of the company&#8217;s revenue) has three months exposure to the technology of choice, and is training four brand-new developers at once. The manager is given a three-month project deadline.</li>
<li>You learn that management had to <em>insist</em> that the interface definitions be <a href="http://www.cio.com/article/120802/Source_Code_Management_Systems_Trends_Analysis_and_Best_Features" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">checked into version control</a> after the first code freeze.</li>
<li>They change the project manager and relocate the whole project from one city to another. (You consider yourself lucky that the cities are <a href="http://www.cio.com/article/462571/Will_the_U.S._Recession_Mean_the_End_of_Offshore_Outsourcing_" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">on the same continent</a>.)</li>
<li>The QA team is told, &#8220;We&#8217;ve only allocated <a href="http://www.cio.com/article/112800/Quality_Doesn_rsquo_t_Just_Happen" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">three weeks for testing</a>&#8221; (on a project that has lasted six months already). Or QA is told, &#8220;The date is fixed. We have to have all this functionality by that date.&#8221;</li>
<li>The program manager decided to try Agile methodology &#8220;<a href="http://www.cio.com/article/464169/When_Agile_Projects_Go_Bad" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">to save time</a>.&#8221;</li>
<li>In a previous era, pre-cell-phones and ubiquitous Internet access: You get screeching abuse from a new project manager hired three days ago in New York, after you return from three days locked in regional CIO meetings in Frankfurt. Why? Because you hadn&#8217;t responded to the e-mail messages she had sent (and which you didn&#8217;t get), and you hadn&#8217;t updated her &#8220;project dashboard&#8221; that you knew nothing about.</li>
<li>Management decides to spend a million dollars on a $20,000 project. Then the managers start agreeing with computer company salespeople that the $1 million in software requires $2 million of hardware. Meanwhile, a secretary purchases an off-the-shelf PC and a shrink wrapped CD containing some new office automation packages. She implements the project during her lunch break. (Arguably, we should count this one as a success.)</li>
<li>The lead developer tells you that maintaining a complete history of all database updates is a requirement for the application, but he hasn&#8217;t had time to (read: <a href="http://advice.cio.com/esther_schindler/whos_the_worst_programmer_on_your_team_how_can_you_tell" onclick="javascript:pageTracker._trackPageview('/outbound/article/advice.cio.com');">doesn&#8217;t know how to</a>) design a data model for it yet. So he decides to go ahead and start with the Web front end and worry about it later. And this is the <em>lead</em> developer.</li>
<li>The business line leader/project funder says, &#8220;<a href="http://www.cio.com/article/438930/Project_Management_The_Most_Common_Mistakes_IT_Departments_Make" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">Get creative</a>.&#8221; This happens after management reduces the project headcount by 20 percent. And after the IT team pulls out the hardware that had been slated for recycling, saying it&#8217;s your project&#8217;s new hosting environment.</li>
</ul>
<p>article link is <a href="http://www.cio.com/article/print/470103" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.cio.com');">http://www.cio.com/article/print/470103</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2008/12/11/26-ways-to-know-your-software-development-project-is-doomed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Craigslist test task</title>
		<link>http://www.alexbulgakov.com/2008/11/04/craigslist-test-task/</link>
		<comments>http://www.alexbulgakov.com/2008/11/04/craigslist-test-task/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 12:42:57 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[development]]></category>

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

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

		<category><![CDATA[php parser]]></category>

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=17</guid>
		<description><![CDATA[few weeks ago, i&#8217;ve found an interesting job offer at Craigslist
the main thing was that they had a test task which consist of:
&#8220;Using baseball-reference.com write a program (in the language of your choice) that retrieves every major league team&#8217;s season record since 1900. Have your program output the data in a CSV format where each [...]]]></description>
			<content:encoded><![CDATA[<p>few weeks ago, i&#8217;ve found an interesting job offer at <a href="http://newyork.craigslist.org/mnh/eng/879122038.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/newyork.craigslist.org');">Craigslist</a></p>
<p>the main thing was that they had a test task which consist of:</p>
<p>&#8220;<em>Using baseball-reference.com write a program (in the language of your choice) that retrieves every major league team&#8217;s season record since 1900. Have your program output the data in a CSV format where each line is a team year of the following pattern &#8220;,,,&#8221;. Order of teams and years does not matter, but there should be no duplicates.</em><span id="more-17"></span></p>
<p><em>example:</em></p>
<p><em>Boston Red Sox,2008,95,67<br />
Boston Red Sox,2007,96,66<br />
&#8230; </em> &#8221;</p>
<p>i don&#8217;t know why i&#8217;ve decided to make it i&#8217;m not a fan of baseball.</p>
<p>but anyway i&#8217;ve made it and will show you how:</p>
<p>my first step was to go and analyze the site <a href="http://www.baseball-reference.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.baseball-reference.com');">baseball-reference.com</a></p>
<p>after that, i&#8217;ve decided to use PHP with prepared parser class.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;phpHTMLParser.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #990000;">file_get_contents</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://www.baseball-reference.com/postseason/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$parser</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> phpHTMLParser<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$content</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$HTMLObject</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$parser</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">parse_tags</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;A&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$aTags</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$HTMLObject</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTagsByName</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;A&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'baseball.csv'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'w'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;
	&lt;center&gt;Download CSV file:&lt;br/&gt;
	&lt;a href='baseball.csv'&gt;download&lt;/a&gt;&lt;/center&gt;
	&lt;hr&gt;&lt;br/&gt;
&quot;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$aTags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$a</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">href</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">href</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$a</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">innerHTML</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$out</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$info</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #0000ff;">&quot;(&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$i</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1900</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">&lt;</span><span style="color: #cc66cc;">2008</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
		<span style="color: #000088;">$i</span><span style="color: #339933;">++;</span>
&nbsp;
		<span style="color: #000088;">$count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$i</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;.shtml&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$out</span> <span style="color: #339933;">==</span> <span style="color: #000088;">$count</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$info</span> <span style="color: #339933;">==</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
&nbsp;
			<span style="color: #000088;">$team_pos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'('</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$def</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'-'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$w_count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$def</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$team_pos</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$win_pos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #000088;">$team_pos</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #000088;">$w_count</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$com</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">','</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$l_count</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$com</span> <span style="color: #339933;">-</span> <span style="color: #000088;">$def</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$lose_pos</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #000088;">$def</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span><span style="color: #000088;">$l_count</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$team</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #000088;">$team_pos</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$team</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'*'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span><span style="color: #000088;">$team</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #990000;">echo</span> <span style="color: #000088;">$team</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$win_pos</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;,&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$lose_pos</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;br/&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'baseball.csv'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$team</span>,<span style="color: #006699; font-weight: bold;">$i</span>,<span style="color: #006699; font-weight: bold;">$win_pos</span>,<span style="color: #006699; font-weight: bold;">$lose_pos</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #990000;">fwrite</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span><span style="color: #000088;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>so, as you see the code is simple stupid, just a loop with checking for their custom pattern</p>
<p>you may see example and download it for your needs at my <a href="http://www.alexbulgakov.com/wp-content/workshop/baseball/" onclick="">workshop</a></p>
<p>they didn&#8217;t choose me and i can&#8217;t boast you with &#8220;A new MacBook Pro, a 30&#8243; monitor, an iPhone and 5k $&#8221; <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>so, don&#8217;t know where is my bad, probably i should make everything much more simplier with few regex lines.</p>
<p>or they didn&#8217;t choose me cas i&#8217;m from Ukraine <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> not from united states</p>
<p>however, i like to do some interesting tasks at my free time when i have it (=</p>
<p>i&#8217;m open to hear some critics and suggestions, but keep in mind that it was a task for 10-15 minutes <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2008/11/04/craigslist-test-task/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Jailbreak iPhone 2.0 to 2.1</title>
		<link>http://www.alexbulgakov.com/2008/11/03/jailbreak-iphone2g-21/</link>
		<comments>http://www.alexbulgakov.com/2008/11/03/jailbreak-iphone2g-21/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 13:06:19 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[tweaks]]></category>

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

		<category><![CDATA[firmware 2.1]]></category>

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

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

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=15</guid>
		<description><![CDATA[So, i&#8217;ve faced up with task that i need to update my iPhone from 2.0 bundle to 2.1 cas a lot of apps and updates are working only for 2.1

i&#8217;ve made some search trough web and find out, that XPWN is already ok with it.
So, how did i do that (my steps):

download the 2.1 firmware [...]]]></description>
			<content:encoded><![CDATA[<p>So, i&#8217;ve faced up with task that i need to update my iPhone from 2.0 bundle to 2.1 cas a lot of apps and updates are working only for 2.1</p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/logo.png" onclick=""><img class="alignnone size-medium wp-image-16" title="logo" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/logo.png" alt="Jailbreak 2.1" width="84" height="120" /></a></p>
<p>i&#8217;ve made some search trough web and find out, that XPWN is already ok with it.<span id="more-15"></span></p>
<p>So, how did i do that (my steps):</p>
<ul>
<li>download the 2.1 firmware (<a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5202.20080909.gkbEj/iPhone1,1_2.1_5F136_Restore.ipsw " onclick="javascript:pageTracker._trackPageview('/outbound/article/appldnld.apple.com.edgesuite.net');">2g</a> - <a href="http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-5198.20080909.K3294/iPhone1,2_2.1_5F136_Restore.ipsw " onclick="javascript:pageTracker._trackPageview('/outbound/article/appldnld.apple.com.edgesuite.net');">3g</a>)</li>
<li><a href="http://www.filehippo.com/download_itunes/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.filehippo.com');">install itunes v8</a> (quite big repository of a different itunes versions)<a href="http://www.filehippo.com/download_itunes/"><br />
</a></li>
<li>Update the iphone with itunes</li>
<li>Download <a href="http://xpwn.co.uk/quickpwn-2.1-2g-3g.rar " onclick="javascript:pageTracker._trackPageview('/outbound/article/xpwn.co.uk');">quickpwn with the correct 2.1</a> bundle inside it</li>
<li>Run quickpwn, select everything you want: Cydia, Installer, Custom logo, be careful with steps</li>
<li>Download <a href="http://xpwn.co.uk/tcmd704a.exe" onclick="javascript:pageTracker._trackPageview('/outbound/article/xpwn.co.uk');">Total Commander</a> &amp; <a href="http://xpwn.co.uk/T-PoT.1.1.zip " onclick="javascript:pageTracker._trackPageview('/outbound/article/xpwn.co.uk');">T-Pot addon</a></li>
<li>Download <a href="http://www.sendspace.com/file/pcrxy6" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.sendspace.com');">MobileInstallation patch</a> (MIP)<a href="http://www.sendspace.com/file/pcrxy6"><br />
</a></li>
<li>Use Commander to install MIP to /System/Library/PrivateFrameWorks/MobileInstallation.framework</li>
<li>Delete /private/var/mobile/Library/Caches/com.apple.mobile.installation.plist</li>
</ul>
<p>Reboot your iPhone and you are done! enjoy it <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>thanks <a href="http://xpwn.co.uk/" onclick="javascript:pageTracker._trackPageview('/outbound/article/xpwn.co.uk');">xpwn</a>, i&#8217;ve tested their way of jailbreaking, everything is working without any problems.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2008/11/03/jailbreak-iphone2g-21/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google Developer Day 2008 (Moscow calling)</title>
		<link>http://www.alexbulgakov.com/2008/11/03/google-developer-day-2008/</link>
		<comments>http://www.alexbulgakov.com/2008/11/03/google-developer-day-2008/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 11:12:37 +0000</pubDate>
		<dc:creator>alex</dc:creator>
		
		<category><![CDATA[business trips]]></category>

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

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

		<category><![CDATA[google developer day 2008]]></category>

		<category><![CDATA[google gathering 2008]]></category>

		<category><![CDATA[moscow google event]]></category>

		<guid isPermaLink="false">http://www.alexbulgakov.com/?p=8</guid>
		<description><![CDATA[So, here we are, Injoit team and me had a great trip to Moscow at GDD 2008.

what i may say about google gathering, it was amazing - great people, interesting reports, outstanding place.

So, what did they tell us:

Geo Services
Open Social
Gears
Open Web
App engine
Chrome
Google Data APIs
Visualization API
YouTube API
Google Web Toolkit
Android

i really enjoy reports about GWT, App Engine, [...]]]></description>
			<content:encoded><![CDATA[<p>So, here we are, Injoit team and me had a great trip to Moscow at GDD 2008.</p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/dsc02025.jpg" onclick=""><img class="alignnone size-medium wp-image-9" title="dsc02025" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/dsc02025-300x225.jpg" alt="Injoit Team" width="300" height="225" /></a></p>
<p>what i may say about google gathering, it was amazing - great people, interesting reports, outstanding place.<span id="more-8"></span></p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/dsc02016.jpg" onclick=""><img class="alignnone size-medium wp-image-14" title="dsc02016" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/dsc02016-300x225.jpg" alt="Vladimir and me" width="300" height="225" /></a></p>
<p>So, what did they tell us:</p>
<ul>
<li>Geo Services</li>
<li>Open Social</li>
<li>Gears</li>
<li>Open Web</li>
<li>App engine</li>
<li>Chrome</li>
<li>Google Data APIs</li>
<li>Visualization API</li>
<li>YouTube API</li>
<li>Google Web Toolkit</li>
<li>Android</li>
</ul>
<p>i really enjoy reports about GWT, App Engine, Gears &amp; Open Social.</p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/dsc02011.jpg" onclick=""><img class="alignnone size-medium wp-image-13" title="dsc02011" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/dsc02011-300x225.jpg" alt="me" width="300" height="225" /></a></p>
<p>have met some interesting people from Google, there was <a href="http://www.chabotc.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.chabotc.com');">Chris Chabot</a> and his technology was <strong>OpenSocial</strong> i really enjoy to speak to him, excellent pro with great sense of humour. One more person from <strong>OpenSocial</strong> was Chewy Trewhella, he has helped me with some of my questions and give me bright understanding of <strong>OS</strong> principles.</p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/img_2324.jpg" onclick=""><img class="alignnone size-medium wp-image-12" title="img_2324" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/img_2324-300x225.jpg" alt="Injoit team" width="300" height="225" /></a></p>
<p><a href="http://codinginparadise.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/codinginparadise.org');">Brad Neuberg</a> taught us about <a href="http://www.injoit.com/uploads/Intro-to-Gears-GDD-2008.pdf" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.injoit.com');">Gears</a> technology, what i may say, he is a true winner of a kick-ass award. His report was so excellent and completely comprehensible, so there were almost no &#8220;stupid&#8221; questions regarding Gears just clarifications about technology. Blobs are rulezzz <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/img_2309.jpg" onclick=""><img class="alignnone size-medium wp-image-11" title="img_2309" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/img_2309-300x225.jpg" alt="Brad Neuberg" width="300" height="225" /></a></p>
<p>Next thing was GWT (Google Web Toolkit) - <a href="http://blog.tomayac.de/" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.tomayac.de');">Thomas Steiner</a> was a rapporteur on it. Thomas was quite clear and interesting at his report, he gave us app example (<strong>priwet MocKBa</strong>) and show the code. Even despite a lil mess with eclipse <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> he was great with his report! Chris and me had a bet regarding one of Thomas apps. The bet title was &#8220;Will the app have an error if would have empty field&#8221; as i told Chris, there was no exception handling at code, and there might be some problem but he told me that it is not true, it should be handled by some magic <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> So when the lection was finished, we&#8217;ve come to Thomas and see small error which was caused by empty field, it was so small but anyway pleasure to me that i&#8217;ve found this <img src='http://www.alexbulgakov.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.alexbulgakov.com/wp-content/uploads/2008/11/img_2334.jpg" onclick=""><img class="alignnone size-medium wp-image-10" title="img_2334" src="http://www.alexbulgakov.com/wp-content/uploads/2008/11/img_2334-225x300.jpg" alt="Thomas Steiner and me" width="225" height="300" /></a></p>
<p>so, in conclusion i want to add, that it was great event with cool people and i have a strong will to visit it next year.</p>
<p><strong>2Google: Keep going guys and you&#8217;ll achieve the highest TOP !</strong></p>
<p>you may see some videos from GDD 2008 at <a title="Google Developer Day 2008" href="http://www.youtube.com/results?search_query=google+developer+day+2008" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.youtube.com');">youtube</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.alexbulgakov.com/2008/11/03/google-developer-day-2008/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
