Planet FoxPro

November 26, 2014

Alex Feldstein

Bohemian Rhapsody in Blue (mashup)

Scott Bradlee of Postmodern Jukebox doing a wonderful mashup of Gershwin and Queen.

image

by Alex Feldstein (noreply@blogger.com) at November 26, 2014 10:39 AM

Rick Strahl's Web Log

WebClient and GetWebResponse not firing on Async Requests

Here’s a little oddity I ran into today: When you’re using the good old simple WebClient class you can subclass WebClient and capture the HttpWebResponse object. This is useful because WebClient doesn’t expose any of the important HTTP results like Http status code or headers. WebClient is meant to be ultra basic, but by capturing the Response you actually get most of the features you need of a full HTTP client. The most important ones that you’ll typically want to look at are the Http Status code and the Response headers. WebClient is just a high level wrapper around HttpWebRequest/HttpWebResponse and using a couple of overrides you can actually capture both low level interfaces without having to resort to using HttpWebRequest/Response which is considerably more work to use.

Recently I needed to build a set of HTTP utilities because I had some problems with the all async HttpClient – specifically some thread abort exceptions that weren’t giving me any more info on the error – and I decided to just create a small wrapper to make JsonRequest calls.

As part of the implementation I subclassed WebClient like this in order to capture the HttpWebResponse object:

/// <summary>
/// Customized version of WebClient that provides access
/// to the Response object so we can read result data 
/// from the Response.
/// </summary>
internal class HttpUtilsWebClient : WebClient
{
    internal HttpWebResponse Response { get; set; }

    protected override WebResponse GetWebResponse(WebRequest request)
    {
        Response = base.GetWebResponse(request) as HttpWebResponse;
        return Response;
    }
        
}

and then created some helper methods that wrap up a JsonRequest<T> routine that basically let you retrieve and convert Json (you can check out the full code for this on GitHub for the HttpUtils class in Westwind.Utilities.

public static TResultType JsonRequest<TResultType>(HttpRequestSettings settings)
{
    var client = new HttpUtilsWebClient();

    if (settings.Credentials != null)
        client.Credentials = settings.Credentials;

    if (settings.Proxy != null)
        client.Proxy = settings.Proxy;
            
    client.Headers.Add("Accept", "application/json");

    if (settings.Headers != null)
    {
        foreach (var header in settings.Headers)
        {
            client.Headers[header.Key] = header.Value;
        }
    }

    string jsonResult;

    if (settings.HttpVerb == "GET")
        jsonResult = client.DownloadString(settings.Url);
    else
    {
        if (!string.IsNullOrEmpty(settings.ContentType))
            client.Headers["Content-type"] = settings.ContentType;
        else
            client.Headers["Content-type"] = "application/json";

        if (!settings.IsRawData)
            settings.CapturedRequestContent = JsonSerializationUtils.Serialize(settings.Content, throwExceptions: true);
        else
            settings.CapturedRequestContent = settings.Content as string;

        jsonResult = client.UploadString(settings.Url, settings.HttpVerb, settings.CapturedRequestContent);

        if (jsonResult == null)
            return default(TResultType);
    }

    settings.CapturedResponseContent = jsonResult;
    settings.Response = client.Response;
            
    return (TResultType) JsonSerializationUtils.Deserialize(jsonResult, typeof (TResultType), true);
}

Inside of that code I basically create custom instance of the HttpUtilsWebClient and then capture the response when done, to pass back to the caller as part of a settings object that is passed in initially:

settings.Response = client.Response;

When running the standard synchronous version this works perfectly fine.

Using the above code I can do stuff like this:

[TestMethod]
public void JsonRequestPostAsyncTest()
{
    var postSnippet = new CodeSnippet()
    {
        UserId = "Bogus",
        Code = "string.Format('Hello World, I will own you!');",
        Comment = "World domination imminent"
    };           

    var settings = new HttpRequestSettings()
    {
        Url = "http://codepaste.net/recent?format=json",
        Content = postSnippet,
        HttpVerb = "POST"
    };
            
    var snippets = HttpUtils.JsonRequest<List<CodeSnippet>>(settings);

    Assert.IsNotNull(snippets);
    Assert.IsTrue(settings.ResponseStatusCode == System.Net.HttpStatusCode.OK);
    Assert.IsTrue(snippets.Count > 0);

    Console.WriteLine(snippets.Count);
    Console.WriteLine(settings.CapturedRequestContent);
    Console.WriteLine();
    Console.WriteLine(settings.CapturedResponseContent);

    foreach (var snippet in snippets)
    {
        if (string.IsNullOrEmpty(snippet.Code))
            continue;
        Console.WriteLine(snippet.Code.Substring(0, Math.Min(snippet.Code.Length, 200)));
        Console.WriteLine("--");
    }
Console.WriteLine("Status Code: " + settings.Response.StatusCode);
foreach (var header in settings.Response.Headers) { Console.WriteLine(header + ": " + settings.Response.Headers[header.ToString()]); } }
Note that I can look at the Response object settings. I can get the HTTP status code and look at the settings.Response.Headers if I need to.

Async Fail?

I also created an async version which is pretty much identical to the sync version except for the async and await semantics (and note how it’s not so easy to reuse existing code unless you can factor the pieces in great detail so this method is practically a copy of the first):

public static async Task<TResultType> JsonRequestAsync<TResultType>(HttpRequestSettings settings)
{
    var client = new HttpUtilsWebClient();
    
    if (settings.Credentials != null)
        client.Credentials = settings.Credentials;

    if (settings.Proxy != null)
        client.Proxy = settings.Proxy;

    client.Headers.Add("Accept", "application/json");

    if (settings.Headers != null)
    {
        foreach (var header in settings.Headers)
        {
            client.Headers[header.Key] = header.Value;
        }
    }

    string jsonResult;
    if (settings.HttpVerb == "GET")
        jsonResult = await client.DownloadStringTaskAsync(settings.Url);                
    else
    {
        if (!string.IsNullOrEmpty(settings.ContentType))
            client.Headers["Content-type"] = settings.ContentType;
        else
            client.Headers["Content-type"] = "application/json";

        if (!settings.IsRawData)
            settings.CapturedRequestContent = JsonSerializationUtils.Serialize(settings.Content, throwExceptions: true);
        else
            settings.CapturedRequestContent = settings.Content as string;

        jsonResult = await client.UploadStringTaskAsync(settings.Url, settings.HttpVerb, settings.CapturedRequestContent);

        if (jsonResult == null)
            return default(TResultType);
    }

    settings.CapturedResponseContent = jsonResult;
    settings.Response = client.Response;

    return (TResultType) JsonSerializationUtils.Deserialize(jsonResult, typeof (TResultType), true);
    //return JsonConvert.Deserialize<TResultType>(jsonResult);
}

The call to this method is the same except for the await keyword and Async method called:

var snippets = await HttpUtils.JsonRequestAsync<List<CodeSnippet>>(settings);

This works fine for the HTTP retrieval and parsing, but unfortunately you don’t get the settings.Response instance and therefore no access to the Http Status code or header. The test code from above fails when trying to read the Status code because .Response is null. Argh.

When you’re using the async versions of WebClient (like DownloadStringAsyncTask()) the Response object is never assigned because the overriden GetResponse() method is never fired in the overload as it is in the synchronous call for client.UploadStringAsyncTask().

It turns out that there’s another overload of GetWebResponse() (thanks to Damien Edwards for pointing that out and making me feel like I missed the obvious now :-)) that takes an IAsyncResult input. The reason I missed this originally is that I thought pertained to the ‘old’ async interfaces and so dismissed it. Only when Damien pointed it out did I give that overload a try – and it works!

