Saturday, March 04, 2017

FoxInCloud and Bootstrap

As someone who uses WetBoew in their public facing web sites, it was great to hear that FoxInCloud is supporting Bootstrap. (Bootstrap is the core foundation for the WetBoew initiative)

If someone is trying to move their FoxPro application without major rewrites into the web, FoxInCloud does appear to provide a great solution, especially for mobile. Their screen shots look very impressive.

One huge benefit of Bootstrap are a lot of the plugins such as DataTables (which makes Grids totally rock!)

Great job, Thierry!!

Saturday, February 25, 2017

A Developer's Life: Honing Your Writing

Developers hate documentation.

I don't write that as anything but a statement of fact. Documentation, once an idea has been put on paper or in writing, is instantly out of date. And if it's out of date, what's the point?

In fact, sometimes I think the only people who like documentation are those who:
a) are paid to write it (technical writers)
b) paid to prove it exists (legal) or
c) paid to show some form of output for a failed effort (managers)

Even online documentation is out of date. Going to the MSDN site for virtually any product now has a "Applies to version" because the functionality changes regularly and even then, you will always find an article that was written once as an example of how to do something right, that has been commented on to the point of how not to do something.

But now even worse, you find a link or a post you like. At the time, you wanted to quote it, maybe even copy it, but attribution should be enough with a link, right? But when you want to go back to it years later, it's gone, replaced by a lovely 404 message. (this is one of the reasons I LOVE that many FoxPro developers put their earlier papers online for easier access - some may be out of date but they are there)

Even with proper links, you have to find the date it was originally written. Sadly some writers or posts don't even bother with a date, leaving you to guess.

Thus, consider the popularity of the Wiki (wikis.com may have been for sale for years, but fox.wikis.com was updated on the 22nd of February - THANK YOU Steven Black.). Documentation that can be modified, rightly or wrongly, on an ongoing basis. It's updated, sometimes in small tidbits or in large swaths, carried out, no doubt, by those living at home with their parents in their pyjamas at night. I can say that, as I originally wrote the draft for this at 5am.

But even Wiki articles can be out of date. One of my clients, Government of Canada, have some great initiatives including their own internal wiki (GCPedia) (inaccessible outside the government network). But many of the articles are out of date. Google it and you'll see that many of the first page articles are from 6 years ago. As with many initiatives, the early enthusiasm gives way to ennui.

With one of our recent projects, which uses the GCPedia as its host for documentation, keeping it up to date is a constant activity. In a recent internal poll, one of the comments by our own developers was how out of date it was.

Everyone wants their work to be "evergreen", that term for pieces of work that stand the test of time. But is there ever such a piece of writing? I have a copy of "Outline of History" by HG Wells (two volumes). Originally written in 1920, you can only imagine how much presented in there was either a) outdated by the time it was printed or b) just plain wrong.

(as an aside, I often think about how NOT evergreen many podcasts are, including the FoxShow, which almost makes them just like bad writing. So while I haven't stopped producing shows, I'm trying to find ways to make them closer to evergreen)

This isn't to disparage those who write. In fact, it's meant to inspire. Why?

Coaches, mentors, spiritual leaders all lead their pupils in spoken mantras. This helps embolden, enthuse and even solidify their efforts. When someone wants to accomplish something, even just the act of saying it out loud makes a difference.

But just as much, putting pen to paper, or fingers to keyboard, or mouth to microphone, also serves a similar purpose. It solidifies a concept, even if it goes out of date the very next second. It forces you to THINK beyond just an idea.

I once (circa 1990) had an idea for a handheld device that would record a voice message and then send it on the network to another recipient, translating the voice to text (as much as that was possible back in 1990). It didn't need a keyboard because that would be in the way, although it did need buttons but the most important aspect was this communication piece. Sure, there were cell phones back then, but this would have been a device I would really like. I thought it was ingenious --- I even drew up a prototype and put an Apple logo on it, because after all, I was a person who bled in six colors and only they would be able to make such a device (ah! the naivety of youth). But I didn't take it further. I didn't think about the other aspects about it. My mistake.


