Thursday, September 04, 2014

Building a Niven Ring (aka. Ringworld), PopMech goes around...

Popular Mechanics - Could We Build a Ringworld?

In our cosmic megastructures series, PopMech explores some of the key engineering and design challenges in constructing gigantic structures for use by humankind in space. Today: a Niven Ring or Ringworld, an enormous slice of real estate encircling a star.

Name: Niven Ring, or Ringworld
Named for: Larry Niven's 1970 novel Ringworld and its sequels.
Selected Science Fiction Portrayals: Besides those featured in Niven's novels, similar but smaller structures, called Halos, appear in the Halo video game and media franchise. Also, the Orbitals of Iain M. Banks' Culture novels and short stories.

Someday, when humankind outgrows planet Earth, we might aim to build a habitat so vast we could never overpopulate it.

Sci-fi author Larry Niven conjured up...

image..."

Being a Science Fiction nut (You've seen my Good Reads widget on my site, so this isn't news to you... ) I love the Ringworld series. It's also interesting seeing the impact it' had on later works. I love seeing continued references to like structures (Rings, Dyson Sphere, Dyson Swarms, etc) in later works (Halo anyone?). Oh sure, we're not going to be building these anytime in the near future (heck we can barely got off this rock, let alone...) but a boy can wonder and dream.

This PopMech article is great and also reminds me of the many days I used to spend reading the mag every time the mailman dropped off the latest edition. Remember when we used to get magazines in actual paper and print? :P

Anyway...

If you're a science fiction reader, Niven fan, space nut or science geek, this is an interesting read.

Driving IE with the Web Driver Tool and Code Sample too

Microsoft Downloads - IE Web Driver Tool for Internet Explorer 11

The IE Web Driver Tool enables developers to create automated tests that simulate users interacting with webpages and report back results in Internet Explorer 11. It can also manage testing across multiple windows, tabs, and webpages in a single session.

Version: 1.000

File Name:

Windows8.1-KB2990999-x64.msu

Windows8.1-KB2990999-x86.msu

Date Published: 9/3/2014

KB Articles: KB2990999

The IE Web Driver Tool implements many of the high priority features from the W3C spec to allow developers to open a session, automate basic functionality against the pages, and return the results of the tests. The IE Web Driver Tool differs from JavaScript unit tests because it has additional access to functionality and information in the browser, and it can more accurately simulate user events or OS-level events.

...

MSDN Code Gallery - WebDriver Sample - Cumulative Security Update for Internet Explorer (KB2976627)

WebDriver is like a remote control for Internet Explorer and allows developers to create automated tests that go beyond simple JavaScript unit tests. In Cumulative Security Update for Internet Explorer 11 (KB2976627), the WebDriver API demonstrated in Internet Explorer Developer Channel comes to general release.

Building the Sample

Because WebDriver gives any app that knows how to use it the ability to control your browser, it is not completely installed with Cumulative Security Update for Internet Explorer (KB2976627). To install and enable the remaining components, please follow the instructions in the Developer Guide.

Following that, you will be able to use the Visual Studio solution in this sample as a jumping-off point to build your own apps using the WebDriver API. However those apps will only run on systems specifically enabled to use the WebDriver API.

Description

The WebDriver sample provides a small example application that opens Internet Explorer, navigates to Bing, locates the Bing Search Box, types "WebDriver" into it, and executes the search. With dozens of commands available, this provides an excellent starting point for exploring the WebDriver API in Internet Explorer 11.

Source Code Files

  • IEWebDriverExample.zip

..."

Remember the days/weeks wasted and many tools we've used to "automate" UI testing of our web sites? Maybe, finally, those days are behind us? We can only hope...

git tf whining about ".. not a valid URL"? Richard Fennel shows how to kick its ASCII

But it works on my PC! - Getting ‘… is not a valid URL’ when using Git TF Clone

I have been attempting to use the Git TF technique to migrate some content between TFS servers. I needed to move a folder structure that contains spaces in folder names from a TPC that also contains spaces in its name. So I thought my command line would be

git tf clone “http://tfsserver1:8080/tfs/My Tpc” “$/My Folder”’ oldrepo --deep

But this gave the error

git-tf: “http://tfsserver1:8080/tfs/My Tpc” is not a valid URL

...

The answer was to use the ASCII code ...

image

..."

I've run into this a few times during my Coding4Fun blogging quests and end up being lazy and getting the code other ways. In this post Richard shows just how lazy I really was...