The updated HttpUtilsWebClient looks like this:

public class HttpUtilsWebClient : WebClient
{
    internal HttpWebResponse Response { get; set; }

    protected override WebResponse GetWebResponse(WebRequest request)
    {
        Response = base.GetWebResponse(request) as HttpWebResponse;
        return Response;
    }

    protected override WebResponse GetWebResponse(WebRequest request, System.IAsyncResult result)
    {
        Response = base.GetWebResponse(request, result) as HttpWebResponse;
        return Response;
    }
        
}

Now, with this code in place the async tests that access the Response object to get the Http Status code and access the Response HTTP headers work fine. Yay!

With Access to Response, WebClient becomes a lot more useful!

Getting access to the Response object makes WebClient a heck of a lot more useful above and beyond its simple interface. And its simple interface really is a bonus if you just need quick and dirty HTTP access in an app. And it’s just built into the standard .NET libraries – no additional dependencies required and it also works with pre-4.5 versions of .NET.

This is great for simple and easy HTTP access, but also for simple wrappers like the one I described above. Having a simple helper to make JSON calls, plus the ability to capture input and output data is going to make some testing and debugging scenarios much easier…

© Rick Strahl, West Wind Technologies, 2005-2014

by Rick Strahl at November 26, 2014 01:15 AM

Calvin Hsia's WebLog

Create managed Tests for native code

In the old days of code development, the developer would do several steps repeatedly: 1. edit the code 2. Save 3. Compile 4. Link 5. Deploy (if necessary) 6. Start (or switch to) the debugger 7. Start the app under the debugger. 8. Examine the code behavior...(read more)

by CalvinH at November 26, 2014 12:15 AM

November 25, 2014

VisualFoxProWiki

WordAutomationPrintMerge

I have revisited this. In doing so I have found a MUCH cleaner way to automate word from VFP and attach a data source.

The main issue is that if you don't get it exactly right, the user is presented with a system dialogue box.

This is pretty simple: Pass in the full path to the document file, and the excel file. Also pass in the name of the worksheet from the workbook that you want to use as merge data. I only got it to work when the worksheet name matched the workbook name, but I didn't fiddle around with it too hard.

