tag:blogger.com,1999:blog-71718911639422016112024-02-19T09:25:59.568+02:00IngerationA blog about life, technology and other things that are important to our existance.StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-7171891163942201611.post-21021939400556186542010-04-04T21:27:00.011+03:002010-04-06T01:35:42.762+03:00Perl and The Time It Owes MeThese days I'm working on a my final Verilog project, where I create a simulator for a basic Verilog syntax (netlist only) in Verilog.<div><br /></div><div>The first stage in creating such simulator is parsing the input .v file into two data structures that contain the netlist and the list of cells in the file. This code was given to us by the instructor, and it's written in Perl.</div><div><br /></div><div>To gather more knowledge about our design, I've decided to create a Python Verilog simulator, similar in concepts to the one we're going to create and verify that it's behaving like the well-known software simulator that we're working with.</div><div><br /></div><div>After fixing some small bugs, I've noticed that my code generates some events in one time-unit less than the real simulator. After checking my code again and verifying that no bugs lie there I checked the tables that were created by the Perl script that my instructor wrote, and there it was: one line of a bad parsed data.</div><div><br /></div><div>The parser takes a line that looks like "bla bla bla 1.974 bla bla bla", parses it using a Regular Expression and converts the number to a floating point number (which is always in the format d.ddd) to integer by multiplying it by 1000 and then formatting it using sprintf() (casting to int using the int() function yields the same results).</div><div><br /></div><div>Looks fine, ain't it? That's what I thought too, but it seems that there's a floating point error that causes a lot of trouble for specific numbers, like 1.007. Then after conversion you get 1006 and some temporary madness.</div><div><br /></div><div>If you don't believe me, check the following code:</div><div><br /><pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"><code>$num = 1.007;<br />print "Floating number: $num\n";<br /><br />$newNum = $num * 1000;<br />print "Possibly integer: $newNum\n";<br /><br />print sprintf("Real integer: %d\n", $newNum);<br /></code></pre><br /></div><div>Say it's a bug, say it's a feature, I don't care.</div><div><br /></div><div>This was tested under Perl 5.10.0 under Linux and Windows.</div><div><br /></div><div><u>Update:</u> to clear this out, the problem lies in rounding of floating point numbers, and probably exists in every implementation that uses the IEEE representation format. The solution as I see it right now is to use string formatting "%.0f" to convert the floating point variable to string with rounding and not truncation (that's what casting to integer does) and then convert it from string to integer.</div><div><br /></div><div>Thanks goes to <b>lorg </b>and <b>Michael </b>for clarifying the real facts.</div><div><br /></div><div><u>Update 2:</u> it seems that this "feature" doesn't apply to C, because these numbers can be represented in the regular IEEE standards. Now it's a bit weird to me that Perl and Python act exactly the same (any suggestions?).</div>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com81tag:blogger.com,1999:blog-7171891163942201611.post-35705224447831089722009-12-02T22:54:00.008+02:002009-12-03T00:48:29.400+02:00Google Chrome Update Errors<div>Two weeks ago I've had a problem updating my Chrome. The error message I got when viewing the "about" window was "Update server not available (error: 3)":</div><div><br /></div><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJbRHDwxJe6ZvoT44PHvVGluebx4Gu2ADWZu9oUuFR9ul_3Png-CndEr7cDrew-JOTKrZ6rDhe7HYwE8cuG2HGBNgqkmfkM4wSlc0NOLirgclOiXvZcoc8nqRAD5XN4Ar2ldYvRzDlQHw/s1600-h/updaterError.png"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 183px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJbRHDwxJe6ZvoT44PHvVGluebx4Gu2ADWZu9oUuFR9ul_3Png-CndEr7cDrew-JOTKrZ6rDhe7HYwE8cuG2HGBNgqkmfkM4wSlc0NOLirgclOiXvZcoc8nqRAD5XN4Ar2ldYvRzDlQHw/s320/updaterError.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5410745375998759906" /></a><div><br /></div><div>The problem is caused by improper registration of Google Updater as a COM component in the registry (don't ask me how or why it happens, but it already happened to me two times in the last two weeks).</div><div><br /></div><div>After searching the net a bit, I've seen some people who complained about the same error, but it took me some time to find a real solution:</div><div>Go to your Google Updater directory (in Windows 7 it's %userprofile%\Local\Google\Update) and run 'GoogleUpdate.exe /regserver' (make sure you elevated your privileges to Administrator before that) and voila! No more errors! (You don't even need to restart your Chrome).</div><div><br /></div><div>On a side note: I'm really busy these days, with the University and all, but I got at least one cool project I'm going to release soon (just need to polish some corners here and there). So beware :)</div>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com0tag:blogger.com,1999:blog-7171891163942201611.post-19759099559030148712009-04-22T20:02:00.003+03:002009-04-22T20:22:59.777+03:00Creating HTML Signatures in Gmail with Google ChromeIn the last couple of months I've been a heavy user of Google Chrome. I got really addicted to its amazing speed, comparing to IE and Firefox.<div><br /></div><div>Yes, Google Chrome is still under development - there's no fancy interface to extensions yet, Greasemonkey needs a command line switch to be activated and so on. But the speed just makes it worth.</div><div><br /></div><div>Anyhow, in my Firefox days I used the <a href="https://addons.mozilla.org/en-US/firefox/addon/7757">Black Canvas</a> extension to add HTML signatures to my outgoing Gmail messages. Nothing too fancy -- just a grey text and a link to my blog.</div><div>Google Chrome, however, doesn't support such extensions, so I searched for an alternative and found this <a href="http://projets.geekfg.net/?/1-how+to+insert+html+signature+in+gmail.htm">tool</a>.</div><div><br /></div><div>This little application creates an inline Javascript that should be dragged to your bookmarks bar, and with a click of a mouse it adds the signature you created into the message. Sounds good, nay?</div><div><br /></div><div>Well, besides that this generated scripts downloads an external script (<i>http://code.jquery.com/jquery-latest.pack.js)</i> which only god knows what's there, another problem popped up.</div><div><br /></div><div style="direction: ltr;">When I first used this tool I clicked on the link and nothing happend. No Javascript errors. Nothing. Then I remembered that I'm using the Gmail's lab tasks feature. Closing that window made the script work.</div><div style="direction: ltr;"><br /></div><div style="direction: ltr;">Why not create a smaller, working version, I thought. And I did. There it goes: </div><div><blockquote><span class="Apple-style-span" style="font-size: x-small;">javascript:void ((function(){document.getElementById("canvas_frame").contentDocument.getElementsByTagName("iframe")[0].contentDocument.body.innerHTML += "<b>your HTML signature</b>";})())</span></blockquote></div><div><br /></div><div>Where your HTML signature can be a hand-made HTML/CSS code or an auto generated by a WYSIWYG editor like in the tool's page.</div><div><br /></div><div>So all you need to do is create a new bookmark to this Javascript, and click on it whenever you'd like to add your signature to the mail you're currently sending.</div><div><br /></div><div>Yeah, it's a hack, so use it on your own risk, blah blah blah.</div>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com13tag:blogger.com,1999:blog-7171891163942201611.post-4636035001282259942008-11-08T23:04:00.004+02:002009-12-02T23:07:38.798+02:00The End of Annoying OTP'sIf you're a student in CS at the Hebrew University of Jerusalem, you're familiar with OTP's (one time password) used to connect to the university servers from remote, submitting exercises, receiving grades and so on.<br /><br />There are currently two ways to generate OTP's:<br /><ul><li>If you have a java-enabled phone (Nokia only) you can download an application called HOTP which will allow you to generate an OTP with each button click.</li><li>If you don't have a Nokia phone (like I do) you have to enter a website, fill your unix username and password and answer a <a href="http://en.wikipedia.org/wiki/Captcha">CAPTCHA</a>. Then SMS is sent to your cellphone, including 5 OTP's.</li></ul>Needless to say, the latter option is really annoying, especially when you need to use the OTP 4-5 times in a row while submitting an exercise (connect to an FTP server, use SSH, enter the submission system and so on).<br /><br />So I decided to create my own OTP client which will be able to generate OTP's locally. The main target was to create a program that will copy the next OTP to the clipboard, which will allow easy transportation of the 5-digit password.<br /><br />I simulated a download of the HOTP program, and decompiled it (<a href="http://www.kpdus.com/jad.html">Jad</a> rules). The code was scrambled, but I figured out by using the <a href="http://www.koders.com/">koders</a> search engine that Java's bouncycastle package is used there. This package gives a lot of encryption services, and here they use the Rijndael (original AES) and the HMAC SHA-1 encryption in order to generate the OTP.<br /><br />I won't go into further details. If you're really interested in how it works, you can go over the script's source - it's not that complicated.<br /><br />Some installation details:<br /><ul><li style="font-weight: bold;">Very important note: <span style="font-weight: normal;">if you're currently using the HOTP application, installing this script (requesting a new HOTP application download) will make your cellphone HOTP application broken. This is caused because the key counter is randomally selected each time an application is generated for download.<br />If anyone of you sees this as an important issue, leave me a reply here or send me an email.<br /></span></li><li>You'll need <a href="http://www.activestate.com/Products/activepython/index.mhtml">ActiveState Python</a> (version 2.4 and up).</li><li>If you're using other operating system than Windows, you can still use the script, but the clipboard option will not work (only printing to stdout).</li><li>After installing python and downloading the script, run it without parameters and installation will begin.</li><li>For further options, use the --help or -h switch.</li></ul>You can download NOTP from <a href="http://pynotp.googlecode.com/files/notp.zip">here</a>.<br /><br />Have a great semester :)StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com18tag:blogger.com,1999:blog-7171891163942201611.post-81577987074549867022008-09-22T14:17:00.002+03:002008-09-22T14:21:06.753+03:00Job Proposals EverywhereWhile working I was checking some HTTP headers of random sites, and I stumbled upon these headers:<br /><br />Server: nginx<br />Date: Mon, 22 Sep 2008 11:17:12 GMT<br />Content-Type: text/html; charset=UTF-8<br />Transfer-Encoding: chunked<br />Connection: close<br />Vary: Cookie<br /><span style="font-weight: bold;">X-hacker: If you're reading this, you should visit automattic.com/jobs and apply to join the fun, mention this header.</span><br /><span style="font-weight: bold;">X-Pingback: http://developerinsight.wordpress.com/xmlrpc.php</span><br />Content-Encoding: gzip<br />Vary: Accept-Encoding<br /><br />So who wants a job? :)StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com1tag:blogger.com,1999:blog-7171891163942201611.post-76742537472106686602008-08-07T19:16:00.003+03:002008-08-07T19:22:52.068+03:00New Facebook Worm?I got this mail from Facebook today, notifying about a new private message:<br /><br /><hr /><span style="font-style: italic;">*** sent you a message.</span><span style="font-style: italic;"><br /><br />Subject: Hi my friend.</span><br /><span style="font-style: italic;"><br />"This is you on hidden cam. lol:</span><br /><span style="font-style: italic;">http://myvideo.d9.pl/<parameters></span><span style="font-style: italic;">"</span><br /><hr /><br />The site is currently giving a page in polish, but no malware or exploit whatsoever. It probably went down.<br /><br />The message did not appear in my Facebook's private messages list nor in the notifications, which means that Facebook somehow deleted it from their database.<br /><br />Beware.StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com0tag:blogger.com,1999:blog-7171891163942201611.post-20697636897410412082008-07-02T20:48:00.004+03:002008-12-11T03:18:13.940+02:00Job MarketThere was one, today at the university.<br /><br />And I stumbled upon this advertisement:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ZM1a7JxKXrJGq3XZ_LMZsxdc2Ddsd_HxliR1HmmCCyvNZ-koa88NN-G92Lc9IvyHveUIbjGqRsB0tv6WsgH25EcXtoYyirvcjtOl6s0Fn-eii1f1j6rlc9FQNKqnd1R_11fhx08jEZ4/s1600-h/IMG_0187.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3ZM1a7JxKXrJGq3XZ_LMZsxdc2Ddsd_HxliR1HmmCCyvNZ-koa88NN-G92Lc9IvyHveUIbjGqRsB0tv6WsgH25EcXtoYyirvcjtOl6s0Fn-eii1f1j6rlc9FQNKqnd1R_11fhx08jEZ4/s320/IMG_0187.jpg" alt="" id="BLOGGER_PHOTO_ID_5218475786190952178" border="0" /></a><br />And then I began to ponder... :)StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com1tag:blogger.com,1999:blog-7171891163942201611.post-46057304601669328662008-07-01T17:56:00.002+03:002008-12-11T03:18:14.099+02:00Ynet are IgnorantsQuoted from <a href="http://www.ynet.co.il/articles/0,7340,L-3562288,00.html">this</a> URL:<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIJokkNL01i13_niyY417mxLYyjZcFoZnetZ981Zi6A-fqHpZtubWmRR2ZH0leJYrn6NCnQX4gOFQU3wwVFMxywzv3C9NQwD-CJ1S6ACoHhjX4sULp7rpKrPUaJLsnL89_cz8rpXRwKMk/s1600-h/whatswrong.bmp"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 336px; height: 109px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIJokkNL01i13_niyY417mxLYyjZcFoZnetZ981Zi6A-fqHpZtubWmRR2ZH0leJYrn6NCnQX4gOFQU3wwVFMxywzv3C9NQwD-CJ1S6ACoHhjX4sULp7rpKrPUaJLsnL89_cz8rpXRwKMk/s320/whatswrong.bmp" alt="" id="BLOGGER_PHOTO_ID_5218059908720298290" border="0" /></a>What the hell is colliding there?<br /><br />Credit goes to Segal.StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com0tag:blogger.com,1999:blog-7171891163942201611.post-46836804445433679962008-07-01T15:32:00.002+03:002008-07-01T15:46:15.443+03:00"Being an Adult" CourseIt's almost a year since I left home, living here in Jerusalem, and from time to time a thought about a course for "being an adult" pops in my mind.<br /><br />The last time the thought popped was yesterday night, when I found out that our electricity bill is extremely large than it is supposed to be. So while walking like a ghost in the apartment on 1am while trying to forget about my insomnia, I found out that there are small letters in the bill that says the bottom line it is an "estimation" of our electricity usage (only it's a *7 one).<br /><br />So, why are there colleges who teach about financial investments, raising babies and so on, but they don't teach you how to be a grown up?<br /><br />I thought about these subjects as a basic discussion for a curriculum:<br /><ul><li>How to deal with bureaucracy.</li><li>Taxes.</li><li>Contracts (work, rental, etc.).</li><li>Fixing stuff in the apartment (such as blocked sink).</li><li>Paying bills.</li><li>Handling car issues (tests, bills, fixing basic problems).</li></ul>If you think of something else, comment :)StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com2tag:blogger.com,1999:blog-7171891163942201611.post-1717865876220377352008-06-30T15:38:00.007+03:002008-12-11T03:18:14.337+02:00Piracy and Disinformation"I have a friend" who's downloading music through <a href="http://en.wikipedia.org/wiki/BitTorrent_%28protocol%29">Bittorrent</a>, <a href="http://www.rapidshare.com/">Rapidshare</a> and some other http free file hosting sites.<br /><br />One of the CD's that were downloaded included an inaccurate version of the album, which led me to some thoughts about the authenticity of information you gather from pirated releases.<br /><br />My friend really liked the album, and his favorite track was "Trail of Life", which he mistakenly thought as the name of the original track.<br />The mistake has been found later after a friend of his friend went to this band's concert, and retrieved the set list, which named the track "Trail of Fire".<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdPaMDQWIgZzf243sk8TekVRWQJsLOoOwJMZVgtjPpbIaWtQK6hAYR-Ca8qAreVOHyFsEX-RZiptMhxAZ2pGqYpddqoI3ziXQMKPMr3nfHsiwq8ButSf34-GwcstkC0cKYTORvDlthr_I/s1600-h/IMG_0186.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 207px; height: 276px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdPaMDQWIgZzf243sk8TekVRWQJsLOoOwJMZVgtjPpbIaWtQK6hAYR-Ca8qAreVOHyFsEX-RZiptMhxAZ2pGqYpddqoI3ziXQMKPMr3nfHsiwq8ButSf34-GwcstkC0cKYTORvDlthr_I/s320/IMG_0186.jpg" alt="" id="BLOGGER_PHOTO_ID_5217661366599851218" border="0" /></a><br />This made both of my friends to go and check, using multiple data sources (the internet and a friend who has the original CD), what is the original name of the track.<br />Why not trust the set list? Because bands sometimes do not write the exact track names in their set list. Anyhow, the verification showed that the real track name is indeed the one that was written in the list.<br /><br />Funny thing is, another friend of my friend's friend wrote about this concert in his blog, referencing to "Trail of Fire" as "Trail of Life". Is this a new way to find who is a pirate and who's not?<br /><br />Moving on, my friend wanted to update his track name and ID3 tag, so he used <a href="http://www.mediamonkey.com/">MediaMonkey</a> to access Amazon cd database and retrieve information about the cd. He was extremely surprised to see that there's another, 9th track which is included in the original release but not in the pirated one.<br /><br />As it seems, there were two different releases, but one of them (probably) was not nuked properly, so there are two different versions - an accurate one and an inaccurate one, which is encoded in a better quality, but lacks the latest track.<br /><br /><span style="font-weight: bold;">Conclusions:</span><br /><ol><li>Buy your CD's.</li><li>If you're using pirated copies, verify your downloads with <a href="http://www.amazon.com/">Amazon</a> or other CD database like <a href="http://www.freedb.org/">FreeDB</a> or Gracenote's <a href="http://www.gracenote.com/">CDDB</a>.</li><li>Do not trust strangers.<br /></li></ol>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com2tag:blogger.com,1999:blog-7171891163942201611.post-23230131848277433282008-06-28T14:55:00.003+03:002008-06-28T15:03:31.079+03:00MySpace HiDef MP3 DownloadI've got some bands I like that publish their music through MySpace, but I was quite frustrated to find out that the streaming music quality that is provided by the site is pretty low.<br /><br />Then Ami showed me <a href="http://www.file2hd.com">this</a> site, that allows you to download the original mp3 files that the user uploaded to MySpace!.<br /><br />Just click on audio, and put the URL of the user in the textbox.<br /><br />I haven't tried to find out what's going on there, but I guess that the links are found in the original MySpace user page, or that someone reverse engineered MySpace's media player and revealed the URL of the original mp3's. Anyhow it's quite a shame for MySpace to put the original uploaded mp3's under their webroot, but I don't care much :)StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com1tag:blogger.com,1999:blog-7171891163942201611.post-23902478020593757292008-05-12T00:20:00.003+03:002008-05-12T01:05:30.123+03:00Python Winamp Control ModuleAs expected, I'm posting my iWC's Winamp control module here.<br /><br />The module works without the need of installing a plugin in Winamp, hence it does alot of IPC (some of it is totally undocumented, and I think that even Winamp's developers didn't think of using their media library in such a way, but who cares).<br /><br />All of the functions are documented beside of the three most complicated ones, because I'm just too lazy - so if you're really interested I can spread some lights on the ugly hacks I did too.<br /><br />Get it from <a href="http://pywinamp.googlecode.com/files/winamp.py">here</a>.<br /><br />Requirements: ctypes, win32 python modules (comes with ActiveState's python), Winamp 5+.<br /><br />Feature request / comments - just leave a comment here.<br /><br />Have fun!StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com8tag:blogger.com,1999:blog-7171891163942201611.post-30461506006782826632008-05-09T19:51:00.003+03:002008-05-09T20:17:25.212+03:00The Semester is dead. Long live the Semester!Semester 1A and its exams ended, and the new semester is beginning on Sunday.<br /><br />This means I've got some spare time to do stuff beside sitting in my room and looking at some papers, so here are some updates on the upcoming projects I'm planning to work on:<br /><br /><span style="font-weight: bold;">iWC</span> - I've decided to discontinue the project, because I've found out <a href="http://www.alloysoft.com/">this</a> application which allows you to control Winamp, Windows Media Player or iTunes using an iPhone web application. It seems that programming a web application specifically for the iPhone can replace most native applications, and you should give it a try.<br /><br />However, I'm planning to release the Python Winamp module of iWC, which enables communication with Winamp 5+. I still need to document and refactor it a bit, so I hope I'll be able to release it this upcoming week.<br /><br /><span style="font-weight: bold;">iPhone Synchronization</span> - I'm planning to enhance the currently available iTunes-iPhone synchronization. I know, there are some products which allow better synchronizing, but they cost money, and they are not modular and open-source.<br /><br />Currently, the main features I'm planning are Facebook synchronization (fetch friends pictures, phone numbers, addresses, websites and so on) and better Outlook integration (such as notes and to-do synchronization). If you have any other ideas, please send me an email or leave a comment.<br /><br /><span style="font-weight: bold;">Smart-Home</span> - I wonder if I shall start working on an embedded project to connect some switches / electronic devices to the wireless network at our apartment in Jerusalem. If you know a cheap wifi microcontroller, please leave a message.StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com1tag:blogger.com,1999:blog-7171891163942201611.post-66086220598951904842008-03-30T21:58:00.007+03:002008-12-11T03:18:14.506+02:00Some Updates<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQWCr5HhnAfIpzGrC2J28B_rgYci9kwI4HH4bXb0Eq-1QMCp21_S_khUHJ-EEahJNI4uXXAaiJ-7Uev0gj3y7PjBS0Xyin_f1qttwuxLSOsVu5nTQdWSVXab0yAeyrsydFJXVi-U6fLEs/s1600-h/digging.jpg"><img id="BLOGGER_PHOTO_ID_5183616691282190338" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQWCr5HhnAfIpzGrC2J28B_rgYci9kwI4HH4bXb0Eq-1QMCp21_S_khUHJ-EEahJNI4uXXAaiJ-7Uev0gj3y7PjBS0Xyin_f1qttwuxLSOsVu5nTQdWSVXab0yAeyrsydFJXVi-U6fLEs/s320/digging.jpg" border="0" /></a><br /><div>Hey mates,</div><br /><div></div><div>Haven't got alot of time to write because of this crazy semester going on...<br /></div><div>So this is the last week of semester 1A (the one which started after the strike), and the exam season will begin next week with a fine one in Mechanics, and after that there will be alot of fun with Infinitesimal Calculus, Intro to CS and Discrete Mathematics.</div><br /><div></div><div>To the more interesting updates: I'm working on a small project, which is currently called iWC and its purpose is to remote control Winamp from the iPhone (possibly creating a similar iPod interface for that).</div><br /><div>The iPhone has some remote control applications for your computer, mostly using VNC, but I want a clean and fast interface for song selection, volume control and so on.</div><br /><div></div><div>So right now I'm working on a module that will communicate with Winamp using window messages (their API is one of the worst I've seen, but is full with funny comments - mabye I'll post some when I'll have some more time). After I'll finish that one I'm planning creating a client using <a href="http://rpyc.wikispaces.com/">RPyC</a> and <a href="http://www.saurik.com/id/5">pyobjc</a>.</div><br /><div></div><div>That's it for now - I hope to give more updates soon about my progress.</div><br /><div>And until next time... cy'a folks!</div>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com0tag:blogger.com,1999:blog-7171891163942201611.post-20635645066494243132008-02-25T21:43:00.006+02:002008-02-25T22:47:17.425+02:0080's The Limit<a href="http://www.classiccmp.org/dunfield/c64/h/complete.jpg"><img style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://www.classiccmp.org/dunfield/c64/h/complete.jpg" border="0" /></a><br /><div>I'm currently "studying" the course "Introduction to computer science" at the university.</div><br /><div>Why "studying"? Because I have to, and because I don't really go to lectures because they are boring as hell and useless.</div><br /><div>Anyhow, the course has its own coding conventions and style. Most of the conventions are totally fine and agreeable, but there's one that's driving me crazy - "Thou shall not write lines that include more than 80 characters.".<br /></div><div>The reason is not specified (as usual here - why specify why to do something when you can just tell the students to do A and B), but I may assume it concerns the 1980's DOS/Amiga/Mainframes 80 chars limit, when working in textual video mode.</div><br /><div>So let's count how many graphical operating systems that can display and print lines longer than 80 chars in one line got released by Microsoft(TM) 'till now:</div><ol><li>Microsoft(TM) Windows(R) 3.1</li><li>Microsoft(TM) Windows(R) NT 4</li><li>Microsoft(TM) Windows(R) 95</li><li>Microsoft(TM) Windows(R) 98</li><li>Microsoft(TM) Windows(R) ME</li><li>Microsoft(TM) Windows(R) 2000</li><li>Microsoft(TM) Windows(R) XP</li><li>Microsoft(TM) Windows(R) 2003</li><li>Microsoft(TM) Windows(R) Vista</li></ol><p>And they still haven't found the "Change font size" button... too sad.</p><p>Limiting line length is good, but why limit it to the ridiculous number of 80? When programming in an object oriented language, creating a line which calls a class method and specifying 2-3 parameters will exceed this limit. So to avoid losing points an evil linefeed needs to be inserted.</p><p>The huge problem here, as I see it, is that most of the people studying with me haven't programmed in a real programming language (not Pascal) and doesn't know how a real-life code should look like. This is one of some bad habits they learn in a place that should theoretically teach them everything they should know about programming.</p><p>So what's the moral here? Read <a href="http://www.cc2e.com/">Code Complete</a> and forget about people who know nothing about programming.</p>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com7tag:blogger.com,1999:blog-7171891163942201611.post-7620933601512273332008-02-23T23:20:00.000+02:002008-02-23T11:27:34.482+02:00Guitar Hero and Actual Guitar PlayingSomehow this post managed to stay in my draft waiting for me to finish it for two months, so here it goes.<br /><br />(If you don't know what Guitar Hero is, it probably means that you just woke up from the dead. So first of all, get a shower because you stink, and then check out <a href="http://en.wikipedia.org/wiki/Guitar_Hero_%28series%29">Wikipedia</a>).<br /><br />Some time ago I've seen a comic strip in the internet making fun of people who play Guitar Hero by saying that maybe they are able to finish the game in "Expert" difficulty, but they don't even know how to hold a real guitar and play a basic chord.<br /><br />This made me laugh mostly because it's true, but then it made me think about it in another way - is Guitar Hero related to real guitar playing at all?<br /><br />To figure it out I came up with the following questions:<br /><ul><li>Will expert Guitar Hero players learn how to play guitar faster than a non-Guitar Hero players?</li></ul><ul><li>Will experienced guitar players or expert musicians learn the Guitar Hero skills faster than others?</li></ul>No doubt a research needs to be conducted to resolve those questions, but I'll try to make some assumptions.<br /><br />Here are some milestones I thought about that are needed to be achieved in order to gain experience in the game. They are mostly based on my experience and watching new players moving from playing in easy difficulty to hard (I've seen about 5-10 of them).<br /><br />Easy:<br /><ul><li>Pressing the first three buttons (green, red, yellow) correctly and strumming downward when needed.</li><li>Pressing more than one button simultaneously.<br /></li></ul>Medium:<br /><ul><li>Dealing with the fourth (blue) button correctly.</li></ul><ul><li>Starting to connect with the song's rhythm.</li></ul>Hard:<br /><ul><li>Using all the five buttons (mostly the fifth, orange button). This implicitly means learning how to move the hand across the "guitar's" neck without looking.</li></ul><ul><li>Beginning to play a song more by listening to it than looking at every single note.</li></ul><ul><li>Strumming upward in addition to the downward strumming.</li></ul><ul><li>Getting used to hard solos.</li></ul>Expert:<br /><ul><li>"Parse" a screen full of notes by looking at the large picture, rather than looking at each note.</li></ul><ul><li>Using the hammer-off / pull-on technique.</li></ul><ul><li>Quick finger positioning, mostly for 3-string chords (Guitar Hero III).</li></ul><br />So basically the important techniques that are being practiced are:<br /><ul><li>Finger positioning.</li></ul><ul><li>Note reading / parsing.</li></ul><ul><li>Rhythm processing.</li></ul><ul><li>Strumming.</li></ul><br />Leaving the note reading alone (let's face it – they are not even close to tabs) I think that most of the techniques here are mostly crucial for a fair guitar play. Also I must about myself, that after wasting some time with Guitar Hero and reaching expert difficulty, I really did notice an improvement in my real guitar play, mostly dealing with song rhythms.<br /><br />So I think that the answer for the first question is yes.<br /><br />The answer to the second question is much more obvious after the analysis has been done – it's quite clear that experienced players will stumble upon smaller obstacles that the newbies; the things they need to learn is more or less how to handle the fake guitar and how to read the notes quickly. I'm basing that on my flat mate Ami, who is quite an experienced piano player. He finished a song in "Expert" level on his first play ever, and still is the best Guitar Hero player I've ever seen in real life.<br /><br />Bottom line: not all the games we play are useless: in some we study about vicious weapons and what's the most efficient way to kill a monster, in some we learn how to wear a dog or manipulate George Washington (sorry for the spoiler) and in some we learn how to play a real guitar.<br /><br />Happy gaming!StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com3tag:blogger.com,1999:blog-7171891163942201611.post-5032134522089943632008-02-09T12:25:00.000+02:002008-12-11T03:18:15.110+02:00iPhone Accessories and Cargo TrackingAfter purchasing my iPhone and before unlocking it, I used to hang out with three different devices: iPhone (for accessing wifi networks and just being cool), cellphone and an iPod.<br /><br />The main target was to drop down to only one piece of equipment - the iPhone, so first I needed to get my iPod out of the picture.<br /><br />As you may know, the iPhone usually comes with 8GB of flash memory (a 16GB model have been released last week), so it also acts as an iPod. The thing that prevented me to use it as one was the earbuds that come with it. I don't like earphones, because I got used to in-ear phones after using 2 different models (Apple in-ear phones and a Pioneer model I bought after my Apple one's got damaged by my stupidity and water). Moreover, I didn't like the sound qualify of the earphones that came with the iPhone because they have a weak mid, and more important, bass response.<br /><br />My Pioneer phones that are used with the iPod cannot be connected to the iPhone because the mini-PL connector now includes a microphone (it's longer than 9mm), so I decided to search for a mid-high end in-ear phones for my new-precious iPhone.<br /><p>After digging a bit I've found this <a href="http://www.v-moda.com/collection/modaphones/vibe%20duo.aspx">V-Moda Vibe Duo in-ear phones</a>, and decided to order them. Needless to say, I've already purchased some stuff over the net, and by paying only 5$ to regular UPS shipping I thought I'll get the package in 2-3 weeks, in which I'll be left in the dark and just sit there waiting for the package to arrive (not really).</p><p>Two hours after making the deal, I got a mail from v-moda, providing a link to a tracking page that gives information about my package.</p><p>Immediately, the following psuedo-algorithm went into action:</p><ul><li>Wait 5 minutes.</li><li>Refresh the page.</li><li>If a new details about the package has been added: go to your flatmates and update them beatifically about the progess, otherwise: complain like an old grandma about the lack of information.</li><li>Repeat the process until someone from UPS calls and tells you that your package is at the door.</li></ul><p>The funny thing is that the whole situation is explained perfectly in <a href="http://xkcd.com/281/">this</a> xkcd strip, and that I laughed at Segal while he anticipated a package a month ago while doing exactly the same :)</p><p>So the packaged arrived in 3 days (!!!), after passing through Germany and Turkey and I got very happy.</p><p>A nice look at the irrational ratio between the headphones and the package itself:</p><img id="BLOGGER_PHOTO_ID_5165861947931500194" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5MT7GgIdJ5CmeTZJ5E7gKTxfFBtBXpaO1vW4mxx_gaaUJV1ETF16uKBCkaSnwNH8XsA0qky24PdRWP7qA1IYodRHS1_E1MB1dcpbBjxvcACUbN7ekFQtKXrn-irxWTvT9rO1DEX8hzss/s320/headphones.jpg" border="0" /><br /><p>P.S. 1 - for the interested readers (if you got this far) who are interested in details, here it how it looks like:<br /></p><br /><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAVXTVT43_RGXxLnMVO-SjaZBtQhvH2O1ybNpuVIUzeWPgXAEP-SSmwjsA3m3qnChbj7h6-HgZpQVTt785jXTXmuE7w79BUeTTuGxUEkVmeLtH5xPKlVo9TPzZFv_WbaC5CzPESO6UzTg/s1600-h/tracking.gif"><img id="BLOGGER_PHOTO_ID_5164926602838679170" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAVXTVT43_RGXxLnMVO-SjaZBtQhvH2O1ybNpuVIUzeWPgXAEP-SSmwjsA3m3qnChbj7h6-HgZpQVTt785jXTXmuE7w79BUeTTuGxUEkVmeLtH5xPKlVo9TPzZFv_WbaC5CzPESO6UzTg/s320/tracking.gif" border="0" /></a></p><p>P.S. 2 - Props to <a href="http://iphonejtag.blogspot.com/">Geohot</a> for unlocking the 1.1.2/1.1.3 OTB iPhones, which allowed me to get rid of my Nokia 6230i too.</p>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com2tag:blogger.com,1999:blog-7171891163942201611.post-57068006827640427392008-01-25T20:33:00.000+02:002008-01-25T20:40:45.797+02:00Short Term Memory?for i in xrange(START_OF_SEMESTER, END_OF_SEMESTER, WEEK):<br /> study_and_have_fun_in_jerusalem()<br /><br /> go_back_home()<br /><br /> suffer()<br /><br /> go_to_jerusalem()StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com3tag:blogger.com,1999:blog-7171891163942201611.post-26145798556964528322008-01-19T13:20:00.000+02:002008-01-19T13:37:25.868+02:00Does XKCD Involves Conspiracy?First of all, for those of you who are not familiar with XKCD - check <a href="http://xkcd.com/">it</a> out.<br /><br />It's a preety famous geek web comic, that got headlines in the past week because it changed a google search string results from two to a few thousands (<a href="http://slashdot.org/article.pl?sid=08/01/12/1312258">Slashdot story here</a>).<br /><br />Anyhow, in the couple of months we're living in the apartment here in Jerusalem, we've noticed this webcomic is getting closer and closer to our reality here (and leave the Guitar Hero strips alone! :)).<br /><br />So there are two options:<br /><ol><li>Someone is spying on us.</li><li>Our life is duplicated somewhere else in the other end of the planet.</li></ol><p>Hmm...</p>StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com2tag:blogger.com,1999:blog-7171891163942201611.post-2357298868679703152008-01-09T19:41:00.000+02:002008-01-10T01:34:47.686+02:00Windows XP Performance TweaksIn the last few weeks, I've been playing with my memory management settings in Windows to enhance performance. After all, nobody wants to wait for his computer to finish doing something.<br /><br />It has all begun when I purchased another 1GB of RAM for my computer. After installing it, I happily thought I would be able to get rid of the page file (I've heard about some people doing it). The reasons are quite obvious - having a data transfer rate of ~1GB/sec (RAM) instead of ~50MB/sec (HDD) when paging memory.<br /><br />After removing the page file I was quite happy, or shall I say Windows was happy, until I started running memory consuming applications like Guitar Pro 5, which loads all of its RSE (Real Sound Engine) samples to the RAM. Windows then became pretty sick and told me he is increasing the page file size (of course he can't do that, because I disabled the page file).<br /><br />So I gave up and set-up a page file of 2GB, but still felt some tasks are too slow for an AMD dual-core 3800+ with that amount of RAM.<br /><br />Then I started looking for windows performance tips, most of them I knew from my past occupation as a sysadmin, like setting the classic windows theme, disabling visual effects, shutting down the indexing service and more.<br /><br />Some tips, however, were not known to me and even surprised me a bit.<br /><br />For example, dealing with file last access timestamp. When Windows accesses a file for read or write it changes a value in the file system known as the file last access time. This means that your HD is busy writing data to itself, even if it only reads files!<br /><br />All of this is pretty known and trivial, but the less trivial thing is that you can disable this useless option (no application that I know of uses this field anyway) by entering the command prompt and using fsutil:<br /><br /><strong>fsutil behavior set disablelastaccess 1</strong><br /><br />After setting this flag I've noticed that explorer runs much faster, especially when loading a new directory listing and displaying it.<br /><br />Few more tips can be found here (check out tips 4,5,6): http://kadaitcha.cx/performance.html<br /><br />And also here:<br />http://arstechnica.com/guides/tweaks/sgp-tweaks.arsStatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com1tag:blogger.com,1999:blog-7171891163942201611.post-360939784815547262008-01-05T23:48:00.000+02:002008-01-06T00:00:53.423+02:00Suggestion for a new Facebook API functionAfter I got a message from a 16 years old girl (does she knows how to write?), I thought about a new function that facebook applications should use:<br /><br />def is_legit(filrting_girl_age):<br /> if self.age / 2 + 7 > flirting_girl_age:<br /> print "What the hell were you thinking!"<br /> return wtf<br /> else:<br /> print "All is good, you can go now!"<br /> return trueStatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com0tag:blogger.com,1999:blog-7171891163942201611.post-76741512915959321262008-01-03T00:14:00.000+02:002008-01-03T00:56:20.410+02:00A Degree of Inner Turbulence(Outro of) <u>Lady Macbeth / Serotonin Blues</u><br /><u></u><br /><em>"Things have changed, people changed.<br />Feels like there's so much a weight on every word.<br />Conversations are heavy, too heavy.<br />We're trying so hard, for so long and it just exhausts me. Terrified.<br />There's a line that keeps repeating in my head over and over again:<br />why does this doesn't change?"</em><br /><br />The past two weeks made me think about things I never delved into. The reasons nor the triggers cannot be explained, but I think it's some kind of the depression involved with the weather, strike in the university and just a lot of different stuff that happened to me or to friends of mine that shaken me so much.<br /><br />A lot of questions have been raised - not all of them were resolved. Not all of them CAN be resolved, in the current reasonable time frame at least.<br /><br />The only thing I can say is that it's so strange how things are so much entwined one with another; sometimes so entwined it makes me wonder if there's an entity that arranges all this things to happen together - maybe for us to learn more about ourselves, maybe for its own sick humour.<br /><br />But the thing that I've noticed the most, is that everything is balanced - you can't win it all and you can't lose it all. So we all need to see one's cup as half full and help friends when they see their cup as half empty. That's the true meaning of life.StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com0tag:blogger.com,1999:blog-7171891163942201611.post-64467469449051421102007-12-23T23:47:00.000+02:002007-12-24T17:53:02.042+02:00Challenge SitesThe internet is full of challenge sites - those where you need to solve a riddle and reach higher rank or level, and maybe even win a prize :)<br /><br />Most of these sites are dealing with computer challenges, or if to be more specific - security challenges.<br /><br />Once upon a time, when I had time to spend, I got addicted to such sites, and solved or partially solved most of the famous ones.<br /><br />Why I got addicted? Not recently I found out that when I encounter a problem that I can't solve it really bugs my mind, even when I leave it and go to do something else. But I like that feeling. Doing a research to solve problems is one of the things I enjoy the most, not to mention the "high" produced by solving one, which is so addictive, that I must get more of it :)<br /><br />Considering the educational value, I think these sites allow you to learn random material in the best way: solving real world problems. I've always had a problem with learning stuff just to "know it when I'll need it". So this is a good and healthy way to learn and explore new stuff.<br /><br /><u>So what makes a good challenge site?</u><br /><br />First, the site should include some kind of competition - whether it's based on site-wide ranks or levels that the user advances in.<br />Second, the riddles should be as clear as possible - I just can't count the number of times I tried solving something without perfectly knowing what I need to achieve. This can be really frustrating to know retroactively that the solution to the riddle you tried to solve for a couple of months is so easy, but you just didn't get the point.<br />And third, to allow users to work on different problems simultaneously. This really helps when you're stuck on one riddle, but then you have 3-4 more to work on. Usually fresh ideas pop up after taking a break and doing something else.<br /><br />Now, because few people asked me to give then a list of challenge sites - here's a list with a short explanation of each one:<br /><br /><a href="http://www.notpron.com/">NotPron</a> - Riddle site that is based on images. To reach the next level you need to figure out the username / password or the name of the next page.<br /><br /><a href="http://quiz.ngsec.com/">NgSec quiz</a> - Basic security challenge - pretty easy for the experienced ones.<br /><br /><a href="http://www.trythis0ne.com/">TryThis0ne</a> - Israeli security challenges. Some of them are nice, some of them are pointless.<br /><br /><a href="http://www.pulltheplug.org/wargames/">PullThePlug</a> wargames - Includes three different games: Vortex (exploits under linux), Semtex (network challenges) and BlackSun (advanced exploitation techniques). I've worked on Semtex for some time (reached level 11) and it taught me some things about programming network code under linux with C, raw sockets and more.<br /><br /><a href="http://www.caesum.com/game/">Electrica the puzzle challenge</a> - Possibly the best and hardest puzzle challenge I've ever played. Includes math, encryption, programming, reverse engineering and more puzzles. Recommended! :)<br /><br /><a href="http://www.slyfx.com/">Slyfx</a> - Nice and pretty easy security challenge, dealing mostly with web security.<br /><br /><a href="http://www.pythonchallenge.com/">PythonChallenge</a> - Based on the concept of notpron, pythonchallenge is by far the best way I can think of learning Python - solving riddles designed to be solved by this scripting language. Of course you can solve this levels with any programming language, but it will be much more complicated (because about half of the levels includes image processing, which goes easy with Python's PIL module). The cool thing about python challenge is that after you solve a level, you can enter a solution page that shows different python codes used to solve it.<br /><br /><a href="http://www.rankk.org/">Rankk</a> - A challenge site that started a few months ago, also dealing with security and programming.<br /><br /><a href="http://www.mod-x.co.uk/">Mod-X</a> - Security challenges - some of them are quite hard (level 6-8 mostly).<br /><br /><a href="http://3564020356.org/">+Ma's Reversing</a> - Very difficult site (not so clear though), including some really strange problems that you need to analyze for hours.<br /><br /><a href="http://hackergames.net/">HackerGames</a> - A portal including links to alot of challenges sites - some of them are total crap (after playing some challenges you see the same levels over and over again).<br /><br />Also, two RIP sites that worth mentioning:<br /><br /><a href="http://www.try2hack.nl/">Try2hack</a> - The first challenge site I've ever played, and probably one of the first sites in the world.<br /><br /><a href="http://www.arcanum.co.nz/">Arcanum</a> - Awesome site, including logic, programming, encryption and misc. challenge for every level (7 in total). Too bad the site is dead.<br /><br />Now it's your turn - if YOU have a list of good challenge sites to offer please post them as a talkback.<br /><br />Happy solving!StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com2tag:blogger.com,1999:blog-7171891163942201611.post-74771646949832890552007-12-23T22:56:00.000+02:002007-12-23T23:44:37.499+02:00Welcome!<strong>Hello and welcome to my new blog!</strong><br /><br />Because I would like to be as laconic as possible (=lazy), I will answer a few questions in a Q&A format:<br /><br />Q: Why are you opening a blog?<br />A: Two main reasons:<br />1. sometime I want to express myself in writing, and because I don't write poems to the drawer (well, mostly because I don't have any of them both) and I need to publish my thoughts somewhere, I think a blog is the exact tool for that.<br />2. I don't like spam groups - so posting funny / interesting / informative things here will do the trick, without blowing up a lot of mailboxes.<br /><br />Q: What this blog will be about?<br />A: This blog will be about everything that's on my mind - whether it's geek stuff, music, art, actuality, social life or whatsoever.<br /><br />Q: Why are you writing in english, you sinner?<br />A: I've wondered whether to write in english or hebrew, with good reasons for both, but thinking about writing technical posts in hebrew got me sick and made me choose the former.<br /><br />Q: How does your family name became a verb?<br />A: It's a long story - just accept it as-is :)StatusReporthttp://www.blogger.com/profile/01012141582223899573noreply@blogger.com6