Wednesday, September 03, 2014

Using Brent Ozar's magic SQL steps to query and find unanswered StackExchange questions

Brent Ozar Unlimited - Finding Unanswered StackExchange Questions with SQL

You love Q&A sites like StackOverflow.com and DBA.StackExchange.com, but sometimes it’s hard to find interesting questions that need to be answered. So many people just sit around hitting refresh, knocking out the new incoming questions as soon as they come in. What’s a database person to do?

Use the power of the SQL.

Data.StackExchange.com lets you run real T-SQL queries against a recently restored copy of the StackExchange databases. Here’s my super-secret 3-step process to find questions that I have a shot at answering.

Step 1. Find out how old the restored database is....

...

Step 2. Find questions everybody’s talking about....

image

...

Step 3. Find questions that people keep looking at....

...

image..."

Why web query when you can just SQL your way through StackExchange? I don't know about you, but I often dream in SQL (no lie.. sigh), so this approach to StackExchange struck a cord for me. Now, if only I was actually smart enough to provide good answers... :O

 

Related Past Post XRef:
SELECT * FROM StackExchange. There's the easy way and the hard, yet much more data fun, way...
Stacks and stacks of data - Your copy of the Stack Overflow’s (and family) public data is a download away

The Stack Family (StackOverflow, SuperUser, etc) gets OData’d via Stack Exchange Data Explorer
Build something awesome with the new StackExchange v2 API and win something awesome...
Stacking up the Open Source Projects, Stack Exchange is...

Sando Code Search Tool gets revved up! (In more ways than one...)

David C. Shepherd - Searching the Linux Source Tree in 0.5 Seconds

Our recent work on the Sando Code Search extension, a tool which leverages Lucene to search code, has been focused on making it more scalable and robust. To demonstrate our progress I'll provide demos of both Sando and FindInFiles (i.e., a grep-like feature in Visual Studio) searching the entire Linux kernel. As you'll see, there's a fundamental difference between Lucene-based search tools and regular expression based search tools.

Before we begin, let's first briefly examine the Linux source tree. At the time of our demo it contained 47,528 files which occupied 1.71 GB on disk. Most of these files were C code, yet there was also a fair amount of documentation and configuration files. Sando and FindInFiles both search all text files.

Searching the Linux Source Tree with FindInFiles

To use FindInFiles I configured it to search the directory containing the Linux code, entered my search, and selected Find All. In this running example the user is searching for encryption algorithms, specifically those related to AES, and thus they use the regular expression query "encrypt*aes". Executing this search caused FindInFiles to run its regular expression matching algorithm against every line of every file in that directory, recursively. As you can see in "Starting the Search", this utilized about 50% of the CPU on an eight core machine for a considerable amount of time.

Starting the Search: Notice when the FindInFiles search begins the CPU utilization becomes 50% on a 8-core machine.

After about one minute and forty seconds the search completed, having searched 47,407 files. Unfortunately, no lines matched this particular search (see "Finishing the Search"). As often happens with a regular expression based search, the word ordering in the query did not match the word ordering in the code. In this situation the user would likely have to run another search with re-ordered search terms (e.g., "aes*encrypt") to find relevant code.

image

Finishing the Search: After about 1m 40s the search completes; no results were found after searching 47,407 files.

Searching the Linux Source Tree with Sando

Next we searched the same Linux source tree using Sando. Unlike FindInFiles, which is based on regular expression matching, Sando is built upon information retrieval technology (think Google). It leverages Lucene.NET to pre-index source code and provide ranked results almost instantly. Typing in the same query as before minus the regular expression syntax (i.e., "encrypt aes") you can see below that results are returned almost instantly. Just as importantly, the most relevant results are returned first with less relevant results toward the bottom. Additionally, in Sando's UI, selecting a result in the list provides a preview of the program element with matching terms in bold.

image

Searching with Lucene: The same search returns almost instantly when using Lucene-based searchers.

Of course, there is a cost to pre-indexing. For the Linux source tree that cost is about 50 minutes of low CPU background processing. Fortunately, this only happens once  after which incremental updates and switching branches trigger at most a few seconds of indexing. Additionally, for most medium-sized projects initial indexing completes in a matter of seconds. For instance, Sando can index its own source code in less than ten seconds.

..."

David reached out to me today with news about the updated Sando Code Search Tool/VS Extension and I just loved how he used VS and Sando to index and search the Linux source tree...

