ASP.Net MVC
by someone16 on Nov.03, 2009, under Computers
And last week I learnt that it's very good addition and something that I had been waiting from the release of first ASP.Net framework. I rather programmed in ASP than in ASP.Net because of freedom. In ASP you are free to make your HTML code as you like. In ASP.Net you have some Web Controls which usually generated really nasty code. And you have no control over this code. Postbacks are pain in the ass too. Google and other search engines can't crawl web pages with postbacks because you need javascript to use them (Google recently announced that they were thinking about making javascript-compatible crawler, but for now no one has that capability).
In ASP.Net MVC you can use your own HTML code and do everything as you like. It's similar to ASP without a framework, except that you actually have a framework. Now you have a choice to use either Web Controls or MVC in your projects. And I also saw some web sites made with it already.
BTW classic ASP is still pretty much alive. There are a lot of sites made with them, I guess they just don't have time/experience/need to rewrite everything.
Windows VDS
by someone16 on Sep.20, 2009, under Uncategorized
I know my way around Linux server configuration and PHP programming, because I have a lot of experience. However, I always wanted to try programming in ASP.Net 3.5 and deploying that application to Windows Server 2008.
And so I rent Virtual Dedicated Server (apparently that's another name for Virtual Private Server) with Windows Server 2008 installed for 1 month. First of all, I had to get familiar with Windows way of work (point & click). I managed to get the idea about how to configure IIS and other tools. In Linux environment, you just connect to SSH and start typing commands. In Windows environment, you connect to a server via RDP. It's like working at a physical computer loaded with Windows.
After I successfully configured that, I started to "write" web site in ASP.Net. It is more clicking that writing source code. I had some previous experience in Classic ASP and ASP.Net 2.0, so it wasn't that hard. But more that I was programming that website, more I thought what's the point of this thing?
Yes, you can write applications, and usually you succeed. But what's with that clicking? I want to write code, not click through this and other wizard. I rented a VDS, so I guess there is no way back. And with that thought I continued with my work ... Until I realized that this is going nowhere. I rather use PHP and actually do the programming thing. Next thing is the cost. Linux VPS is not that expensive and Windows VPS can cost even a double the Linux VPS's price.
So a decision was made. Let's get back to PHP & Linux. And yes, I will cancel my Windows VPS.
Nokia Booklet 3G
by someone16 on Aug.24, 2009, under Computers
Key hardware information
- Intel Atom Chipset (Z530 running at 1.6 Ghz). No fan, which means near silent running.
- 120 GB hard disk
- 3G / HSDPA and WiFi connectivity, plus integrated Bluetooth for local wireless communication
- 12 hour battery life
- 19.9 mm thick x 264 mm width x 185 mm depth
- 10.1 inch glass HD ready display
- Front facing video camera mounted, on top of the screen, for video calling
- 1 x HDMI port (for HD video out), 1 x integarted SD card reader, 3 x USB ports, 1 x audio port
- Integrated A-GPS
- Stereo speakers mounted on the front right and left corners
Your location online
by someone16 on Aug.22, 2009, under Computers
If you have an iPhone and a MobileMe subscription it's very easy to publish your location online.
Firstly you need to turn on "Find My iPhone" function on iPhone in Settings application and you need to make sure you have data pushed to the iPhone.
Then you need a PHP class for fetching your iPhone location through me.com (http://clickontyler.com/blog/2009/06/sosumi-a-mobileme-scraper/).
Code for fetching data from the server:
// Get the iPhone location from MobileMe
echo "Fetching iPhone location...";
$mobileMe = new Sosumi ($mobileMeUsername, $mobileMePassword);
$iphoneLocation = $mobileMe->locate();
echo "got it.";
echo "iPhone location: $iphoneLocation->latitude, $iphoneLocation->longitude";
echo "iPhone accuracy: $iphoneLocation->accuracy";
echo "<br />";
if($iphoneLocation->latitude > 0) {
echo file_get_contents("http://example.com/update-location/?latitude=".$iphoneLocation->latitude."&longitude=".$iphoneLocation->longitude."&accuracy=".$iphoneLocation->accuracy."&key=auth-key");
}
// Now update Google Latitude
//echo "Updating Google Latitude...";
//$google->updateLatitude($iphoneLocation->latitude, $iphoneLocation->longitude,
//<span style="white-space: pre;"> $iphoneLocation->accuracy);
// All done.
echo "Done!";
<?php
include("sosumi.php");
$mobileMe = new Sosumi ("MobileMe User Name", "MobileMe Password");
$iphoneLocation = $mobileMe->locate();
if($iphoneLocation->latitude > 0) {
echo "iPhone location: $iphoneLocation->latitude, $iphoneLocation->longitude\
";
echo "iPhone accuracy: $iphoneLocation->accuracy";
}else{
echo "Error occured while fetching iPhone location data. Please try again later.";
}
?>
When you visit this script, you should see your iPhone location. So now you can display this data on your page or use Google Maps API to show it on the map.
If you are outdoors, your location is usually shown to a few feet accurate. On the other hand, indoors the GPS signal is weak and this feature is not really usable (accuracy is about 2000 of something - it can be off for about 1000 feet).
HTML5 video and audio tag
by someone16 on Jun.28, 2009, under Computers
Present: Every video site (eg. YouTube) is using Flash player to play video. Almost every podcast site is using Flash player to play audio. Because of that (using Flash in ways in which it was never attended to use) your CPU is under too much load and because of that fans needs to spin faster and battery life is shorter.
Future: Every video/audio web site will be using video/audio tag and videos are going to be played with built-in player. CPU is under normal load and you can watch 1 more hour (approximately) of watching movie/vlog/...
For playing videos through Flash Player, it was necessary to convert it to .flv (Flash Video) file. Latest Flash Player version support .mp4 format (for HD videos). Sites like YouTube must pay companies who owns these formats certain amount of money for using it.
Video tag supports ogg, which is open source and free to use.
Pros and cons of using video tag over Flash Player:
+ less load on CPU (+ longer battery life, + less heat - fans are spinning slower)
+ native support by all operating systems/web browsers (Flash is not fully supported on Linux)
+ easier to create web page which contain video/audio
- no ads and menus (like you see on YouTube and other channels)
- player's design depends on used operating system - owner of site cannot create it's own design and cannot add special functions (you couldn't add links on video like you can now on YouTube)
My point of view: I hope that more and more web browsers will support HTML5 and that designers/programmers will prefer this over Flash Player
Windows 7
by someone16 on Jun.27, 2009, under Computers
Yesterday I tried Windows 7 Release Candidate and I have no problems with it. It's good operating system, but I still prefer Mac OS. Microsoft did a good job with this Windows version and hopefully they will sell more copies of it than of Vista.
It would be great if all Windows XP users move to 7, because XP's are 8 years old and don't have support anymore. But this won't gonna happen. I really do not understand people who insist on using that old OS. Even Linux is better (not that I have anything against it).
AFAIK a lot of people moved to Mac/Linux because Vista is a little bit crappy. Windows 7 must make for all lost users because of Vista. Linux can't do much with it's less than 1% of all users. But there is a posibility of Google making OS. Google give away free services, people trust Google. I think it's only company which can overtake Microsoft's Windows market share.
But that is higly unlikely. I watched video on YouTube where they ask some people if they heart of Google Chrome ... 95% didn't even know what that is. So just because Google makes something doesn't mean, that everyone will use it. (They have some sucessfull projects like Google and Gmail).
So Microsoft has nothing to worry about ... at least for now.
Windows XP versus Windows Vista
by someone16 on Jun.10, 2009, under Computers
System:
- 1.5 GHz Intel Celeron M
- 512 MB RAM
Both systems were fresh installed with all needed drivers.
Results:
Windows Vista Windows XP
+ 000h 00m 02s [ 64K] + 000h 00m 01s [ 64K]
+ 000h 00m 04s [ 128K] + 000h 00m 04s [ 128K]
+ 000h 00m 09s [ 256K] + 000h 00m 09s [ 256K]
+ 000h 00m 24s [ 512K] + 000h 00m 23s [ 512K]
+ 000h 00m 58s [ 1M] + 000h 00m 57s [ 1M]
+ 000h 02m 24s [ 2M] + 000h 02m 21s [ 2M]
+ 000h 05m 23s [ 4M] + 000h 05m 17s [ 4M]
+ 000h 12m 18s [ 8M] + 000h 11m 54s [ 8M]
+ 000h 25m 42s [ 16M] + 000h 25m 52s [ 16M]
+ 000h 53m 33s [ 32M] + 000h 56m 07s [ 32M]
Conclusion: Windows XP did better with small calculations, but Vista beats it at larger calculations (16M and 32M).
AVRs on Ubuntu
by someone16 on May.04, 2009, under Electronics
Installing AVR environment on Linux is very hard. Firstly you need to download source code of all the tools, then install additional necessary libraries and compile everything which can take a lot of time ...
On Ubuntu it's easy, you just need to install 3 programs with apt-get command.
1. Open Terminal
2. Copy-Paste into Terminal:
sudo apt-get install gcc-avr avr-libc avrdude
3. Type your root password
4. Press Enter and press "Y" a few times when it's required
Terminal commands for using this tools are the same as for Mac and even Windows if you are using Win-GCC port. More about that commands next time ...
Why Linux sucks?
by someone16 on May.03, 2009, under Computers
I mostly agree with him. But Linux is still cool and good operation system for using (excluding for electronics work, CAD, ...).
Old mobile phone, RS232
by someone16 on Apr.30, 2009, under Electronics
On the internet I found which pins on telephone are TX, RX, GND. I simply connected them to USB -> RS232 cable, when I found out that I must destroyed it last time by shortcut between ground and 5V.
I remembered about a project in which author used V-USB firmware only implementation of USB fot AVR devices to create home made USB to RS232 converter. In a few minutes I had a working converter (Thanks toOsamu Tamura at Recursion Co., Ltd.)
I connected everything and result was ... garbage. On HyperTerminal I received only garbage. I remember about using MAX232 chip for converting TTL levels to computer levels and vice versa. Tried with this chip and the same thing, of course a little bit different garbage, but still garbage and nothing useful.
So I give up for today ... tomorrow is a new day and maybe I'll have more luck. I could try connecting AVR with code for serial communicating to see if there is a problem on converter/computer or somewhere else.