I didn't get this to work with a named range, or using a R1C1 type references. IT also doesn't seem to work with docx files. :(

NOTE What you MUST get right are: the weird backward single quotes around the sheet name AND the $ at the end of the sheet name. I didn't know how to type the quotes so I ended up cutting and pasting them into the code ... and was shocked when it actually WORKED!! ?cs

function openDataSource( tcDocFile, tcXLSFile, tcSheet ) && tcSheet could also be a named range

  local loWord, loMerge, lcSheet
  loWord = createobject( 'word.application' )
  loWord.Document.Open( m.tcDocFile )

  loMerge  = m.loWord.ActiveDocument.MailMerge
  lcSheet = "SELECT * FROM `"+m.tcSheet+"$`"

  loMerge.openDataSource(m.tcXLSFile,,,,,,,,,,,'Entire Spreadsheet',m.lcSheet)

endfunc

November 25, 2014 07:50 PM

CULLY Technologies, LLC

My new music player on Linux is console based

I was listening to the Linux Action Show and they highlighted the application “Music on Console” a.k.a. MOC. I took it for a spin and was hooked.

MOC [play] - 11 Audioslave - Bring 'em Back Alive (Audioslave)_072

MOC was in the Ubuntu repos so adding it was easy via the Software Manager. You can also sudo apt-get install mocp. To run, open a terminal and enter mocp and it should start up. There are ways to customize the themes and make it look much nicer including having transparent backgrounds, themes and more. I’ll let you search for that on your own.

Here are a few shortcuts that are helpful:
(Remember that CaPiTaLiZaTiOn matters!)


? or h ==> get help
A ==> add music files recursively to the playlist
[Space] ==> play/pause currently selected song
s ==> stop playing
S ==> shuffle playlist
[Tab] ==> switch between panels
, ==> increase volume by 5%
. ==> decrease volume by 5%
Q ==> quit mocp

When I run htop, it barely shows 3% CPU utilization. Most of the time it is less than 2% CPU.

One feature request that I’d like is a way to shuffle the playlist order. You can play the playlist in shuffle order, but there’s no way of seeing what the next random song will be. If I could shuffle the playlist, I could play it in straight order. It’d be a ‘nice to have’ feature.

I liked Clementine and Banshee, but I didn’t need all of the album art and all of the confusion and overhead. MOC is really nice, simple, light weight and fast. That’s all I need.

More info:
How to install MOC
More MOC shortcuts
A MOC demo video

by kcully at November 25, 2014 03:06 PM

Alex Feldstein

November 24, 2014

Alex Feldstein

November 23, 2014

Ted Roche's weblog

Due to unprecedented call volume, you may experience significant delays.

As you may have guessed by the titles of the last few posts, I have had the pleasure of waiting on hold for support from Giant Faceless Corporations lately. I am so glad I am able to supply personal, timely and appropriate support for my clients so they don’t have to put up with this nonsense.

The post Due to unprecedented call volume, you may experience significant delays. appeared first on Ted Roche's weblog.

by Ted Roche at November 23, 2014 04:42 PM

Please listen to all the options as our menus have recently changed.

Updating the many plugins I have running the site in the background: WordPress SEO by Yoast, WooDojo, the Woo Canvas theme, the wplicense Creative Commons license plugin, the Google Sitemap and Google Author Links, and more. Stay tuned…

The post Please listen to all the options as our menus have recently changed. appeared first on Ted Roche's weblog.

by Ted Roche at November 23, 2014 04:39 PM

Alex Feldstein

November 22, 2014

Alex Feldstein

November 21, 2014

CULLY Technologies, LLC

Visual Foxpro back to #50 on Tiobe Index

The last release of version 9.0 of my beloved Visual Foxpro was way back in in 2004 and last updated in 2007. Right around the time that they announced the last version, Visual Foxpro peaked on the Tiobe Index at #13 in April of 2006.

After that time, Visual Foxpro has fallen through the ranks until we fell into “The Next 50 Programming Languages” section. I had resigned myself to seeing VFP sit there until it eventually dropped off.

Imagine my surprise when I checked the Tiobe Index when Visual Foxpro rose up to #50! What a surprise!

Visual Foxpro on Tiobe Index

Was it the Southwest Fox Conference? German DevCon? The Prague Foxpro meet up? It may also be related to an adjustment that Tiobe made to the rankings and categorization of the Basic languages. I’m not sure what activity led to Visual Foxpro getting back up in the rankings, but I’m sure glad that it’s there. Makes me feel all warm and fuzzy.

Now, we just need to get my new favorite development tool which is Xojo up onto the Tiobe Index. Unfortunately the Xojo developer crowd isn’t a very blogging oriented community.

by kcully at November 21, 2014 03:07 PM

Ted Roche's weblog

Your call is important to us.

A quick recovery of the blog was functional by noon, and had its appearance restored 99% before the end of the day. I was extremely cautious on this one, as there were some abnormal log entries that indicated the remote possibility that a bad update or malicious software might have corrupted the site. So, rather than patching a potentially corrupted site, I put the site in deep freeze, and built it again from reliable sources. All seems well, so far, and I look forward to digging in and determining the root cause.

The post Your call is important to us. appeared first on Ted Roche's weblog.

by Ted Roche at November 21, 2014 12:07 PM

Alex Feldstein

November 20, 2014

Ted Roche's weblog

Please stay on the line, as calls are answered in the order in which they are received

Astute fans may have noticed the site seems to be having a little trouble. Yup. The site became non-responsive the morning of 20-Nov-2014, and the usual actions had little effect. There were few clues in the logs nor diagnostics easily pulled from the software. To get up and running quickly, I did the famous “WordPress 5 minute Install” and restored the essential configuration. I’ll be restoring the usual theme, fonts, plugins and assets (pictures, links, videos, etc.) from backups as time allows.

Thank you for your understanding.

The post Please stay on the line, as calls are answered in the order in which they are received appeared first on Ted Roche's weblog.

by Ted Roche at November 20, 2014 07:39 PM

FoxProWiki

WebHosts

Looking for hosting for your website?

VFP-supporting HostsLinux HostsFree Hosting

  • Frihost > provides free quality hosting for all active members its <a href= provides free quality hosting for all active members its community forums >. They don't put any advertisements on the websites and are compatible with most wikis. Features include php, mysql, python, 250MB of space and 10GB of traffic. From their website: . They don't put any advertisements on the websites and are compatible with most wikis. Features include php, mysql, python, 250MB of space and 10GB of traffic. From their website: "We only provide free php hosting to all active members of our forums. You need at least 5 quality posts before requesting a completely free web hosting account. Being active on our forums afterwards is also required in order to keep your hosting account."


  • I'm looking for a host for my website, I'm totally annoyed at the @#)*(&)(*^$ popup windows that are being forced onto the GeoCities pages now. I don't need anything sophisticated my site is going to stay simple static pages. Any info anyone can supply would be greatly appreciated. -- df [check out newsguy.com - for 5.95/month you get 30 megs o space and mysql - NO POPUPS -- William Sanders ] Strongly agree, I even avoid following links to GeoCities pages for same reason.

November 20, 2014 07:16 PM

Alex Feldstein

November 19, 2014

Alex Feldstein

November 18, 2014

Alex Feldstein

Sandstorm's Blog (Home of ssClasses)

Encapsulating Popup Calls Within Forms


One of my dissatisfaction when creating a popup shortcut via Define Popup and later On Selection Popup or On Selection Bar commands is its insistence of not accepting Thisform reference.  Something like this:

Define Popup PopFaves From Mrow(),Mcol() Margin SHORTCUT
Define Bar 1 Of PopFaves Prompt "Add to My Favorite"
Define Bar 2 Of PopFaves Prompt "Remove from My Favorite"
Define Bar 3 Of PopFaves Prompt "Show My Favorite"
On Selection Popup PopFaves Thisform._SubFave(Bar(), m.lcCaption)
Activate Popup PopFaves




Where _SubFave is a form method I created to receive parameters and handle calls of current selection.  And it just darn won't accept Thisform reference there!

And so on all popups I have, I have to use an outside prg for that with something like this:

* Calling as Procedure
Define Popup PopFaves From Mrow(),Mcol() Margin SHORTCUT
Define Bar 1 Of PopFaves Prompt "Add to My Favorite"
Define Bar 2 Of PopFaves Prompt "Remove from My Favorite"
Define Bar 3 Of PopFaves Prompt "Show My Favorite"
On Selection Popup PopFaves DO SubFave with Bar(), m.lcCaption  
Activate Popup PopFaves

or

* Calling as Function
Define Popup PopFaves From Mrow(),Mcol() Margin SHORTCUT
Define Bar 1 Of PopFaves Prompt "Add to My Favorite"
Define Bar 2 Of PopFaves Prompt "Remove from My Favorite"
Define Bar 3 Of PopFaves Prompt "Show My Favorite"
On Selection Popup PopFaves SubFave(Bar(), m.lcCaption) 
Activate Popup PopFaves


And then later finds a way to bring back focus from that Function/Procedure to the active form's methods because like I said I want to encapsulate "almost" everything to said form; which works, but not to my entire satisfaction.  However, when I need to do things, I need to do things fast and so I use the function/procedure calling way until I am free to experiment, which I do today

Playing with my popup for favorites (using right-click on treeview), through trials and errors, I found that we can do it like this:

Define Popup PopFaves From Mrow(),Mcol() Margin SHORTCUT
Define Bar 1 Of PopFaves Prompt "Add to My Favorite"
Define Bar 2 Of PopFaves Prompt "Remove from My Favorite"
Define Bar 3 Of PopFaves Prompt "Show My Favorite"
On Selection Popup PopFaves _Screen.ActiveForm._subfave(Bar(), m.lcCaption)
Activate Popup PopFaves

And it works, I can now use a form method for said popup

But then, _Screen.ActiveForm seems to still be outside of  a real encapsulation because in a way you are going out of the current form back to VFP's main screen (_screen), checking which form is currently active (current form) and then coming back inside the form to work on the form's method.  So here is a better way (for me) than that.  Put the reference to the current form in a local variable and use that variable on your need like this:

LOCAL loForm
loForm = thisform
Define Popup PopFaves From Mrow(),Mcol() Margin SHORTCUT
Define Bar 1 Of PopFaves Prompt "Add to My Favorite"
Define Bar 2 Of PopFaves Prompt "Remove from My Favorite"
Define Bar 3 Of PopFaves Prompt "Show My Favorite"
On Selection Popup PopFaves m.loForm._subfave(Bar(), m.lcCaption)
Activate Popup PopFaves

And there you have it.  A way to encapsulate the call to popups within the form itself.  Just in case you didn't know yet as well like I do before this.  Cheers!

by Jun Tangunan (noreply@blogger.com) at November 18, 2014 12:22 AM

November 17, 2014

FoxProWiki

VFPConferenceAttendance

Editor comments: Updated for 2013 attendance
Anybody know or better remember these attendance numbers at the major VFP events?

Can somebody else check the total for the 2006 year? Looks wrong to me...

Summary:

  • 2004 is down about 400 from 2003, the difference being no Portal Fox conference, which drew 440 in 2003. It probably could have been the year's biggest in 2004.
  • For the second straight year European and Asian conferences out-draw USA conferences.
  • See below for up-to-date graphs.
Year Europe
- Asia
North
America
Advisor Total
1992 2500 2500
1993 1300 1300
1994 183 579 0 762
1995 281 976 3000 4257
1996 297 425 1800 2522
1997 451 527 1800 2752
1998 1185 300 1600 3085
1999 1080 625 1300 3005
2000 1000 714 1100 2814
2001 930 787 752 2469
2002 884 596 525 2005
2003 1440 550 375 2365
2004 1060 590 337 1987
2005 2558 305 210 3040
2006 519 181 95 1254
2007 572 244 35 851
2008 451 175 626
2009 312 106 418
2010 371 125 496
2011 119 119
2012 131 131
2013 145 145
2014 85 119 204

November 17, 2014 04:17 PM

Craig Bailey

More on that Google Peaking idea

Another excellent post (long, but worth the read) from Aaron Wall, discussing the ever-growing impact of Google on businesses – no matter how big or small – that markets themselves online (ie just about every business). Scary times.

Not that this is new of course.

The post More on that Google Peaking idea appeared first on Craig Bailey.

by Craig Bailey at November 17, 2014 06:36 AM

Alex Feldstein

November 16, 2014

Alex Feldstein

A day in a vintage Super Cub

Had a beautiful flight today with a friend and his baby.














Homestead General (X51)

by Alex Feldstein (noreply@blogger.com) at November 16, 2014 08:38 PM

Articles

High Performance Responsive Design by Tom Barker

It seems that I have a little bit of time these days. Luckily and thanks to the O'Reilly Reader Review Program I was able to get access to "High Performance Responsive Design" by Tom Barker. Actually, after my last review it was a tough preference compared to "MongoDB - The Definitive Guide" - which is hopefully now next on my reading list. Thanks to approximately 176 pages I was able to dig through this title very quickly, and honestly it was a great experience. Looking forward to see more on this topic.

At the time of writing this review it wasn't available on Amazon yet:

This item has not been released yet and is not eligible to be reviewed.

Anyway, here's my summary which I'm going to publish on the 5th December on Amazon, too:

What an eye-opener!

Although, as good as everyone working in the field of web sites or web application development is talking about Responsive Web Development (RWD) Tom Barker has a simple but nevertheless shocking statement: You're doing it wrong!

Okay, almost... Even though the title is explicitly addressed to web-frontend developers I would rather see it as a guidance for the web-backend developer. Yes, Tom starts his semi-scientific observations on the appearance of web sites but the actual improvement is supposed to happen on the server-side. Responsive Web Development covers way more aspects than just seemless arrangement and dynamic positioning of <div> sections and images. It's about network & bandwidth usage, battery life-time on mobile devices, load performance and rendering time, and other metrics related to surfing web sites.

Thanks to Tom's experience as Director of Software Engineering and Development at Comcast, and an Adjunct Professor at Philadelphia University he seems to have a fable to bring the full story in easy to understand steps to the reader. Chapter by chapter he first addresses commonly used practices, then sheds some light on the individual aspects to finally point out what's wrong with those approaches - inclusive famous anti-patterns - and how it could be improved for better user experience on various devices. Modern web development - as advocated by others, too - should be based on mobile first experience. Start with the smallest screen, with the lowest resources and then extend the user experience gradually until reaching 4K smart TV environment. Define your development iterations on swag - Scientific Wild-Ass Guess or sometimes more politely called guesstimate - and specify your performance service-level agreement (SLA) as early as possible. Thanks to a test-driven development (TDD), use of headless web browser technology and performing continuous integration (CI) one can easily keep track of code commits and their impact on the existing code base.

As a full-stack developer and recently involved in a greenfield web development project based on the MEAN-stack I am very glad that I read this book title at a very early stage of our project. Without any hesitation I'm going to recommend this book to any team member, maybe even ask them to read it as a compulsory lecture. Furthermore, I'd like to pick up this topic during our next user group meetings.

by Jochen Kirstaetter (jochen@kirstaetter.name) at November 16, 2014 12:18 PM

Craig Bailey

Well played Twitter, well played

Twitter’s ‘strategy statement’ update last week really got the twitterverse going apeshit.

But I suspect it was all a cleverly concocted distraction to divert journalists away from the much more obvious message: ie Twitter has no idea how they are ever going to make a profit.

Here’s the internal discussion that probably transpired:
“We need to craft a message so laughable it distracts everyone from our real failings”
“Start with that Dilbert Mission Statement Generator”
“That’s a good start, but not silly enough”
“Add something about platforms”
“And now about products
“And now make it longer – at least more than the maximum Twitter length – that will be sure to cop a bit of flack”
“OK, it’s looking pretty good now…”
“Just one more tweak to make it really laughable: add the word ‘world’ a third time. If that doesn’t get everyone up in arms, then I don’t know what will”
“Release that, and let’s see how our stock price goes. If we manage to limit the price fall to less than 10%, we can chalk this up as win.”

Mission Accomplished.
(Twitter stock is up almost 5 percent as I write this.)

The post Well played Twitter, well played appeared first on Craig Bailey.

by Craig Bailey at November 16, 2014 06:32 AM

Alex Feldstein

November 15, 2014

Alex Feldstein

FoxCentral News

Chicago FUDG meets Monday 17 Nov 2014

 Our November 2014 meeting is scheduled for 5:30pm (CST) on Monday the 17th at 1871 at the Merchandise Mart suite 1212. Eric Selje will be our speaker and his topic is "Stealing Home ... Depot", an analysis of data breaches that have made headlines so often over the past year. He'll also talk about making calls to CouchDB from VFP, the new IntellisenseX Script Sharing feature, Test-Driven Development and the latest FoxUnit changes. Another must-see presentation at Chicago FUDG! More info at http:www.ChicagoFUDG.com - use the EventBrite link on the home page to RSVP and reserve your seat!

by Chicago FoxPro Users and Developers Group at November 15, 2014 01:36 AM

November 14, 2014

FoxProWiki

UpcomingEvents

A place to list upcoming Visual FoxPro events like conferences, meetings, user groups, open training sessions...
Closest at the top please, and please remove past events.

November 14, 2014 08:53 PM

ChicagoFUDG

Editor comments: November Meeting Details
FUDG stands for FoxPro User / Developer Group. This one is based in Chicago, IL. Visit our web site at www.ChicagoFUDG.com !

Leaders:
Michael Hogan
Randy Bosma Speaker Agitator
Jeff Simon Treasurer jeff@datamarkcorp.com
Tom Corrigan Secretary (his FUDG e-mail: tom@corrigan.com)
Greg Gershuny gel4it [at} hotmail {dot] com

Bill Drew Past President bill.drew@sbcglobal.net

Monthly Meetings:
When: Chicago FUDG normally meets on the third Monday of each month, unless it collides with a major event. The meeting room is normally accessible at about 5:15 PM; presentation starts at shortly after our 'business chatter' and introductions at 5:30.
Where: 1871 at the Merchandise Mart suite 1212 (enter from Orleans on the west side of the building and take the west elevators to the 12th floor). When you arrive at the 1871 front desk (adjacent to the west elevator bank) ask to be directed to the FoxPro meeting in the IMSA classroom. Reasonable ($10) parking is available 1 block north of the Orleans Street (west) entrance of the Merchandise Mart.

November 14, 2014 08:48 PM

Alex Feldstein

November 13, 2014

Alex Feldstein

Philae Spacecraft Landed 3 Times on Speeding Comet: See Its First Photos

Amazing and awesome. Gives me Goosebumps just to comprehend what this is all about.

Think of it. Years in planning and design (it was approved by ESA in 1993). 10 years in transit (Rosetta was launched in 2004). A bullet is sent to catch a bullet. l Comet  67P/Churyumov-Gerasimenko is very small (about 4 kilometers in diameter) and is travelling at a speed of 135,000 kilometers per hour. It is at 673 million kilometers from the Sun.

(see what the Rosetta mission is all about: ESA Rosetta FAQ)

Video from Space.com

http://www.space.com/27761-philae-comet-landing-bounces-first-photos.html

by Alex Feldstein (noreply@blogger.com) at November 13, 2014 11:54 PM

Articles

Microsoft SharePoint 2013 Administration Inside Out

Microsoft SharePoint is a great product to work with - no doubt, no questions asked but it can be (and is) quite confusing at any stage of your knowledge. Luckily, I had access to this title when I needed it most... For a software development job I had to set up a Microsoft SharePoint 2013 test lab, and honestly without this book it wouldn't have been possible.

Check out the original (and first) review as published on Amazon:

Great reference - a must-read!

Microsoft SharePoint is a great product to work with - no doubt, no questions asked but it can be (and is) quite confusing at any stage of your knowledge. And basically you cannot use SharePoint to the maximum. I was already following some online video courses with Brian Alderman prior to reading this title hence my expectations were already at a higher stake than usual. The other authors didn't ring a bell in me but I was pretty sure that they would easily match the high quality of content.

The book is actually more like a compendium. The overall structures of chapters is well organised and all chapters are written in a very detailed style. There are a lot of PowerShell scripts as most configuration of SharePoint is done via scripting. Sometimes, this is actually a little bit messy to read and to stay focused on the actual task. But the others took care of that and there are online resources to actually get all scripts to do the job.

Speaking about authors, given the circumstances that we have a pool of authors it happens that certain information is repeated and in rare occasions there are controversial statements for the same functionality. Kind of confusing and my reasoning to downgrade my rating a bit. Apart from that, this title is very easy to understand, filled with lots of PowerShell scripting code, and practical advice and guidance to achieve proper planning, installation, configuration and operation of Microsoft SharePoint 2013. Independent whether you need to have an test environment for software development, or you have to set up a full-fledged server farm with a good number of servers.

As stated initially, I started to read this book already last year during my 30 Days of SharePoint challenge prior to implement a SharePoint client using the Client Side Object Model (CSOM) interface. This book on installation, configuration and administration of Microsoft SharePoint 2013 was a heck of an asset and even though I initially had to deal with an installation of SharePoint 2010 at customer's site, I was in pretty good position to move on to a fully virtualised test bed on Microsoft Azure.

Microsoft SharePoint

Overall it took approximately four to five hours from creating the private network (VPN) on Azure, allocating the various Windows servers for the "perfect" development infrastructure and to get Visual Studio 2013 hooked up for some serious software development. I'd assume that it might have taken me days without the lecture of this title.

by Jochen Kirstaetter (jochen@kirstaetter.name) at November 13, 2014 01:18 PM

Social eCommerce by Stephan Spencer, Jimmy Harding & Jennifer Sheahan

Another book title based on my participation in the O'Reilly Reader Reviews programm. This time we are diving into the depths of online marketing. Whether it's for your own business or providing professional services to your clients as a consultant you definitely should have a go at this book.

Following my review as published on Amazon:

Practical and efficient guide

The book structure is divided in some general background information regarding past, present and maybe future social media networks to keep an eye, then explicit guidelines and marketing strategies on different fields of business, and last but not least great advice on how to get the message out to a broader audience. This allows for quick navigation and using the book as a reference rather than a back-to-back read. Personally, while reading about a particular marketing strategy I went back and forth between other chapters to fill in some interesting side-note and to cook up some ideas.

Although, using and running paid advertising services for some of my clients I still came across a big pile of improvements. The authors describe the benefits of shifting away from plain numbers in terms of search engine ranking towards conversions (and therefore earning money) very well. I'm going to keep this title in an easy to reach location on the bookshelf for obvious reasons:

  • It clearly helps me and my clients to create better and more successful marketing campaigns on social media networks.
  • It's a treasure trunk of links to outstanding online resources in order to create better adverts.
  • Lots of practical information about things to avoid ;-)

 Surely, a must-read book title for anyone selling products or services online. Create value, trust in your brand and then focus on revenue.