Also make sure you click through to the full post to not only see the pretty animated Gif's but to all see a number of other code search tools for VS and beyond. I dig that he took the time to highlight other similar tools.

Finally the source for this project is also still on CodePlex, https://sando.codeplex.com. :)

 

Related Past Post XRef:
Revisiting Sando - Full Text Index and Source your Source, while never leaving Visual Studio...
Code Searching with Sando, because "Code search sucks and Find & Replace is from the 80s..."

Security/hacking got you a little freaked? Moving to Two Factor Auth? Looking for a WP8.x "Google Authenticator App"? Microsoft has got your back...

7Tutorials - Are You Looking for a Google Authenticator App on Windows Phone?

We all know the strong competition between Microsoft and Google and how ruthless it is at times. Because of it, Google has chosen not to develop Windows Phone apps for most of its services. Therefore, the Google Authenticator app that's requested by many services for two-step verification is missing from Windows Phone. Since two-step verification is a very common method for securing all kinds of accounts, being able to use a Google Authenticator clone on Windows Phone is very important. Fortunately for us Windows Phone users, Microsoft has our backs and they have developed their own Authenticator app and published it for free. Here's how it works:

Why So Many Websites & Services Ask You to Install the Google Authenticator App?

Because Google was one of the first big tech companies to implement two-step verification for their customer's accounts. They also developed a Google Authenticator app that's available on almost all mobile platforms except those developed by Microsoft. Since Android is so huge in terms of market share, the Google Authenticator app has become a standard in people's minds and everyone recommends that you use it.

Technically speaking, there's nothing special about this app because it uses a documented standard for two-step authentication: the Time-based One-time Password Algorithm (TOTP). Therefore anyone can make an app using the same algorithm.

According to this standard, the Authenticator app provides a random six digits one-time password that you enter in addition to your username and password, to log in to all kinds of services, including Google's and Microsoft's services. This six digits password is valid for 30 seconds. If an attacker steals it then, within 30 seconds, it will be useless. This is great from a security perspective.

When a website mentions using a Google Authenticator app, don't despair. You don't really need Google's app, only an app that uses the same algorithm to generate passwords.

Where to Find Microsoft's Authenticator App

On the Windows Phone Store, if you search for Google Authenticator, you will find lots of apps made by different developers and companies. Some of them are not even free. Most probably they work just as well, because they use the same standard as Google does but why use them if you have a free app, developed and actively maintained by Microsoft?

In the Windows Phone Store, search for Authenticator and tap the app made by Microsoft Corporation. You will find it here: Authenticator.

Authenticator.

...

image..."

With all the hacking/etc. news I decided it was time to finally make the move to Two Factor Auth. Yeah, I know I'm a little behind (little?) but, hey every journey begins with the first step, etc.

Today I was looking for a Windows Phone app to help with a site that uses Google Auth. Well there isn't one, at least from Google. But, as you've seen above, we don't need no stink'n Google Auth App! The Microsoft Auth app works just fine. And I've confirmed that, it does indeed work just fine and is really easy to setup and use.

In short, if you've not made the move to Two Factor, it's really not that scary at all. Do it... DO it... DO IT!

Tuesday, September 02, 2014

Alas YUI, I knew you... Yahoo! User Interface Library (YUI) is officially dead in the water.

 Yahoo! Engineering - Important Announcement Regarding YUI

The Yahoo User Interface library (YUI) has been in use at Yahoo since 2005, and was first announced to the public on February 13, 2006. Although it has evolved tremendously since that time, YUI has always served the same overarching purpose of providing a comprehensive toolkit to make it easier for developers to create rich web applications. As such, YUI is an important part of Yahoo’s history: millions of lines of code relying on YUI have been written and are still in use at Yahoo today. However, it has become clear to us that the industry is now headed in a new direction...

...

Therefore, we have made the difficult decision to immediately stop all new development on YUI in order to focus our efforts on this new technology landscape. This means that, going forward, new YUI releases will likely be few and far between, and will only contain targeted fixes that are absolutely critical to Yahoo properties.

...

