Friday, July 06, 2007

איך גונבים אותך בגודל הכונן הקשיח


קניתי לפני כמה זמן כונן של SEAGATE

רציתי שיהיה לי כונן גיבויים ל LAPTOP שלי, להורדות וכדומה. גם חשבתי אולי לחבר אותו
ל-PS2 שלי.
הדגם שלו ST3320620A דגם IDE Baracuda 7200.10 320 Gbytes
לא קניתי מחבר USB קוראSATA, המחבר שלי די ישן, כמעט בן שנה..
חיברתי אותו למחשב וקיבלתי הודעה שהוא אכן 320GB אבל אני יכול לפרמט רק 298GB.

מה זה ??? רימו אותי?

ואז חיפשתי בגוגל, כי זו באמת לא הפעם הראשונה שככה גונבים ממני גודל HD.

ומה גיליתי ??

גיליתי את הכתבה הזו: שמדברת על בעיות בגודל HD

בכתבה אחד הטוקבקיסטים ציין שכל הכוננים מגיעים מהיצרן עם הגודל בבסיס 10 (דצימלי) .

ואם אתם רוצים לחשב גודל עושים ככה





1. קח את גודל ה HD שרשום לך (שקנית%^$%^)
במקרה שלי 320GB
2. הוסף לו 9 אפסים או 3 כפולות של 1000 (דצימלי כן??)
3. חלק בשלוש כפולות של 1024 (בינארי כן? .. 2 בחזקת 10 זה 1024)
4. קבל את הגודל האמיתי.



במקרה שלי:
320000000000
/
1024
/
1024
/
1024
=
298.02322387695312






אז הנה הרמאות הגדולה של ההייטק, גניבת גודל HD.

הם גנבו לי 22GB שזה כמעט גודל הHD שיש לי במחשב הנייד שלי.



כאן לא מדובר על איבוד של מגה שניים או 10\ מדובר על איבוד מקום של מספר DVDים שיכולתי
לעבוד איתם.



אני כועס, אבל יותר לא יעבדו עלי.


Monday, May 28, 2007

Microsoft getting even with Adobe..

For a few months now every developer around has been noticing Microsofts' unilateral interest in destroying the user experience regarding Flash. It started with the infamous "Click to Activate", continued with Window Presentation Foundation and Expresion and now, welcome the new comer to the stage: Silverlight.

It's easy to see why. Flash programmers have been taking a back seat at macromedia for years.
Any flash application you encounter holds some type of programming behind it. Be it 3D graphic computations or simple user/password authentication systems, the flash programmers have their work cut out for them.

Basicaly the problem is this:
  • designers ARE NOT PROGRAMMERS
  • developers ARE NOT DESIGNERS

For some reason macromedia didn't really understand this phenomenon, so designers learnt crude programming, and programmers didn't really touch flash (ActionScript).
Usually what you met in the industry were flash designers who took some interest in Programming ActionScript, and become flash programmers.

To find a good flash programmer was quite a task.

Anyone reading this who is an experience programmer should be grabbing their hair just about now, as I did when I came across this phenomenon at my previous job. I employed flash programmers who didn't know simple design patterns, who didn't understand events and delegates, who had no idea what a Web Service is or how to manipulate it.

The Development Environment

Anyone who is used to program with Microsoft Visual studio, Eclipse, PHP Studio is used to a very comfortable IDE.

  • Search across files
  • a good sound framework.
  • Object oriented programming.
  • Intellisense (code completion)

Are just a few of the attributes we take for granted in the environments we use.

Flash programmers have none of these. They have Flash studio, which is a terrible IDE for programmers (as it sould be, it was designed for Designers; and they love it).

A simple "search everywhere" to locate a piece of code SOMEWHERE in the flash file is impossible, all you can do is "search the current OPEN file" – and what good does that do ?
Oh, the flash file is a huge jumble of binary code, you can't search with external editors.
Infrastructure is terrible, you want to build your own classes, fine. You can’t compile and re-use the code, you have to have all the sources there, all the time.

Oh, you remember code-compile-test-recode ? in the flash IDE it can take 3-5 min to build your app. So remember to code as much as possible else you spend most of your day staring at the build screen.

These are just a few problems that we encountered.

The biggest one ? Flash is a proprietary format, and Adobe isn’t releasing it. So you can only build Flash apps via the ActionScript run with the Flash Studio (you get my drift).

Recently adobe came out with FLEX, which was the answer to flash programming problems, this is an IDE based on the Eclipse platform, but it was still too little, too late and not enough of a change. The intellisense isn’t close to what is needed, and don’t get me started about the Flash Plugin versions.

Silverlight