by Jochen Kirstaetter (jochen@kirstaetter.name) at November 13, 2014 12:14 PM

Alex Feldstein

November 12, 2014

Alex Feldstein

November 11, 2014

VisualFoxProWiki

DaveCrozier

Independent developer i xBase since 1982 . Now specialising in VFP (7, 8 and 9) bespoke software for small business applications and embedded VFP comms software for Modbus and HPIL/Serial ports on PC's.

Taken on in April 2005 by Flexipol as Software Development Manager in charge of all the bespoke software throughout the factory.

Designer of websites and one about which I'm very proud using a mixture of PHP and VFP at the estate agents "Houses for Sale Abruzzo" or commonly known as HousesForSaleAbruzzo in the area, which specialise in selling houses for sale in the Abruzzo area of Italy. The project came about after we bought a house from them in September 2004. See the website at http://www.HousesForSaleAbruzzo.co.uk

My most interesting project recently has been interfacing VFP with a Modbus LAN containing 127 Electricity meters. Believe me this was a tricky one, but as usual VFP (version 9 in this case) handled the task with ease and the re-learining of Modbus / RS 232 protocol took me kack to University notes from 1976! Called EVOSoft, the full commercial software is available from Autometers Ltd. at http://www.autometers.co.uk with a review at http://www.autometers.co.uk/EVO-Soft.html which contains some screen shots of the software for you to look at.

