SharpStyle Labs

Creativity is coming up with new things. Innovation is doing new things. We make software that helps you do both.

  • Pages

  • a

  • Archives

How to easily create "test users" using Gmail

Posted by mikeg on January 11, 2008

Whenever you release a new version of any application that requires login, you need to test account creation functionality. There are a few possible ways:

  • Most likely you already have a few accounts with your gmail, yahoo, etc personal emails. You can certainly delete those from your system, but sometimes you have some test data in there that you want to keep
  • You can continue creating email addresses at any of the web email providers — that requires a rather significant amount of time as they ask you for a lot of information

This is where Gmail and automatic labels come to to the rescue:

  • Let’s say my email is mike@gmail.com
  • Gmail has a very useful feature where you can send an email to mike+anythingYouWantHere@gmail.com and that email will end up in your mailbox
  • “+” helps mimic “email alias” functionality. You can then apply filters within Gmail
  • That pretty much provides you with unlimited number of email addresses without all the hassle of setting them up

This technique is useful to automatically file emails and can also help you figure out which of the million websites that you signed up for actually sold your email address. It will not help you stop spam, but at least you will know who is responsible for it — sign up to websites using some system like this: mike+websiteName@gmail.com.

Here is help page on this subject from Gmail: http://mail.google.com/support/bin/answer.py?answer=12096&topic=13271

Posted in Development, QA, Testing, Web Development | Tagged: , | 1 Comment »

How to easily create "test users" using Gmail labels

Posted by mikeg on January 11, 2008

Whenever you release a new version of any application that requires login, you need to test account creation functionality. There are a few possible ways:

  • Most likely you already have a few accounts with your gmail, yahoo, etc personal emails. You can certainly delete those from your system, but sometimes you have some test data in there that you want to keep
  • You can continue creating email addresses at any of the web email providers — that requires a rather significant amount of time as they ask you for a lot of information

This is where Gmail and automatic labels come to to the rescue:

  • Let’s say my email is mike@gmail.com
  • Gmail has a very useful feature where you can send an email to mike+anythingYouWantHere@gmail.com and that email will end up in your mailbox
  • “+” after your real address tells Gmail to “label” that email
  • That pretty much provides you with unlimited number of email addresses without all the hassle of setting them up

This technique is useful to automatically file emails and can also help you figure out which of the million websites that you signed up for actually sold your email address. It will not help you stop spam, but at least you will know who is responsible for it — sign up to websites using some system like this: mike+websiteName@gmail.com.

Posted in Development, QA, Testing, Web Development | Tagged: , | 1 Comment »

Better File/Image Renamer

Posted by mikeg on January 10, 2008

If you are interested in a better tool to rename lots of files/images, check out my post on Better File Rename v5: http://blog.grushin.com/2008/01/10/better-fileimage-renamer-handling-digital-pictures/

Posted in Development | Leave a Comment »

i-Mate Momento and Dlink DIR-655 co-existence

Posted by sharpstyle on October 26, 2007

It was my birthday and I had another chance to pick a gift for myself on behalf of my relatives. I decided that it is unlikely that I will ever have the time to build my own DIY Digital Picture Frame, and after some research I decided to purchase i-Mate Momento.

What I liked about it:

  • Standard card/usb drive/flash drive support
  • Wi-Fi support
  • Vista Sideshow support
  • i-Mate’s own Live service that allows RSS type updates

What I was cautious about:

  • Relatively low resolution (not a big problem when looking from a few feet away)
  • Issues with setup from Engadget post

I’ve read a few reviews and ignoring the warnings about setup issues on Engadget ordered it from Amazon.

It arrived and I had the hardest time connecting it to my wireless network. I have Dlink DIR-655 with two laptops connecting to it without any issues. Momento just didn’t see my SSID, while seeing neighbors’ networks. It seems to detect Netgear networks the best. I tried a lot of different things without success: loading settings through USB, changing settings on Dlink router, etc.

Here is what worked for me:

  • Install latest firmware (1.10 as of 2007/10/26) — do not believe status page that says you are running the latest
    • Backup settings before installing this one — it resets everything to default
  • Turn off “Wireless Protected Setup” – that allowed Momento to see my network ssid, but it wasn’t enough
  • Change WPA Mode to "WPA Only"
  • Change Cipher Type from AES to TKIP – that allowed Momento to connect.