Writing helps you think about the audience and fleshes out the concept, especially when you focus on ideas. It takes you down the rabbit hole and if you ever get to the point of being able to write streams of consciousness, helps you not lose any of those ideas. Coming back to older writing also helps you ensure you got the point across correctly.

I haven't posted in a while but I've been writing. I currently use 750 Words as my "sounding" board. It helps me solidify ideas but with some added bonuses. I also try to write 10 ideas a day, although I will say that the Idea Machine book hasn't really helped me about.

We have a book at home called More Political Babble and one of the parts that always makes me chuckle is a piece about  Newt Gingrich:

"When Gingrich was speaker of the House, Bob Dole was the Senate majority leader. And so Dole spent a lot of time listening to the speaker’s proposals. “Gingrich’s staff has these five file cabinets, four big ones and this little tiny one,” he told The New York Times. “Number one is ‘Newt’s ideas.’ Number two, ‘Newt’s ideas.’ Number three, number four, ‘Newt’s ideas.’ The little one is ‘Newt’s Good Ideas.’”" 

I take an idea and then try to see how it can be built. By writing about it :

a) how could I tell someone about it so they understand?
b) how can I write it so that it's actually feasible?
c) how can I ensure that it's deliverable?

By writing these items out, I improve, not just my writing, but also my ability to deliver on my ideas. Delivery isn't always about shipping a product - it can be about changing a point of view, shaping an hypothesis or validating an argument. In software development, all of those skills are needed.

So yes, I realize that many of the links in this article will be outdated at some point. Your production documentation may be outdated, especially if it's not online, but even if it IS online. There is still value in creating it provided you plan for it to be obsolete at some point:

1. Date your work. You don't want someone thinking it's current if it's not.

2. Realize it's dated. Realize that things will, in all likelihood, change.

3. Realize that not everything is known. Therefore, what you write may be right or it may be wrong.

What else can you write about as a developer? I like to write out our post mortems or retrospectives. It keeps me honest. We may continually to come back to wanting to do something that doesn't get done or try something and then decide it doesn't work. I like to create an entry in our Wiki the minute someone asks a question or has a problem, so we can come back to it and try and improve on it later. The writing may be short or long. It may even be wrong.

But most importantly, keep it around. There is nothing worse than losing writing.

There's an added trick you can do when you have written down all those ideas:

Condense a larger piece of writing into a smaller set. 

Think about your audience. No one wants to read a 750 word email - they want to read a three point Powerpoint or a five sentence email.  If you've written your longer piece, then coming up with your three or five points is a lot easier. Because you've thought of the issues, you've carried it through, you've worked out the kinks or at least identified them. Your condensed version will offer a lot more and may inspire more reading and writing. I thank Bill Jensen and Simpler Work for that little tidbit.

But the value in writing out your ideas, and honing that writing to get a point across, will always be useful, to developers, to writers, to teachers, to students, to managers, and sometimes, even just to YOU.

Tuesday, February 14, 2017

VFPX - Alive and kicking with new

I find it interesting that Visual Studio is celebrating their 20th anniversary and the post even made mention of FoxPro (see the comments) and despite all of the growth, it's still a tool kept in some people's toolbar (even back as far as 1997).

But moreso, the open-source VFPX is more than 10 years old (I believe the official birthday would have been around June , 2016). Nowadays Microsoft is open-sourcing more of its underlying code. I'd like to think that if they had this attitude 10 years ago, VFP would have been open-sourced but that's doubtful. The proprietary VFP engine and concepts have made its way into countless Microsoft products.

I always think about open-source projects as a bit of leap-of-faith. That's because open-source projects aren't always like the public domain projects of yore. By their very nature, they rely on a group of people providing feedback and pushing forward from a version 0.1 all the way to full release cycles. That's not just open-source, of course - Microsoft is notorious for starting projects and then abandoning , sorry, folding them into newer technologies. I came across an older project of mine that used DDE, it made me think fondly of building interactive spreadsheets with Windows 2.0.

