Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#274199 - 13/01/2006 00:04 Palm/Windows programming? Environment and resources...
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Hi everyone,

I know several of you here write Palm software. I've got a couple of simple applications I'd like to write for my Palm. For that matter, I have a couple of little tools I'd like to write for my Windoze machine, too.

I don't know anything about how to get started with this. I've never been a professional programmer, but I have written some medium-lengthy and complex engineering analysis software over the years. This stuff was all in FORTRAN, though, and pretty much entirely batch numerical analysis stuff (non-interactive). I wrote a couple of really simple Mac programs in the early 90's, so I have a basic idea of events and event-based programs. Those were in C, of course. I've been working through the SICP book, which is scheme, and probably not at all applicable to what I want to do. That's my meager programming background.

What do I need to do to get off the ground with writing a Palm application? I'm assuming there is a standard development environment, libraries, etc. Does this cost a small fortune? Is there an open-source alternative, with good documentation? Is there a repository of palm programs I can use as a starting point? Are there any must-read books on the subject?

I have the same questions for Windows. I thought I had heard about a developer program or an educational program through Microsoft where you could get their development environment. Is this the way to go?

I realize these questions are probably all stupid and really basic, but that's where I am. I want to get a development environment set up so I can make some simple programs.

For my first Windows program, I just need a window that can display the result of a specific postgresql query, going through the postgresql ODBC driver (I have no idea how any of that works yet). Even better, it would be great to have the result of this query (a number) display in the toolbar, updating every 5 minutes or so.

I was thinking about writing a networked Pong game for my first "real" Windows application. Or, start with pong vs. computer and then add the possibility to play over the network. Can someone suggest a better starting problem?

I would like to get to the point where I could make a real application, which leads me to believe that C is the way to go. My concern is the huge learning curve associated with learning the libraries (as it was with the Mac). Is this still the situation?

Thanks for helping a newbie get started.

Best,

Jim

Top
#274200 - 13/01/2006 00:44 Re: Palm/Windows programming? Environment and resources... [Re: TigerJimmy]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Quote:
I wrote a couple of really simple Mac programs in the early 90's, so I have a basic idea of events and event-based programs. Those were in C, of course.

Most serious Palm development is done in C, there are other environments you can code in, but if you want to really understand (and be able to control) everything you need to write using the Palm APIs.

Quote:
What do I need to do to get off the ground with writing a Palm application? I'm assuming there is a standard development environment, libraries, etc.

PODS is the official development environment, based upon Eclipse. I've never used it, because I started using prc-tools when the only other alternative was Codewarrior.

Quote:
Does this cost a small fortune? Is there an open-source alternative, with good documentation?

Both PODS and prc-tools are free. prc-tools is open-source, and I think PODS is too, or at least the Eclipse parts are.

Quote:
Is there a repository of palm programs I can use as a starting point?

There are all kinds of examples in the developers area of Palmsource, the OS spin-off of Palm Inc. You should join their developer program, it's required to download simulators, something you'll need when you're writing your programs. The simulator is a Palm emulator program for the PC. You can also join Palm Inc.'s developer program and download simulator images for each type of Palm, so you can test your app on different devices without actually having them. Oh, there are also many sample apps included with PODS and the Palm OS SDK's, including full source code for most of the built-in apps for the Palm (Calendar, Address Book, Memo, etc.)

Quote:
Are there any must-read books on the subject?

The O'Reilly book on Palm Programming was the one I started out with and it was pretty good. You can get it on Amazon used for $9. So it looks to get really started programming for the Palm it will cost you $9 plus shipping.

Take a look also at the Palm OS Companion, a kind of 'book' about programming for the Palm by Palmsource. I refer to it all the time, and they have links to the API reference in there as well as sections on communications programming (networking, bluetooth, IrDA). Each section has examples and code snippets you can check out.

Quote:
I have the same questions for Windows.

Can't help you there.
_________________________
Mark Cushman

Top
#274201 - 13/01/2006 06:07 Re: Palm/Windows programming? Environment and resources... [Re: cushman]
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Thank you, Mark. I ordered that book and started looking through the docs you linked to.