Here are my settings:

image

A few words about customer support: horrible, horrible, horrible… Gadget that costs $300 should come with phone support. i-Mate only offers email support that responded with the same generic troubleshooting steps that are available on their website. I am still waiting (3 days) for the answer to my follow up email.

Now that I got it to work, a few first impressions:

  • low resolution is kinda annoying if you are trying to examine the picture closer than few feet
  • Didn’t see a way to setup a schedule for it (turn on at 9AM, turn off at 11PM)
  • Remote control is ok
  • Feels a little sluggish
  • UI is pleasant

More details to come.

Links:

http://www.amazon.com/gp/product/B000J6E2WW/ref=noref/102-6992261-9696926?ie=UTF8&s=photo

http://www.engadget.com/2007/02/25/hands-on-with-the-i-mate-momento-70/

Mike Grushin

Posted in Gadgets, i-Mate Momento | 11 Comments »

Flex Builder 3 Beta 2 — "default xml namespace" issue

Posted by sharpstyle on October 16, 2007

This one seems to be documented here: https://bugs.adobe.com/jira/browse/ASC-2800

Consider the following:

for each (var element : XML in _samplePresetsXml.children())
{
    var ns : Namespace = new Namespace(element.namespace());
   
default xml namespace = ns;
    ….

line with "default xml…" throws the following error during launch:

VerifyError: Error #1025: An invalid register 2 was accessed.
      at PresetsConfiguration/_PresetsConfiguration_XML1_i()
      at PresetsConfiguration()[D:\Work\Flex3\PresetsConfiguration\PresetsConfiguration.mxml:114]
      at _PresetsConfiguration_mx_managers_SystemManager/create()
      at mx.managers::SystemManager/initializeTopLevelWindow()[E:\dev\flex_3_beta2sdk\frameworks\projects\framework\src\mx\managers\SystemManager.as:2428]
      at mx.managers::SystemManager/docFrameHandler()[E:\dev\flex_3_beta2sdk\frameworks\projects\framework\src\mx\managers\SystemManager.as:2320]

While the following two variants work completely fine:

var ns : Namespace = new Namespace(_samplePresetsXml.namespace());
for each (var element : XML in _samplePresetsXml.children())
{
   
ns = new Namespace(element.namespace());
   
default xml namespace = ns;
    …

OR

var ns : Namespace = new Namespace(_samplePresetsXml.namespace());
for each (var element : XML in _samplePresetsXml.children())
{
    default xml namespace = ns;
    …

My XML is pretty straightfoward:

<?xml version="1.0" standalone="yes"?>
<Examples xmlns=http://tempuri.org/Examples.xsd>
  <Example>
    <Id>17d4d7f6-d7d4-4de4-b8b9-e04a5ea5d35b</Id>
    ….

A piece of advice: when working with XML, get to know namespaces and what role they play in retrieving node values. In reference to above, this is how you would get to GUID in ID if not using "default xml namespace" directive:

trace(">>" + element.ns::Id.text());

Mike Grushin
CTO

Posted in Flex, Flex Builder 3 Beta 2 | Leave a Comment »

Flex Builder 3 Beta 2 issues

Posted by sharpstyle on October 13, 2007

We are playing around with Flex Builder 3 and I ran into a few issues that I wanted to document:

————————————————————————

<mx:Label x="62" y="75" text="Label" width="517" height="353" id="_label"/>

You cannot user "_label" or "label" as id of <mx:Label>. Flex gives the following errors

_label: Attempting to initialize non-public inherited property ‘_label’ from MXML
label: Attempting to initialize inherited property ‘label’ of type ‘String’ with value of incompatible type ‘mx.controls.Label’.

————————————————————————

Consider the following simple application.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="ApplicationComplete()">
      <mx:Script>
            <![CDATA[
                  private function ApplicationComplete() : void
                  {
                        _presetsTextArea.text = "Test";
                  }
            ]]>
      </mx:Script>
      <mx:TabNavigator bottom="9" right="9" left="10" top="10">
            <mx:Canvas label="Visual" width="100%" height="100%">
            </mx:Canvas>

            <mx:Canvas label="Source" width="100%" height="100%">
                  <mx:TextArea id="_presetsTextArea" right="10" bottom="37" left="10" top="10"/>
                  <mx:Button x="810" y="665" label="Apply"/>
            </mx:Canvas>
      </mx:TabNavigator>
</mx:Application>

The following line produces a runtime error:

_presetsTextArea.text = "Test";

Error:

Cannot access a property or method of a null object reference.

Works fine if TexInput is in the first "tab". After some debugging it looks like immediate children of TabNavigator are added to stage, but canvas children are added only when user clicks on the appropriate tab. Not the behavior I expected.

————————————————————————

You have to be careful which part of Flex Builder is focused when you press Ctrl-Z:

  1. Add new file/class
  2. Start typing code
  3. Click outside of code editing window (console, project treeview, etc)
  4. Press Ctrl-Z
  5. Your new file is removed together with the work you’ve done
  6. If you think it is in the Recycle Bin — you are wrong!
  7. Redo also doesn’t work

Mike Grushin
CTO

Posted in Flex, Flex Builder 3 Beta 2 | Leave a Comment »

Problem with debugging XML in Flex Builder 3 Beta 2

Posted by sharpstyle on October 4, 2007

I probably wasted an hour trying to figure out what was wrong with my XML, and at the end it turned out that Flex Builder is not doing some right when debugging XML nodes. As you can see from the screenshot below, "trace" executed correctly showing me the right value, while Expressions reports an error.

Bottom line — when working with XML use trace() to verify that you are getting the data you want, not Expressions window.

image

Mike Grushin
Partner, CTO

Posted in Development | 1 Comment »

Latitude D830 and Acronis TrueImage

Posted by sharpstyle on August 31, 2007

I am a big fan of Disk Imaging solutions — it’s a breeze to backup/restore your system.

I’ve been successfully using Acronis TrueImage 9.1 Workstation with Universal Restore on at least two of my previous Dell laptops: Latitude D820 and M90. There are a number of posts comparing TrueImage to other solutions, so I will just mention the main reasons I like it: straight forward GUI with mouse support, excellent networking support and ability to restore to dissimilar hardware/Virtual Machine. I have a networked hard drive that keeps my images and I backup/restore directly to it.

When I received my D830 a few days ago, the plan was very straight forward: backup original Dell setup “just in case” and restore my base image (most of the software is already installed, most of my settings are setup the way I like it, etc)

TrueImage and D830 had other plans: TrueImage would report the following before booting into GUI:

ata2: disabling port

It also had some messages related to USB:

usb.c: config descriptor too short…
usb.c: unable to get device 5 configuration…

After reporting this it would actually boot into GUI, but TrueImage would freeze at different stages of the wizard.

How I solved it:

Please boot your computer from the Acronis True Image rescue disc and press F11 key when the selection screen advising you to select either “Full”, “Safe” or “Boot into Windows” option appears. After you get the “Linux kernel command line” prompt, please modify it in the following way:

quiet acpi=off noapic

click on the OK button then and choose “Full Version”. That should allow you to use Acronis True Image in some special cases.

That was just a part of the solution. I think that the other, USB related, error messages were coming up because I had D830 in a docking station that was connected to a USB KVM switch. The other possibility is that TrueImage didn’t like my Western Digital 160GB USB Drive — there are a few other posts mentioning something about BIOS Legacy support of USB and TrueImage.

I ended up backing up/restoring to/from my networked drive.

I think this is the error related to USB KVM:

image

And this is the one related to USB Drive:

image

Screenshot of Linux Diagnostics, that mentions something about not a “valid Intel Software Raid signature”

image

Summary:

  • Try running TrueImage while D830 is not docked and is not connected to any USB drives
  • Use above instructions for acpi=off noapic
  • Backup to network location

P.S. My D830 came with A02 Bios, which I updated to A04 while looking for solution. Not sure if this helped. Dell suggests that A04 is a critical update.

Mike Grushin
Partner, CTO

Posted in Latitude D830, TrueImage | 2 Comments »

Setting up a Microsoft Web Development Machine — Part 3: setup your new machine

Posted by sharpstyle on August 29, 2007

  • See my previous posts on choosing OS and backing up your current machine
  • Gather drivers for your machine (if wiping current machine, take a screenshot of all devices in Device Manager and save it)
  • Ideally you will have at least 2 physical drives, if that is not possible create at least 2 logical ones. I prefer to create 3:
    • C — OS, program files, MSDN Library, etc. It should have at least 25GB to make sure you don’t run into space issues
    • D — All your data that needs to be backed up. I’ll explain later
    • E — All the data that you are ok loosing in case of a crash
  • For best performance 2 physical drives are preferred: OS files should be on one and swap file should be on the other
  • Install OS
  • Install drivers
  • Open Windows Components Wizard (Add/Remove programs) and install IIS:

image

  • If installing 2003 Server, uncheck IE Enhanced Security Configuration

image

  • Run Windows Update (probably a few times as it will install IE7 and Service Packs)
  • Create Documents directory on D:\
  • In Windows Explorer right-click on “My Documents” and choose properties. Click on “Move” button and point to D:\Documents

image

  • Restore the data you backed up. See this post for items you should backup.

Disclaimer: make sure you have valid licenses for all the software you install. If you are reading this blog, you are most likely in software development business — show respect to your fellow developers by paying for their work

Software you need to be effective:

  • Figure out which Personal Firewall software you want to use and install it right away.
  • Anti-virus software
  • Microsoft Office 2003/2007, most likely Enterprise Edition to make sure that integration with SharePoint is included
  • Acrobat Reader
  • Zip/unzip utility (Ex: Winzip, Winrar)
  • Image viewing/editing (Ex: Irfanview)
  • Notepad replacement (Ex: Notepad++)
  • SlickRun — excellent replacement for Run. Will have another post on this utility
  • FolderShare — free service from Microsoft allows synchronization of folders. There are limitations around size and number of files, but should work well for many cases
  • RoboForm – I will have a separate post about this tool, but I strongly recommend it to everyone.
  • Screen capture program

You should also take a look at this resource: Hanselman Ultimate Tools List – I agree with most of Scott’s choices

Development Tools:

image

Development Productivity Tools:

  • GhostDoc – free add-in for Visual Studio that automatically generates XML documentation comments for C#.
  • ReSharper or Refactor!

Optional, but useful:

  • Screen recording software (Ex: Captivate, Camtasia) if planning to record screencasts

See Part 4 (coming soon) for tips on:

  • Creating an image of your setup so you can easily restore it
  • Setting up backups

Mike Grushin
Partner, CTO

Posted in Uncategorized | Leave a Comment »

Setting up a Microsoft Web Development Machine — Part 2: backup your current machine

Posted by sharpstyle on August 26, 2007

There are a few things that you should back up:

  • If you are using Microsoft Office 2003, run “Microsoft Office 2003 Save My Settings Wizard” located within Microsoft Office > Microsoft Office Tools. It is a very handy utility that backs up your document templates, outlook settings (rules, email accounts, signatures, etc) and many other items.
  • Backup Outlook PST and OST files
  • C:\Documents and Settings\{UserName}\Local Settings\Application Data\Microsoft\Outlook
  • Favorites
  • Firefox (or other browser you are using) Bookmarks
  • My Documents
  • Desktop
  • MS SQL Server Data/Backup folders (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL)
  • TimeSnapper Snapshots (C:\Documents and Settings\{UserName}\Application Data\TimeSnapper\) move the whole folder to preserve settings
  • Windows Live Writer drafts (usually WLW is smart to put everything into “My Documents\My Weblog Posts”)
  • Cisco VPN Profiles: C:\Program Files\Cisco Systems\VPN Client\Profiles
  • X1 Saved searches C:\Documents and Settings\{UserName}\Local Settings\Application Data\X1 Desktop Search\saved searches
  • Look through C:\Documents and Settings\{UserName} folder
    • Specifically “Application Data” and “Local Settings\Application Data”
    • Many programs store your configuration files here
  • I prefer to retain my Skype history, so I move it to my new computer before installing Skype C:\Documents and Settings\{UserName}\Application Data\Skype\{SkypeUserName}
  • Look through Program Files and make sure you backed up all the licenses
  • If you are planning to wipe your machine for a clean reinstall, open device manager, expand all nodes and take a screen capture
    • If you have some specific drivers, make sure to back them up. There are a few utilities that are available for this.
    • In most cases you are better off downloading the latest greatest

http://forum.notebookreview.com/showthread.php?t=157838

http://www.notebookforums.com/thread207339.html

Posted in Uncategorized | Leave a Comment »