But even though Visual FoxPro is a defunct product from Microsoft, the VFPX project is still going strong with over 14 updated projects in the past year. These projects keep FoxPro applications able to use popular products and technologies.

One of the best things is that many of them provide these functionalities without relying on special DLLs or COM automation. Need to go beyond VFP's limited Excel output? consider the XLSXWorkbook project. Doing payment systems? Look at Stripe integration.

The great thing about VFPX is that many of the older projects are still getting updated or do their job exactly as they need to and aren't obsolete.

VFP and the FoxPro community has always been one of "if you need it and it's not there, build it and then share it". That attitude continues to this day.





Monday, August 22, 2016

New FoxShow Episode - Southwest Fox 2016

It's hard to believe but Southwest Fox has been going for 13 years. This year is the 10th time Doug, Tamar and Rick have put the show on and Doug and Tamar spoke with me on the latest episode of the FoxShow to tell me about what they have planned (they even have a special discount for FoxShow listeners - go to the site for more details).

Doug made a great point about how in this age of Google where you can find a quick answer moments away, the real value of conferences is the ability to deep dive into a subject and speak with experts and other developers. StackOverflow may rock for finding those answers but it certainly helps to listen to something longer than a 10 minute answer about issues that you may be having.

The conference is coming up quickly - September 22nd-25th and there are both pre and post conferences and other vendor training sessions. Rick Strahl is bringing his West-wind Web Connection training to the show and Tuva Vinistky is offering a FoxInCloud post-conference as well.


Friday, January 29, 2016

Useful Tip: Exporting Test Cases in TFS 2013

I've been using TFS for a few years now at a job. I know many will go with GitHub and other tools but when you're working in a Microsoft shop, you push them to use as many of the available tools as possible.

In this job, we're working for the main Development group who provides services to internal clients. Recently we showed these internal clients how we were doing full sanity tests prior to each iteration being marked as Complete (we do a three week iteration - more on that in a future post). When we showed the client the Test Cases and the steps, the client immediately wanted them. They were hiring new testers for their own testing and were worried about the time it would take to get them up to speed.

Note: while we've been using the automated tests, there are some aspects of the software that aren't supported under CUIT. In addition, test cases with steps help junior testers become more familiar with the actual application.

Short Answer: Use the Export approach

Long Answer
At first, I figured I would use SSRS to build a useful report. However, there is no easy way to get to the data. The post here suggested the following SQL:
use tfs_defaultcollection
declare @fldIdSteps int = (Select top 1 fldid from Fields where ReferenceName = 'Microsoft.VSTS.TCM.Steps')
select *
from WorkItemLongTexts
where FldID = @fldIdSteps and id=6514

This works except that you then see that the actual steps are stored as XML.


Then I come upon this link. While Microsoft is certainly pushing people to use VS Online to get the most current features, I was happy to see that this was also available in TFS 2013 Online.

Simple steps:
1. Find your Test Suite.
2. Switch to Grid Layout.


3. Now you can cut and paste it into Excel for nicer formatting.

But there is a better way - THIS one.

Just right-click on the Test Suite and Export for Email.

I then took the email and cleaned it up in Excel. Fast and easy and now the client is super happy!





Wednesday, November 11, 2015

String.Format for Visual FoxPro [feedly]

Thanks Eric for showing me Woody's string.format function. It reminds me of Steve Black's MsgSvc implementation ( which could also be used with a Text type). 

I remember when I first saw String.Format in code and I had to take a step back and look again at it. Once you're used to it, it makes wording so much easier. I've seen code using it for building complex web URLs among other purposes.

But look at the date on the post -2010. How many other great functions have been lost inside the MSDN library of VFP posts. It might be great to revisit all of these in separate posts.

----
String.Format for Visual FoxPro
// SaltyBlog

[Originally Published in FoxRockX, September 2010]

