Fog Creek Software
Discussion Board




Language for new project

I am starting a new project.  It consists of 1 form with a tab control.  There will be 4 or 5 tabs and the user will have all of the functionality from this control.  I need to use specific window classes of certain controls, which makes straight C++ an attractive alternative (no MFC).  I could create my own classes on top of the window classes and simply store the interface coordinates in a database.  Has anyone done this?  Also would I be better off using VB and simply creating the specific window classes though API calls?

Gyroscope
Monday, July 14, 2003

Does it have to talk to modems?

Philo

Philo
Monday, July 14, 2003

Perhaps if you described the application a little bit, it would help out.  For example, what window classes do you need to derive from and why?

Dave
Monday, July 14, 2003

Starting a new project and learning a new language at the same time is usually a mistake.

Matthew Lock
Monday, July 14, 2003

I respectfully disagree.

Almost every language I have learned has been in the context of a new project. That's the best and fastest way to learn a new language. The only exceptions so far are Pascal and  C++. But Basic, Assembly, C, Java, Lingo, Perl, Javascript, HTML -- all this stuff I learned only because I wanted to do something with it and I learned by doing, by working on a project.

X. J. Scott
Tuesday, July 15, 2003

Matthew - how do *you* learn new languages?

Philo

Philo
Tuesday, July 15, 2003

What I mean is that combining a deadline with learning a new language is too much stress.  How can you estimate how long something will take in a new language when you don't yet know it?

Matthew Lock
Tuesday, July 15, 2003

"Assembly, C, Java, Lingo, Perl, Javascript, HTML -- all this stuff I learned only because I wanted to do something with it and I learned by doing, by working on a project. "

Sounds to me like you must have worked for some very understanding bosses/employers.

Did anybody with extensive programming experience in the programming languages you mentioned that you learned "on the fly" check your completed work?

Did you simply produce some application in [insert one of the above programming languages here] by yourself and then go back to developing applications using a programming language that you had more knowledge of and prior experience with?

The reason that I ask these questions is that I have never worked for a manager that would let me use an unfamiliar programming language to build a non-trivial software application where my knowledge of how to build such an application was nil.

A curious programmer wants to know
Tuesday, July 15, 2003

On the one hand I agree that the uncertainties of learning a new language are problematic in the context of a new project with a tight schedule. But OTOH an important aspect of the software development profession, that is often overlooked, is the need to constantly learn new techniques and technologies. This is not wasted time, it's part of the job description. For any project, and new projects in particular, time for technical investigation should be allotted as a standard part of development cycle.

Dan Shappir
Tuesday, July 15, 2003

Approaching a new language on the basis that it might be useful in some future time is a little like learning Mandarin because you think it might be cool one day.

You never learn it.

In many ways computer languages are not separate languages but dialects of only a few core languages.  Most of the languages used are of the algol family, they read left to right, they process in much the same ways.  Different dialects have slightly different linguistic tricks which make some solutions easier to describe, but they can all be used to describe the same set of solutions.

So, I would say that only by doing something serious in a language can you ever manage to understand and use that language properly.

Simon Lucy
Tuesday, July 15, 2003

Have you ever tried to maintain code written by someone who learned the language while building?

Matthew Lock
Tuesday, July 15, 2003

There seems to be a huge misunderstanding here.
  1. I am not learning a new language and didn't think or even mean to imply that I am.
  2. The classes I am talking about are window classes.  Classes of windows.  For example, if I want to make a button, which is a window in and of itself, I pass the "Button" string which represents the Button Window Class to the CreateWindowEx function, which in turn creates the window.  I need to know if anyone has built their own object oriented classes to encapsulate these built in window types or classes.  I do not want to use MFC because it does not use the latest controls in it's library.  You can create the latest and greatest control by using the procedure outlined above and loading the proper library.
  3. I'm also wondering if anyone stores the user interface coordinates in a database and if so did you make a tool for modification or how did you manage the meta data?
  4. I can't tell you the exact nature of the project, but it does invovle a DB backend and some heavy graphics and font manipulation.

Sorry for the confusion.

Gyroscope
Tuesday, July 15, 2003

For sure, you can practice ping pong, but only when you start playing against people do you really start to learn.

Only when you have a project and you MUST SOLVE problems and implement solutions do you really start to learn the development platform. Just playing around with a new language in your spare time normally does not force you to cut your teeth into real solutions.

I guess the real question is how complex, and how large the task at hand is.

This is a bit of a chicken and egg problem. Only after working on a large an complex project can you really learn the weakness in the particular platform However, if you have not worked on that platform, then you don’t have the experience and skills to be on the project! You have to kind of make some mistakes to learn what does not work well.

The problem is that making mistakes can hurt the project. So, the solution is to prevent making a mess.

About the best solution to this problem is make sure you have access to some people that know the platform very well. Those experienced people should be involved in the design, and can warn you of cliffs and pitfalls to avoid. That experienced person should be on the team.

The general syntax of a programming language is NOT the problem, but of what designs work, and what designs don’t work for the given platform.

And, for reference, I will produce that often quoted and posted reference here by me from

Yourdon’s book “Decline & Fall of the American Programmer”


Stage 1 Innocent (never heard of the product)

Stage 2 Aware (Has read an article about X)

Stage 3 Apprentice (has attended a three-day seminar)

Stage 4 Practitioner (ready to use X on a real project)

Stage 5 Journeyman (uses X naturally and automatically in his job)

Stage 6 Master (has internalized X, knows when to break the rules)

Stage 7 Expert (writes books, gives lectures, looks for ways to extend x)