DaveC@Replacement-Software.co.uk

My Personal Blog is at
http://spaces.msn.com/members/replacement-software

November 11, 2014 05:49 PM

Alex Feldstein

November 10, 2014

Alex Feldstein

An Uplifting Musical Surprise for Dave Brubeck in Moscow (1997)

 

From Open Culture:

Ten years after his first visit to Moscow, jazz legend Dave Brubeck returned to perform before the faculty and students of the Moscow Conservatory. During his concert, an audience member asked him to improvise on the old Russian sea shanty “Ej, Uhnem.” About two minutes into the improvisation, a young violinist rose from his seat and started to play along. You just have to love Dave’s surprised look at 2:09.

http://www.openculture.com/2012/01/an_uplifting_musical_surprise_for_dave_brubeck_in_moscow_1997.html

by Alex Feldstein (noreply@blogger.com) at November 10, 2014 10:28 AM

Photo of the Day


This is the ferry to cross from Ketchikan Airport to town

by Alex Feldstein (noreply@blogger.com) at November 10, 2014 06:00 AM

November 09, 2014

Alex Feldstein

Today is Carl Sagan’s Day!

Carl Sagan (November 9, 1934 – December 20, 1996), American astronomer author and teacher was born today in 1934.

saganday

We remember you today and celebrate your life!