----

Shared via my feedly reader

Wednesday, August 05, 2015

Security in Windows 10


 discusses some Windows 10 privacy settings and their implications.

"Finally, we will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary."
"In other words, Microsoft won't treat your local data with any more privacy than it treats your data on its servers and may upload your local data to its servers arbitrarily"

I did a quick install on a VM choosing the Express settings. When I fully deploy this on a real workstation, I will likely choose to wade through all of the individual pages, as David recommends.


Of course, losing one's privacy is nothing new - it's happening all over the place (despite Santa Ana's police force's lawsuit http://reason.com/blog/2015/08/04/suspended-cops-say-video-of-them-eating or Dads who don't like low-flying drones over their homes -http://kfor.com/2015/08/03/it-was-the-same-as-trespassing-father-shoots-down-drone-in-backyard-hovering-over-his-daughter/)

When one is using a computer, however, one should expect it - whether it be your boss or ISP. But now knowing that your software is outright doing it, knowing that these companies are complicit in giving this data to whoever asks for it, it may be to rethink that approach.

Andrew



Sunday, July 19, 2015

Rick Strahl: Rise of Javascript Frameworks

Rick Strahl just posted a fantastic article going through the rise of Javascript frameworks. It's only part 1 so there will be more.

For those still coding their javascript manually but starting a new project, Rick provides great pros and cons for choosing a framework.

I was surprised that Wakanda wasn't listed - but it seems to be far more than just a framework, more of a full blown application tool and stack.


And then I saw this great graphic which captures it to a T


Wednesday, June 17, 2015

Handy Visual Studio Tip: Creating Your Own Search Folder Sets

I wasn't aware of this useful feature until just recently. It's been in Visual Studio  for a while but if you've never come across it, you wouldn't know it was there.

A client application had a few distinct solutions: one for a web app, a separate desktop app, web services and finally a database solution. There were times when I was in one of the solutions and what I really needed to do was find any instance of a particular call - in short, searching the contents of every file. 

(for VFP users, I would typically use Code References for this and just do a broad search. In fact, that's what I have done on occasion, but no more!)

Ctrl+F in VS brings up the Find dialog. By default, it's in Quick Find mode, so it will only search the current document. This can be expanded to "Find in Files", at which point in time, you can identify where you want Visual Studio to "Look in". The default list includes Current Document, All Documents, Current Project or Entire Solution. BUT, note the button with the ellipsis to the right of the drop-down. 

Click that and you can define your own Search Folders Sets. In doing so, you've expanded the list of "Look In" places so anywhere can be searched. The way our application was laid out, I created separate search folders for "Everything", "Database" and "Web Services".

Now, whenever I need to search for code within files, I can do it all in Visual Studio, even if the project isn't loaded.

Note: This may be a known feature for many developers or it may have been one of those features that were heavily promoted when it was first introduced in seminars, but my experience has shown that many developers start doing things one way and never find out about handy features like this.

Friday, September 26, 2014

Fwd: Great Article on Code Review


http://blog.salsitasoft.com/practical-lessons-in-peer-code-review/

Consequences of bad reviews
  • Not having time to deal with your review backlog.
  • Delaying a release because your reviews aren't done yet.
  • Posting reviews that are no longer relevant since the code has changed so much in the meantime.
  • Doing poor reviews since you have to rush through them at the last minute.
Ideas
>> something around 25% of the original development time should be spent on code reviews

>>understand how the code fits into the larger context of the application, component or library it is part of. If you don't grasp all the implications of every line of code, then your reviews are not going to be very valuable.

>>  empty their review backlog every day. 

Fix One Area At A Time
>> If my colleague spends a week adding code willy-nilly across a large project then the patch they post is going to be really hard to review. 

>>  creating reviewable code is to annotate your code reviews.

>> Commit third-party code separately

When doing large refactorings, 
>> refactor code incrementally. Figure out a partial change of reasonable scope that results in a working code base and brings you in the direction you want to go.