Doug wrote recently on using Google Translate to localize applications, giving step by step instructions on how to get translations automated from their online API.
Rick Strahl had also posted about this earlier in November with ways to do this without needing the API.
So we know it's possible - the question is : should you use it?
Automated translations have come a long way from years ago when you had to use either specialized CDs or babel fish.
Still, the big challenge with localizing internally is ensuring your translations are accurate for its audience. Like Doug, I live in Canada where most government software must support our two official languages: English and French. Sounds easy, right? After all, both languages have been around for centuries - translation must be pretty straight forward. Not so much.
Many moons ago, I worked for a company was delivering the same basic software to two separate government departments. The software needed translations for several terms, one of which was the word "Browse". We asked around, went to the official translation group within each department, and received.... four different translations, all of which could be used, but only one of which would make a different person happy.
Also, consider how the terms are used. On a standard menu, we have File, Edit, Cut, Copy and Paste. A few interface guideline books I've read suggest that menu items should be treated as verbs but in the imperative sense, as though you are telling the computer to do something. Hey computer, "Save"! "Copy!", "Quit!" It makes sense.
However, when translated to French, if I used the imperative, you might see terms like Sauvegardez! Copier! Quittez! (a sample of using imperatives can be seen here). Using Babel Fish, Cut becomes Coupe ( as in "he cut the tape"). Google suggests Couper. But for the word Save, Google offers Enregistrer, whereas French software typically uses Sauvegarder.
But, according to translators, in French, you rely on the standard verb. So the terms should appear as "Sauvegarder", "Copier", "Quitter". I'm not sure what the practice is in Germany or China or Mexico, but the problem likely recurs there.
Heck, in 1995, when I was in Paris, while Canadian french software used the word "Aide" for Help, French applications there were simply using the ? to indicate the Help menu.
This hasn't changed over time. I'm currently involved in a project where once again, one term comes up with at least 2 or three different possible valid translations.
What's the right answer? If you rely on Google Translate too much, you'll find you run the risk of being Ford offering the "Pinto" in South America, or the LaCrosse in Quebec. Your best bet is to find someone who speaks the language natively to ensure your translations make sense.
Of course, then you might find two people to help to do the translation and STILL end up with 5 possible translations for a single simple word.
It's great that a company like Google (and Yahoo) offer translation sites we can all use. Thanks to the posts from Doug and Rick, FoxPro developers can easily take advantage of it through code. The Google translation API looks like it's making headway especially for menu style terms. But be sure to run it by some native speakers before releasing - it may save some embarrassment later on.
I wonder if it would have been easier on that guy in the Geico ad if he had simply looked up the guinea pig term for "row".
FoxPro VFP
Andrew MacNeill - AKSEL Solutions
Solutions for Today; Ready for Tomorrow. Andrew MacNeill's blog about Visual FoxPro, databases, development, and technologies that sprout around the FoxPro and related communities.
Saturday, December 10, 2011
Monday, December 05, 2011
SitePoint eBook Sale for Developers
Over on the MadFox list, Jim noted a great sale over at SitePoint:
"SitePoint has an interesting 24 day, digital download Christmas Sale at: http://www.sitepoint.com/sale/
Check it out.
"SitePoint has an interesting 24 day, digital download Christmas Sale at: http://www.sitepoint.com/sale/
Books are mostly available as PDF, .epub, and/or .mobi downloads.
You can purchase the daily bundle or individual books."
Monday, November 14, 2011
VFP Entity Framework 4 Provider
Tom Brothers pointed me to a new project he's working on: the successor to his LINQ for VFP work: an VFP entity framework 4.0 provider.
This means using the VFP OLEDB driver, you can easily access FoxPro data in VS 2010 Entity Framework solutions.
Great job, Tom!
Saturday, October 15, 2011
Review: Version Control by Example
It isn't surprising that most FoxPro developers think of one primary tool when version/source control is mentioned: Visual SourceSafe. After all, this was the Microsoft tool that was heavily promoted when version control integration was first promoted in VFP. (I recall YAG and Flash introducing their Multi-User Project Manager for FoxPro which was my first introduction to how to let multiple developers work on the same project, absolutely needing some kind of version control)
But if you, like many other VFP developers, were geographically remote, you quickly discovered SourceGear's SourceOffSite, a SourceSafe client that made working remotely fast and easy. SourceGear's founder, Eric Sink, has written on version control for years and SourceGear moved from assisting SourceSafe to Vault, a SQL Server based alternative and additional tools, such as bug-tracking.
VFP's integration of source control isn't perfect - most of it due to its use of the DBF/FPT format for MNX, VCX, SCX and FRX - and the existing SCCTEXT has been improved in the past with alternate SCCTEXT and GenXML.
More recently, however, he's written on open-source version control systems, and no surprise, SourceGear has written its own distributed version control system, Veracity (also open-source). His new book, "Version Control By Example", however, isn't just about Veracity - it's about making Version Control even more accessible than before.
He takes the reader from the history of version control (v1 - SourceSafe , v2 - centralized version control, v3 - distributed version control) and then plunges into perhaps, one of the best examples of learning Source Control in recent memory.
Eric walks us through exactly the same development scenario, using Subversion, Git, Mercurial and Veracity as the version control tool. With Harry and Sally, two developers separated by an ocean and culture, we start with the creation of a software project and go all the way to its version 1.0 implementation, with the challenges of code conflicts, spelling changes, commenting and of course, the inevitable, "I'm going to work alone" mentality.
But the book also describes how different software (web, commercial, etc) implement version control and the internals of how each VCS handle some of the details. While Veracity is discussed, it isn't heavily promoted - this isn't your "here's why my product rocks" book - this is a discussion piece on the strengths and weaknesses of each tool.
Eric's writing style is fun and easy to read. With most developer books, readers pick and choose what chapters you read, and while you can do this with Version Control By Example, I read it cover to cover. You might think going through the same example four times would be boring - but Eric's minor changes make it a breeze (if you're looking for the many different ways Brits can say "happy" or "angry", this is just the sprig in the thicket!) Highlighting the differences in culture helps show the "real" development process.
My favourite chapter is the Best Practices where there are gems that even experienced software developers may not consider:
3) Don't Comment Out Code. (throw it away! - as some developers know, I just hate unnecessary comments comments!)
If you're looking for a new version control system, read it. If you've never heard of version control before (hello students!!), read it. If you're looking at changing your version control system (some of my clients are still using VSS), read it. If you're looking for a great dev book, read it. I received a copy and after reading it, the best thing I could do, as I do with all the best developer books, is share it.
Wednesday, September 21, 2011
Steven Black Speaking at Southwest Fox 2011
Yet another great reason to go to Southwest Fox (coming next month) - Steve Black will be speaking.
As Doug says, Steve's sessions are always lively, thought-provoking and entertaining.
He's speaking on Techniques and Niche Marketing - two topics he certainly knows well.
Southwest still has about 70 openings left (25 of which are discounted) so be sure to book now if you plan on going.
Monday, September 05, 2011
Glad we spent all that time on OLE DB
As the SQL Team notes:
"The next release of Microsoft SQL Server, Code Name “Denali,” will be the last release to support OLE DB. OLE DB will be supported for 7 years from launch, the life of SQL Server Code Name “Denali” support, to allow you a large window of opportunity for change before deprecation. We encourage you to adopt ODBC in any future version or new application development.
Making this move to ODBC also drives more clarity for our C/C++ programmers who can now focus their efforts on one API."
Microsoft's promotion of OLE DB over ODBC is similar to their enthusiasm behind WPF and Silverlight.
WPF's Browser implementation reminds me of the old ActiveX Document technology - it looks like a Browser but it downloads a WPF core to the client - technology that has its roots over 10 years ago.
When it comes to frustrating developers, Microsoft's actions in the past few years is fast becoming the gold standard.
When WPF was promoted as the upcoming technology, I asked a number of developers if new .Net programmers should skip learning WinForms and move right to that technology. "No" - I was told. Yet, with the exception of the code behind work, WPF is so different that WinForm developers face a steep learning curve - so much so that many keep on building these solutions.
WPF leans into Silverlight, which is on as slippery a slope as OLE DB (in my opinion). WPF's saving grace is XAML, which hopefully Microsoft keeps around for 10 years, 3 years longer than OLEDB.
One of the big pushing points for developers moving to VFP 9 was OLE DB, which fits into Visual Studio and .Net.
What was the point?
Imagine what would have happened if those developer resources had been moved to other benefits from the FoxPro platform. Politics win, developers lose.
Monday, August 29, 2011
On Modern Day Games
You see them advertised and they almost seem like a desperate attempt by companies like Parker Bros and Hasbro to recreate an era gone by: that of the family game night and the board game.
Better yet, can't they put a Wifi card in them and get updates online?
In some ways, they have returned. Note the popularity of Games with Friends on iPhone - but many of the games espoused are games that SHOULD rightfully still be popular because they are unpredictable.
While everyone who has ever played Monopoly always has a favorite game piece and property, the way the game unfolds is almost always a game of chance. Like playing with a deck of cards, each game is unique.
Come forward (or back) to the 80s' and the introduction of Trivial Pursuit. While there are some diehards who would play TP using the board and the little pies, the game evolved into more of a "pull out a card and let's see what you know" type of game.
Moving further into the 90s, and you see more of these games. SongBurst (one of my favorites) tests your music ability based on songs from a particular era (50s - 80s - note this was BEFORE the Singing Bee TV show)
The thing most of these games suffer from is "age". Not just the age of the players but rather when they came out. Playing a game of Trivial Pursuit Family Edition requires that the "kids" group be in their 30s now. A question like "how many planets are there" suffers from days gone by.
Heck, going back in time, my parents had a game of Shakespeare where you had to complete the sonnets (try playing that with the kids today).
Think of the fad a while back: the Murder Mystery sold in a box. You could only ever play the game once - after that, it was spoiled.
Some games have tried to recapture the glory of the game of chance but with some silliness: Pictionary, Cranium (which combined a bunch of games including Charades). One particular favorite is Scattergories - where you write down words based on a category. If the categories don't really fit or you're tired of the same basic answers, why not create your own? It's a game designed to be "improvised"
This takes me to my main post. Many games these days have become computerized, offering DVDs of data or the like. So they all use some kind of storage device for their questions and answers. So my question is: are they using storage devices from the 80s?
Our daughter bought the game CatchPhrase, where you try to get the other player to say the word or phrase without saying it. Sounds like a classic game, right? And now that it's computerized, you know you aren't going to get the same questions repeated regularly. Heck, Trivial Pursuit would give you 1000 cards with 8 questions each and only if you played it every night for a year would you begin to remember them (and you know who they are, if you have ever played with them).
Even with a 1GB memory stick and averaging a phrase with 100 letters in it, you should easily have over 10,000,000 phrases - while you may get a few repeats, simply because of random polling, it's highly unlikely you would get the same set of questions in one sitting.
CatchPhrase has approximately 11 categories and phrases Everything from words like "Spill the beans" and "hot potato" to "Dick Cheney", "Weapons of mass destruction" ,"Hannah Montana" and "Top Chef". Yet, in the two times I've played the Food category, 90% of the phrases are the same. So maybe it's just Food, right? Nope - same thing with Everything. They say it contains 10,000 words. That means 910 words per category. So it doesn't really matter if they have a 1000 new words for the current generation.
You'll run out sooner or later.
Is a 1GB stick really that hard to put into a game like this?
Better yet, can't they put a Wifi card in them and get updates online?
Fun in the SQL Transaction Log
I've written about the SQL Transaction log before and since some of my clients don't have some of the great logging tools, I often find myself going back to the
select * from ::fn_dblog(NULL,NULL)
Recently, at one client, I've come across a bizarre problem that defies easy analysis.
The VFP application uses cursor adapters to talk to the SQL Server and in one of the processes, updates one table while adding a record to two other tables. In certain circumstances, the two new records were being added but the update of the other table would not.
While I'm still tracking down what is actively going on, I wanted to note some of the interesting aspects of the SQL Log and pose some questions
A great post in SQLServerCentral broke down the various operation types but it wasn't clear on others:
LINQ to VFP
When asked about the state of Visual FoxPro, I often point developers to the VFPX site on CodePlex. After all, that's where the majority of VFP source code is and where many members of the VFP community place the most of funkalicious work they do (Jim Nelson continues to amaze with his PEM Editor, which should likely be renamed IDE/X, because he's now covering far more than just Projects, Events and Methods.)
But there are OTHER places to find great VFP Code.
Foxite continues to get posts with very cool samples and there are other codeplex sites as well.
But recently, I was looking for ways to work with VFP Data in .Net and came across:
Yep! Tom Brothers has built an iQueryable toolkit for FoxPro. Started in 2009, the latest version was updated on January 9th, 2011.
Multiple Class Implementations
I'm doing a variety of work in both C# and VB.Net these days (as well as VFP).
Every now and then, I come across helpful concepts in the languages that are likely obvious to most developers but may not be known by all of them. If I find something that is of particular interest, I'll put it under these types of posts.
Today, I had a class that implemented multiple interfaces. Both of these interfaces had a similar method: SetReadOnly. So you have two choices:
1. Create a new interface that this class can implement that has the SetReadOnly interface so I only have to implement the one
2. Create two methods that implement that particular method.
Most people are used to VB.Net's handling for Select Case statements where you can put multiple conditions on one line:
Select
Case "A","B","C"
End Select
What I wasn't aware of was that you can use it for Implements as well.
When you add the "Implements xxxx", VS automatically adds the various functions that you have to implement. So in this case, I received TWO methods:
Public Function SetReadOnly() Implements Interface1.SetReadOnly
and then
Public Function SetReadOnly1() Implements Interface2.SetReadOnly
I asked around briefly if this was necessary. As it turns out, it's not. You can easily do:
Public Function SetReadOnly Implements Interface1.SetReadOnly, Interface2.SetReadonly
End Function
Handy way of reducing code.
Subscribe to:
Posts (Atom)