Visit http://www.carlsagan.com/ to see more about him

by Alex Feldstein (noreply@blogger.com) at November 09, 2014 06:05 AM

November 08, 2014

Alex Feldstein

November 07, 2014

The Problem Solver

angular.module("module") is an anti pattern

 

There are two ways to use the angular.module() function. There is the call with one parameter, that returns an existing module and there is an option of using two parameter which creates a new module. The second way, where a new module is created, is perfectly fine and should be used. However the first option, where an existing module is loaded should be considered and anti pattern in most cases and should not be used unless there is an exceptional and very good reason.

 

What is wrong with angular.module(“module”)?

Why should this usage be seen as an anti pattern? Well both creating and retrieving using angular.module() returns the module so it can be extended. And that is exactly where the problem is. When you create a new module in a JavaScript file you can use that reference to add anything you want, no need to load it again. So the only place loading an exiting module is needed is when you want to add something to it in another JavaScript file.

Splitting modules introduces a big risk. As soon as you split an AngularJS module into separate files you can run into the possibility of loading a partially configured module. Where AngularJS checks if all module dependencies can be satisfied at load time it has no way of seeing if these modules are complete or not.  Missing a complete module produces a very clear error message right at startup time like this:

Uncaught Error: [$injector:modulerr] Failed to instantiate module mainApp due to:
Error: [$injector:modulerr] Failed to instantiate module mainApp.data due to:
Error: [$injector:nomod] Module ‘mainApp.data’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you