I just can’t see running a project with stage 3’s. However, you got start somewhere...or no software will ever be made, and you will never learn anything new!

Albert D. Kallal
Edmonton, Alberta Canada
kallal@msn.com
http://www.attcanada.net/~kallal.msn

Albert D. Kallal
Tuesday, July 15, 2003

Is anyone listening to me?  Or do you people just make random posts about whatever topic you feel is interesting.  I always thought this forum was one of the better ones.  Guess I'm mistaken.

Gyroscope
Tuesday, July 15, 2003

Tell him to turn it down

Cracker
Tuesday, July 15, 2003

Gyro, if you don't want MFC you might try the ATL instead. A google for ATL+subclass turns up http://www.codeproject.com/wtl/subclassededitcontrol.asp for example. UI coordinates (for example the place where the user chose to place some Window the last time they saw it) is more usually stored in the registry under HKEY_CURRENT_USER than in a 'database'.

Christopher Wells
Tuesday, July 15, 2003

I was originally put off by tangents people go off on, but now I think they're the best part of this site.

If I want to know how to write embedded Perl, I'll go to that newsgroup, but for general discussion, I would argue this site is one of the best.

Blather on! :)

Lee
Tuesday, July 15, 2003

"Is anyone listening to me?" -- Evrybody's trying very hard to answer a pretty vague (or even misleading re. the title) question. Perhaps you should have asked something like:
    Title: "Alternative to MFC"
    Message: "Is there a more up-to-date windowing library alternative to MFC. MFC seems crufty, out of date and not particularly object-oriented. I'm an experienced C++ developer."

Duncan Smart
Tuesday, July 15, 2003

Hi Curious!

> Sounds to me like you must have worked for some very understanding bosses/employers.

I guess so!

> Did anybody with extensive programming experience in the programming languages you mentioned that you learned "on the fly" check your completed work?

No.

>Did you simply produce some application in [insert one of the above programming languages here] by yourself

Yes.

> and then go back to developing applications using a programming language that you had more knowledge of and prior experience with?

Not exactly. As I pick up new languages, I continue to use them, build libraries, refactor old code, and generally increase my investment for most of the languages I mentioned, excepting Pascal and Lingo which I just don't use anymore. Assembly I haven't used in some time but I'd feel confident doing just about anything needed since I have written drivers, embedded operating systems and so forth for several architectures... so I'd feel OK writing embedded code all in assembly, or dropping down to assembly to make use of mutex primitives, but I would no longer try to optimize inner loop on a desktop processor since I feel that talent is now obsolete with the sorts of things that modern compilers do.

> The reason that I ask these questions is that I have never worked for a manager that would let me use an unfamiliar programming language to build a non-trivial software application where my knowledge of how to build such an application was nil.

Well, my knowledge of how to build an application is not nil! That's different from knowledge of a language.

Here's how it has worked for me, by way of typical example:

1.) Embedded product is needed running on X processor. So I grab the chip reference for the chip and write the code. Different assembly languages are not that different so learning a new one is no big deal... I feel real confident that I can pick up the nuances of whatever processor in a short period of time, be writing code within a day, and feel I have mastered the chip by the end of a medium sized project.

2.) An engine to run a interactive web site is needed. I know C and can produce a cgi C program to do what is needed in 2-3 months. But I am acquainted with folks who are doing this sort of work in Perl and I have seen the results of their work. I know nothing about Perl though at all. I pick up a Perl reference and look through it, it looks promising! Download some example Perl scripts to see the common idioms used in Perl and work through them line by line to see all that is happening, marking up the printout with annotations as I go. This process takes about 5 days, during which I write some small test scripts and modifications of the example ones. Then, on week 2, start in on the main application, writing it from scratch. 2 weeks later I am finished with something I am certain would have taken at least 2 months in C and would not have been as safe. At this time consider myself a novice Perl programmer. Several months go by. Some new features are needed. I dig up the old code and look at it, it's a bit of a mess. So I refactor it into better comprehensibility, add some documentation, pick up a few new tricks, and generalize a couple of modules that enable me to churn out a couple of new applications of interest at the same time which prove to be useful as well. By this time it seems clear that the decision to use Perl was a good one.

3.) New job working on the brand new Windows 95, which I have never even seen before. Several utilities, applications, and thee drivers are needed. I look in the development tools for some example code and find some example applications, which I print out and read, annotating, and working with a paper API reference to look stuff up. Start making modifications and experiements on the very first day. By the third day, I am writing the code for one of the applications needed. By the end of the week, I have my first Windows application, which continues to be modified and developed over the next year. I look at the driver skeletons provided by MS and start writing drivers. Some things are not obvious. Some things need to try a bunch of different things to see what works. No one to ask since Windows 95 just came out and no one I know has any answers. So I plod on. In this case, there's a couple other guys in the same boat at this office and we talk about our findings with each other. At one point a customer's development team is visiting and they ask what seminars I went to to learn this stuff.  I tell them I just looked at the examples that came with the developer tools.

So that's how it's worked for me. For me, it's definitely faster to learn this way than studying some book, although having a printed API reference is something I really value, even thouse things are getting hard to find. But the key is having some project at hand and a deadline, which provides the impetus to concentrate and move forward and provides a fodder of continuous puzzles and challenges.

X. J. Scott
Tuesday, July 15, 2003

Gyroscope,

We hear you. My personal opinion is that with such a small project, I'd use plain old C and Win32.

X. J. Scott
Tuesday, July 15, 2003

*  Recent Topics

*  Fog Creek Home