What languages to learn

Pages: 12
Hi,

I`m pretty new to programming and I want to write an application for myself
.
The program should run on several touch screens and computers around the house. The application needs to contain several things like:
- A calendar
- A music player
- Displaying input from a weather station
- A 3d model of the house to, for example:
o Turn on the lights
o Open the doors of the garage
- Et cetera

Furthermore the application should run on accounts, so the music library and other stuff are dependent of the user. The application should be full screen too.

The thing is I don’t know which programming language(s) I need to learn. I started with the c++ tutorial on this site and I am now reading Charles Petzold’s Programming Windows, 4th edition.

Right now I am not really interested in stuff about the input in my computer from for example the weather station or the light switches, I’ll figure that out when I can properly write an application.

At this moment I just want to know what language(s) I need to write such a program. The windows API programming looks to be pretty effective for the job, but for me it’s much about the graphics too and I am wondering if I can adjust scroll bars, title bars et cetera to my own style?

So is it even possible to write such a program, how much time it is going to take for me to be able to write an application like this and what languages do I need to learn?

Thanks in advance,


Tim

This is an extremely ambitious first project. Obviously, you will need to learn C++ and Win32. As for graphics, you will need to learn DirectX or OpenGL. It is of course Possible, but it will take you probably a six months to a year to learn all of those things I stated above "inside and out".

I really think you should start out simple. Trying to create an application like this before even making a "Hello World" console application is going to be near impossible.
Thanks for your clear answer.

This is not going to be my first project but this is what I want to learn programming for. So I have been writing the "Hello world" stuff, but I was just wondering if I was learning the right things for the application I have in mind.
Other possibilities:

C++ is a good idea, but here are a few libraries that might save you lots of time.

http://www.sfml-dev.org/
http://irrlicht.sourceforge.net/
http://qt.nokia.com/products

-Albatross
Last edited on
Smart homes are fun. I would also like to applaud your vision, but the Windows platform might not be the best choice for your project to keep things legal. The license for each OS is distributed on a per station basis, even the much pirated corporate license legally cannot be installed on more machines then it was purchased for. Based on your description I can tell that you would be at at least four licenses right off the bat, more because you wish to centralize at a server, this is what I assumed because you want access to be granted by accounts. This costs money along with the hardware, and I don't know about your personal financial situation but I would get drawn and quartered if my girlfriend found out I dropped almost $800 on some goofy project and don't even have the hardware yet. An Open source OS would be the best for development purposes as this would allow you near infinate expansion, you could set up Virtual Machines in these environments so that you do not need to purchase additional hardware.

As for your questions The accounts part is taken care of on every OS that supports networking and multipule users. C++ can do all of this. Yes the Windows API allows you to have some freedom when it comes to adjusting thigs like the scrool bars title bars and such. As for time either Vexer is a speed freak or the most dedicated person in the world, I would expect at least 2 yrs before you start to see what would be your final project.
Ok, thanks for thinking along. I think you've got the right impression of what I have in mind. At the end I want to have about ten built in touch screens around the house and about five desktop computers.

At the moment I'm afraid I have a lack of knowledge about networks so I hope you can give me some advice/information. Does every touch screen need a processor or can a server take care of that? And does every computer need the same version of windows?

I guess if I write an application like this based on the windows API it can (probably with some adjustments) run on different versions of windows at the same time?


If it turns out to expensive to base my app on windows, what (free) OS would you advice me to base my program on. Or are there OS-independent languages I can create an application like this with?

I hope I don't annoy you yet,


Tim



Last edited on
Personally, I would consider Java for this application. C++ is not the answer to everything.
Answers for your questions.

- Can you give me advice\information on networks? Personally yes I can, I cannot speak for the other contributors to this site.

- Does every touch screen need a processor? No, every touch screen DOES need processor time. We can get into Virtual Machines later.

- Does every computer need the same version of Windows? No, it makes things easier if they all do and you really can't find older versions of Windows to buy but they do not NEED to be the same.

- Can a program written for the Windows API run on differant versions of Windows at the same time? Yes, if you are careful in how you write it this is very possible.

- What free OS would you advise me to base my program on? Linux of course, probably Ubuntu to be specific. This is because it is widley used, has a comfortable learning curve and is well documented. I'm a Windows guy as a whole but for a dedicated machine Linux should do fine.
Ok, so imagine I would set up a network with the 10 built in touch screens and 5 desktop computers, what hardware and software would I need (Do I need a windows version for each touch screen?)? And how would it work with data and stuff related to the accounts and such(where would it be saved)?

What are the main differences between programming for windows and programming for Linux. And if I would decide to go for Linux, I guess I need to install in on my computer or is it possible to run Linux on that Virtual Machine so I can experiment with it and keep using windows 7 for the other computer stuff (or do I say very strange things now?)

At last, what's you opinion on the idea of creating this application in Java?
I'm totally out of my element with Java, if you can spark moorecm's interest in this project that would be all you guys. I could help with it if you decide on using C\C++. Or if you want to split the work load and learn two languages but I would advise against this because I know I wouldn't be able to do it.

Start small, what ever we help you build will be module so you won't have to worry about planning for expansion later. We should make the first interface with a mouse+keyboard then move on to the touch screen and network everything from there. Yes you would need a Windows License for each instance of the Windows GUI (the desktop) running in memory this is in the EULA that nobody reads.

The considerations for Hardware won't be an issue yet. We have no idea how resource intensive this project is going to be so we'll save those thoughts for later.

The differances in writting between Linux and Windows are the API's that's pretty much it. You could install Linux on a VM within Windows, I acctually have the Windows 7 Resource kit sitting next to me.
Personally, I would consider Java for this application. C++ is not the answer to everything.
Wouldn't turning on/off electrical appliances and what-not be impossible in Java? I mean, of course it would be impossible in C++, but at least in C++ you can load DLLs that could be made in Assembly, or maybe use some compiler that supports inline assembly.
I'll go for C++ then, but I'm not sure yet concerning the OS. If I understand well I'd need about 15 version of Windows for the final thing? Though I have to thinks small, it's an important choice I make now for the OS right? Or would it be an idea to start with windows and when it's time to expand go for Linux?

You mention you could help me with my project, so what can I expect? I'm really a beginner with a lot of ideas but without much idea how to make them real.

closed account (z05DSL3A)
...but I'm not sure yet concerning the OS. If I understand well I'd need about 15 version of Windows for the final thing?
You may find that you end up with a whole load of different OSs to program for.

I started planning a project like this a while back (unfortunately at the time home automation kit in the UK was very expensive, so it got shelved). Your starting point is to make a good list of what you want to do with it, as it will effect other decisions you have to make. For example my plan required PVR functionality so I needed some TV capture boards, at the time the boards suitable for my requirements only had Windows drivers, so the Server was going to be Windows based. The panel PCs that I wanted ran Linux and my PDA ran Sybian.

So, basically what I am saying is don't worry to much about what the client devices are going to be, the heart of you system with be the server(s). That is the important thing to get correct to start with. If I was going to restart the project now, I would look towards a Linux server (probably Debian).
TimGalant wrote:
At last, what's you opinion on the idea of creating this application in Java?


I was in a pinch when I posted before, let me go through my first impressions and throw a few random thoughts out there.

First, the project that you are considering in C++ is going to be very large for a single developer--particularly one with limited similar experience. That does not make it impossible but if you're anything like me the project will never reach completion. Not only will this project require an understanding of C++ syntax but it will also involve external libraries and their interfaces, distributed architecture, network communication, a GUI (probably platform-independent from the above considerations of OS), and a number of other less-explicitly-mentioned skills (engineering process, debugging, a build strategy/environment, deployment, etc.).

Now, I'm certainly not familiar with all of the technologies available but I am familiar with a few here and there. Java, happens to be well-known for both platform-independence and a comprehensive set of standard class libraries. The latter is a strong point for this project, in my opinion. The communications, GUI, etc. are already there waiting. In C++, you can get caught in a real struggle trying to integrate various libraries.

Now, I'm no Java guru or anything but these sound like pretty strong selling points for this application. Adversely, Java is often criticized for being slow. This application seems to be mostly network communication and a few GUIs--both of which do not require top-notch performance.

NGen wrote:
Wouldn't turning on/off electrical appliances and what-not be impossible in Java? I mean, of course it would be impossible in C++, but at least in C++ you can load DLLs that could be made in Assembly, or maybe use some compiler that supports inline assembly.


I don't think Java is a good option (if even possible) for device drivers or embedded applications, if that's what you mean. In my experience most external devices already have some kind of protocol/interface available (via some port, IP address, TCP/IP, etc.). Java should be able to communicate with these types of things. Distributed systems communicate with messages and the language/application that sent the message should not even be detectable at the other end. In other words, you could still write a C++ process to do something and communicate to it from a Java process.


In summary, I think this kind of application could be completed much, much sooner in Java rather than C++. Additionally, there are also other options that should be considered--I just brought up Java because I'm familiar with it. Maybe someone will chime in about C#, Python, etc.. Even still, it's a big commitment and I think a nice reality-check might be in order (no offense, OP).
Last edited on
I would help with this to the extent that my attention span will let me. I can tell you that a lot of us including myself have thought about something like this and would have some experiance in writing this type of software.

I also have a degree in Electronic Engineering so I can help on that front to.

If your asking for people to join a project then there are a few things I would need to know about it first.
Ok, I’m getting a little confused right now, so I indeed wrote down what I actually want:

I want to have about 5 desktop computers around the house and about 10 built in touch screen on which an application will run that can be logged in to by every member of the house (guests don’t have to log in, but have fewer options).

The program has to be full screen with four sub screens, each to run one of the “applications” below. De sub screens can be combined to create bigger areas for the applications. Everything has to be the same style which will be black and light grey, so scroll bars and title bars are not windows style or whatever.

The applications are (till now):
-A music player which will play from a library that’s dependent of the user (account). A radio player.
-A climate control area, in which the results from a weather station are being showed and a 3d model of the house to control the temperature per room (via floor heating).
-A calendar for every member of the house and options to expand the calendar with appointments and stuff from other members (so a combined calendar)(appointments can be private or public).
-A sort of “to do list”, again per member and combined.
-Contacts (per member & combined)
-A 3d model of the house to turn on the lights and to change the colors of the lights (LED lightning).
-An intercom system.
-Open and close the garage doors.
-An alarm system

Obviously it should be possible that people use the application at the same time for other or same things and people can be logged into more than one computer or/and touchscreen.
Ok that’s what I want.


It may be helpful to tell something about my personal situation to give you an impression of how (un)real this can become:
I’m nineteen years old and I’m studying to become an accountant (so I’m probably gonna have a good salary (which I’m saying because of the “financial discussion” we had and for the reality level of my plans)). When I’m about 30 yo I want to build my own (smart) house which I designed by myself. So in this house the application I described above should run.

You probably think this will be all very unrealistic and you might be quite right, but without dreams…


So I hope with this information you could help me get a starting point because I think I really lost the overview.
- Your first two paragraphs can be done with settings in any of the OS's that we have listed they have little to do with writing the program.

- Library handled by the OS but managing the files can be built into the program. Radio needs a service provider, I can do a little Ham radio I've even put up a tower, but this is truely out of scope for this project.

- Climate control model is the first real thing that you have listed for your program, unfortunatly IDK enough about meteorology to help with processing the data. I can help with the visuals though.

- This calander thing is harder then it sounds but there are enough samples out there to help us if needed.

- To do list = calander. What's the differance?

- Contacts list easy.

- 3d model of the house to turn lights on and off. Doable but you will need an electrician. We can prototype with LEDs and plan on using solenoid switches for final production.

- Intercom as in IM? or actual VOIP?

- Garage doors. Don't do this, big security risk.

- An alarm system. I recomend a 18 gauge. Their small enough not to punch through into your wall but it's still powerful and intimidating. Otherwise security systems require a huge infrastructure including off site call centers, security personel and a line to the police. Booby traps are illegal in most states they are seen as reckless endangerment at the very least.

- Are you adverse to tieing in already avalible free and public software?
To be honest, Linux is a free OS and could help you solve almost all of those problems. It could handle the authentication, storing/sharing of data, it comes with a music player, and I believe there are applications available online to monitor home temperatures and security--although these may not be free. There doesn't appear to be any software left to write to reach those goals, unless you want to somehow couple the features together tighter. It would be a large undertaking for very little gain in that case.

There are plenty of touch screen home controls available already these days. Buying one and/or having it professionally installed is the way to go if you want to do a class job.

You have to consider the buy vs. make argument--that is, you need something do you make it or buy it? If quality is your top priority the answer is to buy. Buying results in a "higher version". Those who have built one or something similar before have more resources and can turn out a better product--and often times for less cost than creating a startup.
Last edited on
@ moorecm: I think the goal is its own reward, kind of one of those things where you have guests over and pretend that its no big deal that you built your own smart home. Bringing it all together would be worth it I think, as long as you don't let it consume you.

@ OP: I can't speak for everyone here but If I am to help in a capacity beyond what this forum provides then I would want it produced in the spirit of an open source project. If we do this then I would be interested in signing up.
Ok, let's say we start off with this project, I thinks it's absolutely great you want to help me, but what would you suggest me to do, since I don't know very much yet. Actually almost nothing compared to you (writing something like a contact list that can be displayed anytime a program is started is pretty much impossible for me at the moment). So should I continue reading the book of Charles Petzold's? Or a linux beginner tut? Set up a virtual machine to run linux?

There doesn't appear to be any software left to write to reach those goals, unless you want to somehow couple the features together tighter. It would be a large undertaking for very little gain in that case.
I think the goal is its own reward, kind of one of those things where you have guests over and pretend that its no big deal that you built your own smart home. Bringing it all together would be worth it I think, as long as you don't let it consume you.


It's for that of course and I thinks it would be fun programming it and let it all be the same style.

I can't speak for everyone here but If I am to help in a capacity beyond what this forum provides then I would want it produced in the spirit of an open source project. If we do this then I would be interested in signing up.

That wouldn't be a problem for me.

Are you adverse to tieing in already avalible free and public software?

No

(The garage doors can be skipped)
Pages: 12