Silverlight launched very recently is Microsoft's comeback to Adobes' impotence. With Silverlight you can program using the new Visual Studio (code named "Orcas"). It can be programmed using any Dot Net language. The format is licensed under open-source code, so anyone can add things to it. The plugin works for Safari, Firefox and IE.

checkout these posts:

http://www.techcrunch.com/2007/04/30/silverlight-the-web-just-got-richer/

http://blog.wired.com/monkeybites/2007/02/yahoo_launches_.html

http://blog.wired.com/monkeybites/2007/05/mashin_with_mic.html

http://www.popfly.ms/

http://zero1infinity.stumbleupon.com/

Friday, May 18, 2007

Aptana JavaScript Editor

I love good IDE's.


One of the reason's I love eclipse is because it is so versatile. You can add any type of addin to Eclipse, and there are many out there. Today I wish to talk a little about APTANA IDE.





The Aptana is an IDE for Javascript (AJAX anyone?) with an excellent bonus.
It allows you to use code-Assist, or as Microsoft users call it "intellisense". You can add your own libraries to the code assist area, and it considers them part of the framework.

It works with CSS, HTML, JS, RUBY, RHTML, RAILS.


It's pretty easy to use with Microsoft's excellent Ajax Framework (formerly known as atlas).
It's still not as god as microsoft's Visual Studio 2005 IDE. check out the free version
Microsoft Web Developer Express

Since VS2005 and the free version as well, do not have good javascript support, i rally my work around both IDE's leaving the hardcore JS to APTANA and the debugging and design to the VS2005.

They work well together, and do not step on each others toes.

give them a try.

Tuesday, May 15, 2007

Bluetooth away

The Bluetooth technology that has hit us is nothing short of incredible. I have always been one for technology, and for protocols that have been standardized.

  • When I sync'd my nokia's, it was always via IR, never via cable (waste of money, each cell phone having its own cable...) .
  • Having an IR keyboard was fun (and I never suffered all the loss-of-connectivity others complained about all the time).
  • Having an Fm wireless keyboard/mouse is also cheap, and fun.
  • I guess having a Bluetooth keyboard/mouse is the same. - I dunno I don't have 'em.

However, most of the BT accessories have been aimed at the cell phone market.Mostly the BT earphones are most popular.

I have a nokia 7370, and a nokia 813i BT earphone. I also own a couple of laptops some with BT embedded devices as well as a BT USB dongle (Motorola). I use BT to sync my phone to my outlook via Nokia's free software.

Yesterday-night I couldn't sleep. I'm an insomniac, but it's irrelevant right now. So I was thinking:

"I have an ear-piece, why can't I connect it to the computer and listen to music (mp3) at the 7m distance I speak with my cell-phone ?"

So I started digging and came up with Wei-Meng Lee's input, he wrote at WindowsDevCenter. In his article he states that you need to use broadcom's stack to change your BT profile.I have to say, It didn't work... and I am still very disapointed.

However... I have come across an excellent little piece of ingenuity.

Use your Cell Phone as a BT remote control

I think it's an ingenious idea.

The guys a www.salling.com have created this awesome program called "Salling Clicker" for PC and MAC.

What it does is by using Java scripts that run via the windows scripting host in your computer you can control anything on your computer from your BT enabled phone.Now I must say for the cost of $23.95 you can have your own BT Remote control from your Laptop is an ok deal.

Besides this being an excellent idea, with tons of supported phones, it also allows ME to add my own JS or VB scripts, and enhance the basic functionalities of the Clicker.I tested the free version and it works (on Bsplayer, my fav app) , and think it's a cool idea.

For anyone who knows me knows 2 things:

  1. I give lectures with PowerPoint slides
  2. I am an avid film buff.

I now have a customizable/scriptable remote control!!

Sunday, May 13, 2007

בדיחות

בחור אחד הגיע לראיון עבודה בכלבו גדול ומפורסם. המראיין ששוחח אתו התלהב ממנו מאוד, אולם דבר אחד הפריע לו מלקבל את הבחור לעבודה: כל הזמן הוא היה ממצמץ בעין אחת. "תראה בחור", הוא הסביר, "כאן זה כלבו מכובד ולא נוכל לקבל איש מכירות שיקרוץ כל הזמן." "אה, זה שום דבר", אמר הבחור, "אני לוקח כדור אספירין וזה עובר. "באמת?" שאל המראיין, "אפשר לראות?" הכניס הבחור את ידו לכיסו כדי להוציא את האספירין. תוך כדי חיפוש הוא הוציא חפיסות קונדומים בצבעים שונים. "תראה בחור", אמר לו המראיין, "אנחנו כלבו מכובד ולא נוכל להעסיק עובדים שכל הזמן מסתובבים עם חפיסות קונדומים ומחפשים בחורות."- מחפשים בחורות? מה פתאום?? אני בחור הגון שנשוי באושר! אני לא מחפש שום בחורות!- באמת? אז מה זה כל הקונדומים הצבעוניים הללו?-אה... זה... אני אסביר לך: ניסית פעם להיכנס לבית מרקחת ולבקש מהרוקח חבילת אספירין תוך כדי קריצה?

