Windows 10 build 10162

Release date of Windows 10, July 29, 2015, is getting closer.

I installed Windows 10 build 9841 in October 2014 as soon as Microsoft announced Windows Insiders program. Many things have changed since that time…

Yet I haven’t decided yet whether I want to change the usual Windows 7 to the new Windows 10. By the way, Microsoft offers free upgrade from Windows 7 SP1 and Windows 8.1 to Windows 10.

To experience the new OS better, I installed Windows 10 on desktop, more powerful than laptop. I used Windows 7 on this desktop since its release on October 22, 2009.

It took about 20 minutes to install Windows 10 build 10162 on the desktop, and about 10 minutes more to prepare the system for the first start.

After installation, you see usual Desktop with Start button on taskbar and with Start menu:

Windows 10 build 10162: Start menu

Read the rest of this entry »

FloatCalc

There’s a simple Java program FloatCalc.java:

public class FloatCalc {

    public static void main(String[] args) {
        System.out.println(1 - 0.56);
    }

}

What will be the output of this program?

Bonus question: Does the computation occur in run-time or compile-time?

2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

A San Francisco cable car holds 60 people. This blog was viewed about 2,900 times in 2014. If it were a cable car, it would take about 48 trips to carry that many people.

Click here to see the complete report.

Good Answer: Does Windows carriage return \r\n consist of two characters or one character?

Recently I’ve earned silver badge:  Good Answer

This badge is awarded answers which have score of 25 or more. And my answer to question Does Windows carriage return \r\n consist of two characters or one character? has reached 25 upvotes.

Here’s my answer:

These are two characters:

  • \r is carriage return;
  • \n is line feed.

Two characters combined represent a new line on Windows. Whereas on Linux, \n represents new line. It moves cursor to the start of new line on Linux. On Windows, the cursor will stay at the same column in the console but on the next line.

\r on Linux has the same effect as on Windows: moves cursor to the start of the line. It is possible to print different information on the same line where \r is used instead of \n.

Russia goes to winter time

After living for three years in “eternal” DST, on October 26, 2014, Russia will turn the clock 1 hour back to the standard, or winter, time.

Operating systems installed the corresponding updates. The time zone changed to UTC+3, and its title has RTZ 2 specification in parenthesis.

Windows 7 notifies: Daylight Saving Time ends on October 26, 2014 at 2:00. The clock is set to go back 1 hour at that time.

Windows 7: Daylight Saving Time ends on October 26, 2014 at 2:00. The clock is set to go back 1 hour at that time.

Read the rest of this entry »

Copyright check

A simple script to check whether the year in Copyright header is updated:

hg st -q -n | xargs grep Copyright | grep -v 2014

Nothing fancy! Just to save it.

It would be awesome if such a script updated the year automatically.

Windows Themes

How often do you change themes in Windows? Especially how often do you switch from visual stylesenabled theme (Aero or Basic, XP style) to classic one.

Please leave your answers in comments.

Heartbleed Explanation

Heartbleed Explanation

Advanced “status” options

Two weeks ago I showed how to filter output of hg status with awk. That simple awk script removes unknown (untracked) files from output and also removes the file status: you get a simple list of modified/added files.

Actually, you can do this without using awk because Mercurial has advanced options for status command:

hg status --quiet --no-status

Or with short aliases:

hg st -q -n

The result is the same: you get the plain list of modified files, and files which are not under source control are ignored.

Java 8 Launch Event

Java logoLast week Oracle launched Java 8, a new release of Java platform which includes many new features, Lambdas and Streams to name a few. See Java 8 Central for more information, or go to Java 8 download page to download it and test-drive its new features.

Today, on March 25, 2014, there will be an online Java 8 launch event. The event starts at 10:00 AM PST, or 21:00 MSK.