I used to leave my computer on all the time – just so that I don’t have to wait for it to start. Then, I upgraded my computer. As part of the upgrade I switched from Windows XP to Windows 7. What I noticed is now my computer goes to sleep automatically when I don’t use it. I think this is great for saving electricity.
Here is how to make sure that Windows 7 puts your computer to sleep automatically.
Click Start button, open Control Panel.
Open ‘Hardware and Sound’ category.
Open ‘Power Options’.
Click ‘Change when the computer sleeps’.
Set ‘Put the computer to sleep’ to 20 minutes.
The default is 30 minutes which is reasonable; 20 minutes is even better. Click Save Settings. Now if you don’t use your computer for 20 minutes it will go to sleep automatically.
While you there click ‘Choose what the power button does’ …
… and select ‘Sleep’ option.
I like to be able to quickly put my computer to sleep when I know that I finished for today. Also, when my kids were small they liked to press the power button just to see what will happen. Usually this resulted in Windows starting to shut down the computer and closing half of the programs before getting to some editor that would ask if I want to save the document before closing it.
The computer uses very little energy in sleep mode but starts up very quickly and in exactly the same state as you leave it. Another cool benefit is that you can wake it up by pressing any key or clicking the mouse. Keep in mind that you still need to shut down your computer if you want to unplug it. If your desktop computer loses power while it is in the sleep mode it would reset its state: all open programs and documents would be abruptly closed. This is why it’s a good idea to save your work when you step away from your computer – just in case of power outage.
I’m going to continue with setting up my photography website using WordPress and Twenty Twelve theme (see the first post in the series).
As a reminder, this is how the home page should look like:
By default, WordPress shows latest blog posts on the home page of your site. Here is how to make it to show a single page instead. First, go to WordPress dashboard and click ‘Pages’ in menu on the left:
Then, click ‘Add New’ link:
Enter ‘Home’ as a title and leave /home as a permalink:
Select ‘Front Page Template’ in page attributes section on the right. Otherwise you will get a sidebar on this page.
Click ‘Publish’ button. The page is ready, now it’s time to make it the home page. Go to Settings, then Reading:
Change ‘Front page displays’ setting to a static page and select ‘Home’ as front page:
Here’s the result:
Our home page is almost ready. Now it’s time to add a big image to it. Go to Pages, then All Pages and click Edit link for the Home page:
Click ‘Add Media’ button:
Switch to Upload tab and select your file. The optimal image width for Twenty Twelve theme is 960 pixels. However you can upload a bigger image – WordPress will resize it automatically. The height doesn’t matter but I like image proportions to be close to the golden ratio.
Once upload is finished set the ‘Link To’ to None and Size to ‘Full Size’ under attachment display settings:
Click ‘Insert into page’ button. The image is in the post but WordPress helpfully made it fit its default column size (625 pixels). Switch to Text tab and remove width and height attributes from the img tag:
Now set template to ‘Full-width Page Template, No Sidebar’ and click Update button.
Voilà, home page in WordPress with a full-width image:
Let’s say I’m a professional photographer and I need a new website. The best thing to do generally is to ask someone else to do it. But what if I’m just starting out and don’t have money to spend on a fancy website? I can get a basic website for free using WordPress.
First of all, I’m going to create a mockup of my new website:
Home page should have a nice big image, a heading and a menu bar. The gallery page should have thumbnails. Visitor should be able to click on any thumbnail to view a bigger photo. Something like this:
Looks good! Next, I need to decide where I’m going to host my website. WordPress.com looks like a good option: it’s free (as long as your website address ends with .wordpress.com) and it is maintained by the same people that make WordPress.
The address of my website is going to be acmephotography.wordpress.com
This is how my brand new website looks like:
Not very close to the mockup, isn’t it? Let’s fix it.
The next step is to choose a theme for my website. The problem with WordPress themes is that there are just too many of them. After some poking around I decided to try Twenty Twelve theme by the WordPress team. It looks nice and crisp. It has a menu on top. Also, it’s free! Here’s how to set it up.
Go to ‘My Blog’ on WordPress.com and click ‘Dashboard’ link there.
Move mouse over ‘Appearances’ link in the menu on left, then select ‘Themes’:
Search for ‘Twenty Twelve’ theme and click Activate button:
Close the dialog confirming that the theme has been activated. Go to Settings, then General. Set site title to ‘Acme Photography’. Remove tagline (set it to empty):
Don’t forget to click ‘Save Changes’ button. Now click on website name on the top left to view your website.
Behold: my new photography website, Acme Photography:
It has a title and a menu bar. However the front page doesn’t look right yet. I explain how to configure front page in my next post.
I did my first customer interview recently. I met a professional photographer and talked to him for an hour!
First, this is how I arranged this meeting. I tried to call kindergarten photographers before with disastrous results. People were convinced that I was an telemarketer from India trying to sell them something.
So I changed the tactics. I asked one of my friends if she had her children photographed in kindergarten. As it turns out yes, a photographer came to day care and took photos of her son. Even better she agreed to help me to get an appointment with that photographer. Together we devised a plan.
My friend knew the head of day care centre so she called her and asked about photographer. The manager told her the photographer’s name and also gave his number. She told my friend to mention her name when talking with R. Armed with that my friend called R. and explained that we have an online service for photographers and that we need his help. And R. graciously agreed to meet me for a coffee.
R. explained to me that he mainly does preschool and kindergarten jobs. He also does lots of dance studios. He plans to expand to primary schools. He has his own printing lab. He has 5 photographers working for him.
R. has high turnover. In the last two months he processed 35,000 photos.
R. was using SmugMug but now he is transitioning to a custom WordPress website that was developed for him. SmugMug was good but didn’t let R. to sell photos and print them at his lab. It allows using their lab only. So he was using SmugMug to let people view photos. For ordering, he asked parents to write down photo numbers and send to him by email which was cumbersome.
When selling photos to parents hard copy is important. R. creates proof sheets and gives them to parents. It serves as a reminder (parents put it on the fridge). Web gallery is just an additional component. R. said that one day all sales will be digital in Australia but not now.
One year R. tried to sell photos using web gallery only. It was a disaster – only 30% percent of parents ended up buying photos. Next year he changed back to hard copy with much better results.
R. used to sell photos by printing 5×7 album and giving it parents. It worked well and most parents would buy the album to keep it. Recently though people started scanning photos and returning them back without buying.
For bank deposits it is important to reconcile payments because there are so many of them. Parents should put order number as the reference.
It would be great if each child would get an unique password but it is hard to categorise photos. R. has a custom desktop application that helps him to categorise by dragging photos from the list to children faces on the right.
R. knows a software developer that helps him. He works on facial recognition. It would help greatly for ballet photos where each child stands still facing camera and is properly lit.
R. has an idea of storing photos in the cloud. This would serve as a backup storage.
This was great, I’m going to try to get more customer interviews next.
I started Fotrel back in 2008. Fotrel is a web gallery with shopping cart for wedding photographers.
The idea is that a photographer makes photos available for viewing on the web after the wedding. Guests view photos. Some of them buy prints. The photographer makes money by keeping margin.
Results so far: I have 30 clients. Fotrel brings about $400 per month. Not bad but not great either.
What I find is that wedding photographers are not really excited about the whole idea. I have no proof, this is just my gut feeling.
Also, 10 of my clients didn’t upload anything in the last 3 months. So they pay for my system but don’t use it. 20 of my clients didn’t get any sales in the last 3 months.
It looks like Fotrel doesn’t solve the real pain for photographers. I’m yet to find this pain point.
What to do?
I have an idea: change Fotrel to make it useful for kids photographers. I had a couple of clients who took pictures of kids at kindergartens. And they were getting a lot of orders.
Also, few kids photographers looked at Fotrel but didn’t start using it because it didn’t have features that they wanted.
One piece of advice I got is to speak to 50 kids photographers before adding those missing features.
The next question is how to reach kids photographers? I tried cold calling – that didn’t work because people were convinced I was trying to sell them something because of my accent. Now I’m thinking of other ways to reach kids photographers.
Far Manager has powerful suppport for command history. ConEmu author even suggests using Far Manager with panels turned off instead of standard command prompt.
Ctrl+E gives you previous command entered. You can press it multiple times to get older entries. Ctrl+X moves you forward in the history.
Press Alt+F8 to view command history in the list:
You can execute a command from the list by pressing Enter. If you want to edit a command press Ctrl+Enter.
All shortcuts available in command history list:
Enter
Re-execute a command
Shift+Enter
Re-execute a command in a new window
Ctrl+Alt+Enter
Re-execute a command as administrator
Ctrl+Enter
Copy a command to the command line
Del
Clear the commands history
Ins
Lock/unlock a history item
Shift+Del
Delete the current history item
Ctrl+C or Ctrl+Ins
Copy the text of the current command to clipboard
Another useful shortcut is Ctrl+Alt+F – it lets you to search in the list by filtering it down. This shortcut is totally non-obvious and not documented anywhere so I was happy when I discovered it. It also works in folder history (Alt+F12).
I did 10-day Vipassana meditation course in July 2012. Meditation centre was located in Woori Yallock – small town near Melbourne.
First of all, my notion of meditation was shattered there. In my mind, meditation was sitting quietly and relaxing, something like this:
Well you do sit quietly but it is not relaxing at all, at least not in Vipassana meditation. It is hard work. It is simple but not easy at all.
What helped me is that I decided to allow myself to be a newbie. I said to myself: “It’s OK to do it poorly it the beginning”.
There were about 40 students total. Men and women were living in separate areas.
Talking to each other was not allowed. Many people told me that this would be very hard for them. However I didn’t find it difficult at all. Maybe this is because I was not a very sociable person.
Also there was no Internet, no TV, no radio, no phones, no visitors. I handed in my mobile phone in the beginning of the course for safe keeping. There was no communication with outside world at all.
We didn’t read anything. There were no writing materials. Actually I missed pen and paper during the first half of the course. I was getting so many excellent ideas during meditation and I wanted to write them down so that I don’t forget them.
We were spending a lot of time meditating. Here is typical timetable:
4:00
Morning wake-up bell
4:30-6:30
Meditate in the hall or in your room
6:30-8:00
Breakfast break
8:00-9:00
Group meditation in the hall
9:00-11:00
Meditate in the hall or in your room according to the teacher’s instructions
11:00-12:00
Lunch break
12:00-13:00
Rest and interviews with the teacher
13:00-14:30
Meditate in the hall or in your room
14:30-15:30
Group meditation in the hall
15:30-17:00
Meditate in the hall or in your own room according to the teacher’s instructions
17:00-18:00
Tea break
18:00-19:00
Group meditation in the hall
19:00-20:15
Teacher’s Discourse in the hall
20:15-21:00
Group meditation in the hall
21:00-21:30
Question time in the hall
21:30
Retire to your own room – Lights out
Getting up at 4 am in the morning was hard for me. In the beginning I was walking during rest times but later on I was trying to get as much sleep as possible. Walking, by the way, is the only form of exercising allowed.
We had breakfast and lunch but no dinner. Instead of dinner we had two pieces of fruit and tea. Somehow I didn’t miss dinners and wasn’t particularly hungry in evenings. The food was delicious, I liked it very much. Oh, and it was all vegetarian.
Meditating itself wasn’t in complete silence. In the beginning and the end of each session there was chanting played as recording. I found it strange at first but with time grew to almost like it.
I would never associate meditation with pain. Yet initially I experienced a lot of pain and discomfort. Sitting without moving for long time becomes painful. Later on I found out that in fact you can change posture from time to time. So I didn’t have to go through all this suffering. Oh well, I still think it was beneficial for me.
The main idea of Vipassana meditation is observe different sensation on your body while maintaining “perfect equanimity”. You try to be aware of your body.
In the evening the teacher discourse was given. This was recordings of S.N. Goenka, a leading teacher of Vipassana meditation. This is where theory behind the meditation was given.
At the start of the course management strongly recommended me to listen to discourse in my first language (Russian). I was glad I agreed because the material was quite thick. It was hard for me to follow it even in Russian. My English was definitely not good enough to follow discourse in English.
The theory included subatomic parts, vibrations and future lives which was hard to swallow for me raised in atheistic Soviet Union.
On day 8 I finally became aware of my leg. It was fascinating – it felt like my leg lit up with sensations like a Christmas tree. Immediately after that I was able to get a flow of subtle sensations which felt incredible. I can compare it to the opening sequence from Universal Studios logo:
I felt ecstatic after that and couldn’t stop smiling 🙂 I must admit that I couldn’t get that flow again since then.
Surprisingly I got many revelations about my life during last days of the course. I realized how misguided I was in many aspects of my life. I understood why I behaved in certain ways.
On the last day I felt very happy and was eager to talk to fellow students. I think everybody else felt blissful.
Overall the course was great. I strongly recommend it to everyone. What I like about Vipassana meditation is that it helps everyone, regardless of their religion, race, age and background.
It is hard, sometimes even gruelling but it is very beneficial. I think it’s like a boot camp for your mind. You can find more about it at Vipassana website.
One of the strongest features of Far Manager is the ability to start any program or script from command prompt. You can type anything there, just like in standard command prompt. Ctrl+Enter shortcut greatly helps here – it inserts selected file name to command prompt (Ctrl+F inserts full path).
If you launch a console program all program output will be displayed in Far window. Terrific! After program finishes you can view console output by pressing Ctrl+O.
There is a problem however: you can’t scroll up if program output is long. Only last 25 or so lines of text are visible. Anything before that is lost forever.
Far has a clever little known trick to view all program output. Add view:< before the command and all console output will be intercepted and redirected to internal viewer. For example:
view:<ipconfig /all
You can even redirect output to Far editor by using
edit:<ipconfig /all
This is nice but not ideal. You have to remember to add view:< before starting a console program or script. If a program takes long time to execute you won’t see any progress until it finishes. Also any interactive prompt in program screws the whole process.
ConEmu to the Rescue
ConEmu is a console emulator. It has lots of great enhancements to standard Windows command prompt. It works by intercepting all console output and displaying it in its own window.
ConEmu is also a close friend with Far Manager. After installing ConEmu you can open Far Manager inside ConEmu window:
Once Far Manager is inside ConEmu tab you can scroll console output by switching to so called alternative mode.
This mode hides Far panels and ‘freezes’ console. Ctrl+Up scrolls up, Ctrl+Down scrolls down. Scrolling with a mouse wheel also works.
But that’s not all. You can also assign Ctrl+O to view console output in Far viewer. To do this locate CtrlO_View.reg in ConEmu folder and execute it.
Recently I came across an interesting quirk in PowerShell: exit codes from powershell.exe are inconsistent.
As you may know there are two ways of launching PowerShell script: you can use -File or -Command parameter.
powershell -File test.ps1
or
powershell -Command .\test.ps1
-Command could be ommitted:
powershell .\test.ps1
Now let’s say you want to execute PowerShell script from a scheduled task or from continuous integration server. Naturally, you would be interested if the script fails or not.
And here’s the bug: if you launch your script using -File parameter powershell.exe exits with zero code even if there was an exception.
You can confirm this by creating a script that always throws an error:
throw 'oops'
Now if you launch it using -File parameter exit code is 0:
depending on whether I use the “-File” or “-Command” switch to execute the .ps1 script I get different behaviour. Is this a PowerShell bug or is there something fundamental about the execution model the differs between -File and -Command that I’ve yet to understand?
Bonus
How to execute PowerShell script from NAnt script:
Far Manager has two keyboard shortcuts to copy file name to clipboard:
Ctrl+Ins copies selected file name
Alt+Shift+Ins copies full path to selected file
These shortcuts also work if multiple files are selected which is great for creating batch renames.
Let’s say file name contains spaces. In this case Far Manager adds quotes around file name. Supposedly this saves time if you construct some command line somewhere. Personally I find this totally unnecessary. I can add quotes myself, thank you very much.
File or folder names, containing characters specified in rule 34, will
be quoted when inserted into the editor/command line or the clipboard.
The key "System/QuotedName" of DWORD type controls this behaviour.
Bits:
0 - if set then file or folder names will be quoted inserted into
the editor/command line.
1 - if set then file or folder names will be quoted inserted into
the clipboard.
The default value = 0xFFFFFFFF (quote file or folders names).
I think you need to be a developer to understand this.
Note two similar shortcuts:
Ctrl+Enter copies selected file name to command line
Ctrl+F copies full path
For this auto-quoting is actually useful, therefore I set QuotedName to 1, not 0.