Tuesday, May 08, 2007

Kill Kazini

How to kill the Kazini Web Development Server

Kazini is a very nice development server, and is a great blessing for programmers, however there are times you wish to neuralize all the kazinis at the same time.
It would not be ne
When you wish to get rid of all the webservices together, kill the Application, test a-new, whatever the reason. (This function wouldn't be needed if when you clicked on the [STOP] button. it would kill the kazinis itself, but since it doesn't:

  • run this little snippet from the command line (Start->Run)
    C:\>taskkill /F /FI "IMAGENAME eq WebDev.WebServer.EXE"

Although they stay visible in the taskbar, they are dead (just move the mouse ober them to see)
this happens because the Windows hasn't yet updated the bar, because it does not monitor the commandline (for obvious reasons)



  • another option would be to save it to a batch file
(everything on the same line)
C:\>echo taskkill /F /FI "IMAGENAME eq WebDev.WebServer.EXE" > c:\KillKazini.bat
then you can run (Start->Run->C:\KillKazini)

  • another option would be to add it to the External Tools menu

in Visual Studio 2005

  1. [Tools]->[External Tools..
  2. Click on [Add]
Title: Kill all Kizinis
Command: %WINDIR%\SYSTEM32\taskkill.exe
Arguments: /F /FI "IMAGENAME eq WebDev.WebServer.EXE"

3. Click [OK]

Now to use:

[Tools]->[Kill all Kazinis]

c you next time

Monday, May 07, 2007

Bookmarking..

Bookmarking

I think it's been quite a chase to locate a good bookmarking site.

I have narrowed it down to 2 providers:

Sync2IT
www.sync2it.com - I have used their services for years now.
They are free.
you d/l and use a small resident program that PHYICALLY syncs your bookmarks in IE, Firefox, Opera to the site.. also reads hebrew and other non english and accented bookmarks and titles.

plus side - very fast, reliable, puts your bookmarks on the computer and syncs your office bookmarks and your home bookmarks, your laptop etc.. you can search your bookmarks, search others bookmarks, create collections, recieve updates of others collections etc..


downside - the only way i am able to add a bookmark is via my browser, so if i dont want to install the client for some reason, or i just want to manage my bookmarks i must be on my own machine. - this is a big downside - but maybe i just didn't read the faq.


Del.ico.us
http://del.icio.us

plus side - Everything is on the web, including the management software. you can use Tags to say what the bookmark is about, and you can put a bookmark in many different "virtual" locations, this eliminates the "sophies choice" syndrome of where to keep the bookmark: under programming? under customising, under dot net or under framework ? or maybe under cool stuff? or Object Oriented Ideas? - you get the idea.

downside - Everything is on the web, so you need to have a browser page open at your account.. this is bothersome for me, i hate having lots of windows open (and i usually have at least 7 if not 10 browsers open together) - I use Maxthon.. www.maxthon.com
Solution Folders

This is a great way to orginize projects in your IDE.

by using a visual representation of folders in your IDE which do not change anything real in your projects, you can setup all your business objects under one solution folder:
Business
all your UI stuff under UI
and inside UI you can also have Custom etc..

Sunday, May 06, 2007

KeyWord density, and how to improve your pages visibility to search engines

Search Engine Optimization - Keywords

If you wish to find out what your page is really talking about, take a look through the eyes of a search-engines' spider. How many of the ideas you illustrate are really being considered correctly in the search engine.

http://www.webconfs.com/keyword-density-checker.php

many times you will find out the page you are writing is actually dealing with something completely different.

The way the spiders read a page is by finding what keywords appear in the page. and how many times (what percentage) they appear in the page.

Some spiders also look at things such as, if there is a title and then keywords from the title appear in the text bellow it, this makes sense that the text is really about the keywords described and strengthens the connection between title and context. This makes the keywords in the title even more important.
ASP NET Page EVENTS:

http://aspalliance.com/articleViewer.aspx?aId=134&pId
http://www.15seconds.com/issue/020102.htm

excellent resource
http://john-sheehan.com/blog/wp-content/uploads/aspnet-life-cycles-events.pdf

http://msdn2.microsoft.com/en-us/library/ms178472.aspx

http://www.codeproject.com/useritems/lifecycle.asp


Listing 1: Page Events Summary

MethodPostBackControls

ConstructorAlwaysAll
AddParsedSubObjectAlwaysAll
DeterminePostBackModeAlwaysPage
OnInitAlwaysAll

LoadPageStateFromPersistenceMediumPostBackPage
LoadViewStatePostBackAll
ProcessPostData1PostBackPage
OnLoadAlwaysAll

ProcessPostData2PostBackPage
RaiseChangedEventsPostBackPage
RaisePostBackEventPostBackPage
OnPreRenderAlwaysAll

SaveViewStateAlwaysAll
SavePageStateToPersistenceMediumAlwaysPage
RenderAlwaysAll
OnUnloadAlwaysAll


From time to time the ASPNET worker process just conks out..

This little snippet will tell you why.

http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx


extracted from the site..

Logging ASP.NET Application Shutdown Events


Someone on a listserv recently asked whether there was a way to figure out why and when ASP.NET restarts application domains. Specifically, he was looking for the exact cause of what was triggering them on his application in a production shared hosted environment (was it a web.config file change, a global.asax change, an app_code directory change, a directory delete change, max-num-compilations reached quota, \bin directory change, etc).

Thomas on my team has a cool code-snippet that he wrote that uses some nifty private reflection tricks to capture and log this information. It is pretty easy to re-use and add into any application, and can be used to log the information anywhere you want (the below code use the NT Event Log to save it – but you could just as easily send it to a database or via an email to an admin). The code works with both ASP.NET V1.1 and ASP.NET V2.0.

Simply add the System.Reflection and System.Diagnostics namespaces to your Global.asax class/file, and then add the Application_End event with this code (note: you can also download a .zip file containing the code from here):

public void Application_End() {

HttpRuntime runtime = (HttpRuntime) typeof(System.Web.HttpRuntime).InvokeMember("_theRuntime",

BindingFlags.NonPublic

BindingFlags.Static

BindingFlags.GetField,

null,

null,

null);

if (runtime == null)

return;

string shutDownMessage = (string) runtime.GetType().InvokeMember("_shutDownMessage",

BindingFlags.NonPublic

BindingFlags.Instance

BindingFlags.GetField,

null,

runtime,

null);

string shutDownStack = (string) runtime.GetType().InvokeMember("_shutDownStack",

BindingFlags.NonPublic

BindingFlags.Instance

BindingFlags.GetField,

null,

runtime,

null);

if (!EventLog.SourceExists(".NET Runtime")) {

EventLog.CreateEventSource(".NET Runtime", "Application");

}

EventLog log = new EventLog();

log.Source = ".NET Runtime";

log.WriteEntry(String.Format("\r\n\r\n_shutDownMessage={0}\r\n\r\n_shutDownStack={1}",

shutDownMessage,

shutDownStack),

EventLogEntryType.Error);

}

I tried this out using a simple web-site using ASP.NET 2.0 and the built-in VS Web-Server (aka Cassini). When I changed the web.config file in my running application, the following was logged to my "Application" event viewer:

_shutDownMessage=CONFIG change

HostingEnvironment caused shutdown

CONFIG change

CONFIG change

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

at System.Environment.get_StackTrace()

at System.Web.HttpRuntime.ShutdownAppDomain()

at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()

at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state).

When I updated my Global.asax file with some code change, the following was logged:

_shutDownMessage=Change in GLOBAL.ASAX

Change in GLOBAL.ASAX

Change in GLOBAL.ASAX

HostingEnvironment caused shutdown

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

at System.Environment.get_StackTrace()

at System.Web.HttpRuntime.ShutdownAppDomain()

at System.Web.HttpApplicationFactory.OnAppFileChange(Object sender, FileChangeEvent e)

at System.Web.DirectoryMonitor.FireNotifications()

at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)

at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state).

And when I changed the contents of my \bin directory I got:

_shutDownMessage=Change Notification for critical directories.

bin dir change or directory rename

HostingEnvironment caused shutdown

Directory rename change notification for 'E:\Unload'.

Unload dir change or directory rename

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

at System.Environment.get_StackTrace()

at System.Web.HttpRuntime.ShutdownAppDomain()

at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()

at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.

Hopefully this is a useful trick that you can re-use in your own applications to get better visibility into what is going on with them. If you are using ASP.NET 2.0, then you should definitely also investigate the new ASP.NET 2.0 Health Monitoring feature-set. This provides a rich eventing architecture for instrumenting your code, as well as raising notifications of issues to admins when they occur within your application. K. Scott Allen has written a good overview article of how this new feature-set works, and links to the MSDN documentation.

Hope this helps,

Scott




Published
Wednesday, December 14, 2005 11:04 PM
by
ScottGu