I've been following YUI since it went public in Feb 2006 (I blogged about it the day after it wen OSS, Yahoo! UI Library Released as OSS). I always thought it cool that Yahoo had released and improved it over time. But time matches on, and all that, and if you look at the web between now and then, it's a whole new world (Yeah, I've got my Capt. Obvious hat on again). Eight years? In web-time that's like 97 years or something... :/

 

Related Past Post XRef:
Free Yahoo UI JavaScript Hosting
Yahoo! UI Library Released as OSS

Sparking the dreams and imagination of young dev's with DreamSpark...

Canadian Developer Connection - What does Back to School mean for coders?

"...

Did you know DreamSpark gives students access to Microsoft developer software for free? That includes Visual Studio. Since not all schools teach .NET languages, it’s important to know that Visual Studio isn’t just a code editor for C#, you can use Visual Studio to code HTML& CSS, C++, Python, Unity, even nodeJS.

...

Another great way for students to stand out is the Imagine Cup. For coders and non-coders this is an opportunity to showcase their talent and potentially win a trip to represent Canada at the World finals at Microsoft headquarters in July 2016. For the coders there is usually a games category, innovation category (for all those great business ideas), and World Citizenship category (for those who want to help others). For the non-coders watch out for things like a pitch video challenge or the user experience challenge for those with a passion for design! Last year a team of students from New Zealand won $50,000 at the World Finals in the Innovation category for an app that allows you to see how far away your friends are when you meet up. I’ve seen lots of students building similar apps at hackathons, do you think they had any idea if they finished and polished up their app it could have put them on stage at the world finals? We will be announcing specific details for this year’s Imagine Cup soon!

..."

Dream the dream, my young dev's...

image

Building/Documenting a site? Want to see one example of a "site software guidebook?" techtribes.je example software guidebook is free and open...

Coding the Architecture - Free and open source example software guidebook 

A software guidebook for the techtribes.je website

It needs a little updating (isn't that always the case!), but I've moved the example software guidebook (previously an appendix in my Software Architecture for Developers book) into a separate free and open source book on Leanpub.

techtribes.je is a side-project of mine to create a content aggregator for the tech, IT and digital sector in Jersey, Channel Islands. The code behind the techtribes.je website is open source and available on GitHub. The source for the software guidebook is also open source and available on GitHub.

The techtribes.je software guidebook is based upon the concept of a software guidebook as described in my Software Architecture for Developers book; the software guidebook is a lightweight, pragmatic way to document the "big picture" of a software system. In essence, it's my simplified version of many "software architecture document" templates you'll find out there on the web.

techtribes.je - Software Guidebook is available to download for free from Leanpub. I hope you find it useful.

techtribes.je - Software Guidebook

About the Book

This is the software guidebook for the techtribes.je website; a content aggregator for the tech, IT and digital sector in Jersey, Channel Islands. The code behind the techtribes.je website is open source and available on GitHub. The source for this book is also open source and available on GitHub.

This book is based upon the concept of a software guidebook as described in my Software Architecture for Developers book, which is also available on Leanpub. The software guidebook is a lightweight, pragmatic way to document the "big picture" of a software system.

image

How often do you re-invent the specification/documentation/guidebook wheel? Yeah, me too. The problem is that there doesn't seem to be many "real" ones that are open and available for free. Sure every corp has one, but those are often IP...

Here's one that's "real" and might give you some good ideas for your next project.

image

Hey, Windows Installer old enough for a Drivers Permit! Happy 15th Windows Installer

BetaNews - Windows Installer celebrates its 15th birthday

"With many businesses still focused on the "end of XP", an important milestone in the story of software integration will slip by largely unnoticed this year, but it should be celebrated by anyone involved in end user computing.

2014 is the time to appreciate that Windows Installer (MSI) technology is 15 years old and still going strong. That is a very long time for a technology to be as relevant and as useful in today's enterprise environments as it was when it was first released in 1999. Originally developed to facilitate the installation of Microsoft Office 2000, there remains a surprising multitude of reasons it's stuck around for so long

...

The principles that underpin MSI technology are the template for the next generation of software delivery methods and formats, specifically sequencing of software within the virtualization space.

As one example consider the App-V virtual bubble; this was first seen in MSI technology as the isolation technique, and is the next-gen version of that idea.

15 years is a lifetime in technology, but it seems that Windows Installer is here to stay for the foreseeable future. It's evolution (now 5.0) continues to set the standard as the most complete method for application integration, and is the barometer by which all other formats should use to measure their competency against. That is why this year we should all be celebrating the creation of our old friend, Windows Installer.

image..."

Love or hate Windows Installer, the world before Windows Installer/MSI's is a nightmare that we've thankfully said goodbye too long ago. Funny how time flies... <oldgeekguyrant>I remember when... You kids don't know how good you've... yada, yada </oldgeekguyrant>