As the complete application fails to load very obvious and hard not to spot.

 

However if you fail to load just a part of a module the errors are a lot less obvious. In this case the error doesn’t appear until the missing component is actually needed, everything up to that point will run just fine.  The king of error message you will see is something like:

Error: [$injector:unpr] Unknown provider: productsProvider <- products

The error in itself is clear enough but discovering it might not be as easy. If the error occurs in a part of that application that is not used often it might go completely unnoticed.

 

My rule of the thumb: Always define a complete AngularJS module in one JavaScript file.

 

Want to split the functionality into multiple files. By all means go ahead but make sure to do so in a new module and take use module dependencies to make sure everything is loaded right at the application start time. And as angular.module(“module”) is only required to load a module defined in another file there really should almost never be a need to use it.

Enjoy!

by Maurice de Beijer at November 07, 2014 08:23 PM

Alex Feldstein

November 06, 2014

Craig Bailey

Office for iOS Goodness

Really cool to see that the Microsoft Office team are essentially making Office free for everyone to use on iOS (and soon Android). I really like this approach (as I’ve mentioned previously).

And this on the back of the earlier announcement this week about adding Dropbox integration. Exciting times for any Microsoft watcher and user.

My personal user experience so far is very positive. I’m using Word on my iPhone (yet another update) to edit docs in Dropbox and the process has been smooth and problem free. The only issue has been some missing fonts at times, but that hasn’t caused any problems as far as I can see.

All this and the Frank Arrigo episode of Frankly Speaking. What a week :-)

The post Office for iOS Goodness appeared first on Craig Bailey.

by Craig Bailey at November 06, 2014 10:57 PM

Frankly Speaking Podcast 100

Yay, the Frank Arrigo episode finally makes it to our ears. Although it is way too short… it feels as though Frank is just getting started and then the episode is over. Andrew Coates and Michael Kordahi also make appearances in the episode. And Grant Holliday‘s SSW TV session on the physical internet gets not one, but two shoutouts (so it must be worth watching).

The post Frankly Speaking Podcast 100 appeared first on Craig Bailey.

by Craig Bailey at November 06, 2014 10:32 PM

Alex Feldstein

November 05, 2014

CULLY Technologies, LLC

CULLYTech article makes cover of xDev Magazine

xdevmag_20141103I’m proud to announce that our article on “Cheap Xojo Web Application Hosting” has made the cover of xDev Magazine for the Nov/Dec issue!

I can’t post the content here, but you can pick up your copy for less than $10 for a single issue, or less if you subscribe for a full year or more. Check it out.

We’re happy to present the information. It’s important to be able to test a web application for an hour, a day, or longer at a reasonable price. I hope this helps get the word out about Xojo and what a great development tool it is.

by kcully at November 05, 2014 06:47 PM

Alex Feldstein

Articles

Review: Emtel Wingle a.k.a. Huawei E8231