Is it true that there is a huge amount of "plumbing" type stuff that needs to be recreated for every program? It seemed to me like the event handling and window/menu/screen management stuff turned out to be a large percentage of the code of a simple program! Does this foundational stuff need to be recreated for every application?

Thanks again,

Jim

Top
#274202 - 13/01/2006 06:13 Re: Palm/Windows programming? Environment and resources... [Re: TigerJimmy]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
On the Windows side, (assuming you don't mind it being locked down to Windows), Visual Studio is going to be the way to go. Visual Studio Express is free for a year and programs you make with it can be used after that. More and more the big companies are giving away the dev tools to attract hobbyists, as they are usually the ones making the interesting small apps these days. I didn't truly understand this until my own program that is getting more and more popular among widescreen gamers.

Top
#274203 - 13/01/2006 13:57 Re: Palm/Windows programming? Environment and resources... [Re: TigerJimmy]
cushman
veteran

Registered: 21/01/2002
Posts: 1380
Loc: Erie, CO
Quote:
Is it true that there is a huge amount of "plumbing" type stuff that needs to be recreated for every program? It seemed to me like the event handling and window/menu/screen management stuff turned out to be a large percentage of the code of a simple program! Does this foundational stuff need to be recreated for every application?

There is a common framework for apps, sure. You can't just write printf("Hello World") in a GUI environment without having a window, form and text area to print it to. It isn't too much code, though. Once you get started you'll see why it is all needed, too.
_________________________
Mark Cushman

Top
#274204 - 13/01/2006 20:29 Re: Palm/Windows programming? Environment and resources... [Re: drakino]
TigerJimmy
old hand

Registered: 15/02/2002
Posts: 1049
Thanks, I'll download this and take a look at it.

Do you know of a place where I can get source for some simple programs? In the past, I've learned how to write software by modifying existing programs.

Finally, what is the wave of the future? Since I'm just starting out, should I use Visual C#, or use Visual C++?

BTW, I'm a widescreen gamer... What's your program?

Thanks again,

Jim

Top
#274205 - 13/01/2006 21:25 Re: Palm/Windows programming? Environment and resources... [Re: TigerJimmy]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
I'd say learn C# if you can. It has some very nice things in it that the C++ in Visual Studio lacks. Since your starting fresh, might as well start with the one that makes your life easier.

Code wise, not sure of any specific open source C# programs to poke at, but the MSDN documentation usually has enough example code to get me through most issues.

My program is Game Resolution Switcher. Made it more for myself to solve a problem of gaming on one system with multiple resolutions, but it's popular with widescreen gamers since it also sets games to widescreen when they may not expose such resolutions in game. I've gotten some feedback from people who also game on HTPCs, since it makes it easier to set custom resolutions some screens use. I'm planning on expanding it a lot for the 0.7 milestone for letting people set different resolutions. Need to get 0.6 done first though.

Top
#274206 - 13/01/2006 21:35 Re: Palm/Windows programming? Environment and resources... [Re: drakino]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Interestingly, I just tried GRS to see if it would help me solve a problem I've been having. It didn't, I'm still getting the same problem, but maybe you know how to fix this...

(Sorry for dragging this thread off topic...)

Back in the days when I was using Windows 2000, before I switched my main PC over to Windows XP, I was able to run Source Engine games (CS:S, HL2) at 1440x1080. This is my current Windows desktop resolution. It's the same number of scan lines as HDTV, but it's the 4:3 width. (1920x1080 would be 16:9 hdtv).

Now, under XP, when I try to make HL2 or CS:S run at 1440x1080, it pops back down to 640x480. Yet my Windows desktop does that rez just fine. And I'm using the same video card as I was using back in Windows 2000 days, so it's not the card at issue.

These games will run at a bunch of different high resolutions, of course, like 1280x1024, just fine. It's something about that particular rez that either Source or DirectX doesn't like.

I also seem to recall vaguely that this problem happens on other directX games, too, not just Souce stuff.

Any ideas, Tom?
_________________________
Tony Fabris

Top
#274207 - 14/01/2006 07:14 Re: Palm/Windows programming? Environment and resources... [Re: tfabris]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Quote:
Now, under XP, when I try to make HL2 or CS:S run at 1440x1080, it pops back down to 640x480.


Where's the setting for display size in HL2? On my rig, it appears to work perfectly in widescreen -- Dell 2005FPW at 1680x1050, but if I can confirm that properly, that'll be a good data point for you.
_________________________
-- roger

Top
#274208 - 14/01/2006 07:19 Re: Palm/Windows programming? Environment and resources... [Re: TigerJimmy]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Quote:
Do you know of a place where I can get source for some simple programs?


If you're looking at ASP.NET, there's a bunch of starter kits on http://www.asp.net/

Visual C# Express includes a couple of other starter kits for Windows programming. Other than that a quick Google search for "C# sample" turned up about a million and one sample applications.

If you want something a bit more complicated, the source code for RSS Bandit is C#, but it's not for the beginner.
_________________________
-- roger

Top
#274209 - 14/01/2006 13:51 Re: Palm/Windows programming? Environment and resources... [Re: drakino]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3996
Loc: Manchester UK
Is visual studio express likely to be any good for writing PocketPC apps? I'm keen to get cracking but haven't written anything since Embedded Visual C++.
_________________________
Cheers,

Andy M

Top
#274210 - 14/01/2006 15:37 Re: Palm/Windows programming? Environment and resources... [Re: andym]
Roger
carpal tunnel

Registered: 18/01/2000
Posts: 5683
Loc: London, UK
Quote:
Is visual studio express likely to be any good for writing PocketPC apps?


AFAICT, it only generates full-blown Windows apps. You'd probably need the full edition of Visual Studio 2005 for that.

I could be wrong, though -- I only had a quick look.
_________________________
-- roger

Top
#274211 - 14/01/2006 16:12 Re: Palm/Windows programming? Environment and resources... [Re: Roger]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Quote:
Where's the setting for display size in HL2?


Command line:
C:\Games\Steam\Steam.exe -applaunch 220 -width 1440 height 1080 -full

Internal (I assume this is what Tom's program changes when you run it):
[HKEY_CURRENT_USER\Software\Valve\Source\hl2\Settings]
"ScreenWidth"=dword:00000500
"ScreenHeight"=dword:000003c0
"ScreenWindowed"=dword:00000000

In-game:

Note that it doesn't even GIVE ME an option for 1440x1080, yet my windows desktop is running at that resolution.


Attachments
274432-tmp.jpg (56 downloads)

_________________________
Tony Fabris

Top
#274212 - 17/01/2006 18:48 Re: Palm/Windows programming? Environment and resources... [Re: TigerJimmy]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
Quote:
I've been working through the SICP book, which is scheme, and probably not at all applicable to what I want to do. That's my meager programming background.

If you're doing that, I'd encourage you to follow along to the lecture from Brian Harvey's Computer Science 61a class at UC Berkeley. He's teaching it this semester, and they generally have the lectures available for streaming for the rest of the semester after the class. It was my first college level CS class, and I still consider it the best one I took. The web page linked isn't updated for this semester yet, but it should be soon.

Matthew

Top
#274213 - 20/04/2006 08:40 Re: Palm/Windows programming? Environment and resources... [Re: tfabris]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
Digging up an old thread here, to post the solution for posterity's sake:

Quote:
Now, under XP, when I try to make HL2 or CS:S run at 1440x1080, it pops back down to 640x480.


The solution was to make Yet Another Edit to my MONITOR.INF file. Turns out that XP was using a different monitor in MONITOR.INF than I thought it was, and I had only edited the top rez of the wrong monitor inside that INF file.

Once I edited the top rez of the monitor up to 1920 and re-installed the monitor.inf file, it all worked correctly, and now all my games give me the 1440x1080 and 1920x1080 resolution options.
_________________________
Tony Fabris

Top