Emtel Knowledge Series in MauritiusHow would you call the approach of taking the concept of "In-Car WiFi" and the marketing of "Home & Office Broadband" to the next level? Well, it's called Emtel Wingle.

The Wingle is an artificial word combination of WiFi dongle, and Emtel seems to be right on spot with this device. Identical to a regular USB surf stick, the Wingle offers an instant WiFi hot-spot as soon as powered up. Of course, you can plug into your laptop or desktop PC to surf the internet but with the hotspot you can also provide a shared connection for up to 10 devices via wireless network. The device also works on plain power supply coming from a wall socket or maybe from a portable USB charger in the vehicle.

Occasional usage

Personally, I use the Wingle every time I'm on tour. On several outings I simply plugged it into the mobile USB charger in my car, and the rest of the family was able to be online - either checking Facebook, having instant chats or having a Skype session with relatives abroad - all while driving around the island. It's kind of fun actually. Furthermore, it's also a nice option while hanging out on the beach. The distance range of the Wingle's wireless network is quite good.

{loadposition content_adsense}

Furthermore, during the regular meetings of the Mauritius Software Craftsmanship Community (MSCC) I give access to my hotspot to other community members, and they love the experience, too. Being able to get access to online repositories on github or Visual Studio online, or logging into virtual machines on the cloud is a very positive aspect for our IT get-togethers. Nowadays, it's an always-on situation for most people working in IT. Even though you should keep an eye on proper balance it's a fact that one is regularly online.

Connection speeds

Well, the Emtel Wingle is a regular USB surf stick and offers internet bandwidth up to 21 MBit/s on the download, and up to 7 MBit/s for uploads. During the last couple of weeks (okay, already months) I did a variety of speed test at different locations. The performance is okay and limitations are given by the international bandwidth constraints here on the island.

Web interface for administration

As soon as you plug the device into your computer it fires up its default website for administration. The initial page is "public" and provides information about your current connection status and bandwidth usage. In order to get more details and additional features you have to log in.

Emtel Wingle: Statistics information about your bandwidth usage
Emtel Wingle: Statistics information about your bandwidth usage

Next to more statistics about bandwidth usage and connected devices you also have the ability to send and receive SMS with your device. Side-note: Emtel sends you an informal message in case your bandwidth usage reaches a certain threshold on your subscription (applies only to post-paid SIM cards).

The Settings area is equivalent to the options you would expect from a full-featured internet router/gateway. You have the ability to tweak the configuration for your wireless network (WLAN) and other sophisticated services, incl. WLAN MAC filter, DHCP settings, enabling virtual servers and DMZ settings for advanced configurations.

Emtel Wingle: Lots of settings for your personalised configuration and optimal usage
Emtel Wingle: Lots of settings for your personalised configuration and optimal usage

Actually, it would be great if Emtel would provide a demo website to explore the Wingle's administration online for everyone.

Resume

Sincerely, I love this type of USB surf stick. Not only I'm able to get my laptop only but also provide internet connection sharing via wireless network to 10 additional devices. This is absolutely great during meetups with others. The handling is just plug-n-play and you're ready to use it.

At the time of writing this article, Emtel offered the Wingle for Rs. 1,699 inclusive VAT.

by Jochen Kirstaetter (jochen@kirstaetter.name) at November 05, 2014 05:44 AM

November 04, 2014

FoxCentral News

Philadelphia VFP User Group meets on November 11

The next meeting of the Philadelphia is next Tuesday, November 11 at 7 PM in room 104, DeVry University, 1140 Virginia Drive, Fort Washington, PA. As always, feel free to come as early as 6:30 and bring some dinner. Member Bob Pierce will speak this month with two short topics: Loosely coupled VFP data While trying to get a forklift program going, I was having trouble with dropped wifi signals in the warehouse. So I developed a background data program that maintains data on a local drive that gets updated from data on the server. I realized later that this technique can also be used during our move to the new facilities when running the in house MRP from multiple locations. In addition it can be used as a mechanism to sync remote data and even reduce total network traffic. Working with VFP and SQL together and providing easier migration path I have developed a simple technique that allows me to work with MySql, Sql Server and other SQL flavors within the VFP environment. No big deal you say, been there done that? The class I developed allows you to mix and match the data using VFP syntax without knowing where the data is or what type of host it is on. This allows me to move data piecemeal in my migration, not change the code in the program (except the added class), to eliminate case sensitivity (MySql on Linux), and to use VFP user defined functions against any data.

by Philadelphia Visual FoxPro User Group at November 04, 2014 09:13 PM

FoxProWiki

UpcomingEvents

Editor comments: Philly Nov & Dec

November 04, 2014 08:56 PM

VFP Philly

November 11: Bob Pierce double-header



Our next meeting is next Tuesday, November 11. Member Bob Pierce will speak this month with two short topics:

Loosely coupled VFP data

While trying to get a forklift program going, I was having trouble with dropped wifi signals in the warehouse.  So I developed a background data program that maintains data on a local drive that gets updated from data on the server.  I realized later that this technique can also be used during our move to the new facilities when running the in house MRP from multiple locations.  In addition it can be used as a mechanism to sync remote data and even reduce total network traffic.

Working with VFP and SQL together and providing easier migration path

I have developed a simple technique that allows me to work with MySql, Sql Server and other SQL flavors within the VFP environment.  No big deal you say, been there done that…  The class I developed allows you to mix and match the data using VFP syntax without knowing where the data is or what type of host it is on.  This allows me to move data piecemeal in my migration, not change the code in the program (except the added class), to eliminate case sensitivity (MySql on Linux), and to use VFP user defined functions against any data. 

Mark your calendars for December 9 for the return of Menachem Bazian.

by Tamar E. Granor (noreply@blogger.com) at November 04, 2014 08:44 PM