Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Interactive Juke Box

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
blundakat



Joined: Wed Jul 18, 2012 10:53 pm
Posts: 13

PostPosted: Thu Sep 20, 2012 10:25 am    Post subject: Interactive Juke Box Reply with quote

Hello

If you keep an eye on this forum you will remember I have been looking for advice on what programming language to learn, and you guys helpfully suggested that I should think of a project first before I decided which language to use. Well after much deliberation I have decided on a project which should keep my attention. However, I wont be assisting to any existing open source project, I will be starting from scratch.

I have an old laptop I was going to convert into a digital photo frame, which got me to thinking, If I add a touch screen and better speakers I could easily turn it into an interactive jukebox/DAB radio. Now I'm sure there must be software out there which will allow me to do that but I thought this would be the perfect opportunity to start learning a programming language as well. Now what I have in mind is to start off easy and just program a GUI front end for various pieces of software like vlc etc. Then as I get more confident with the language slowly program the back-end as well.

Now what I would like to know is your thoughts on this project, any ideas/advice you may have and what language would be best suited to this project.

Judging by your comments in my last post I'm sure your advice will be more than helpful! Thanks for all your help guys!
Back to top
View user's profile Send private message
einonm



Joined: Fri Apr 20, 2012 11:19 am
Posts: 29
Location: Cardiff, UK

PostPosted: Thu Sep 20, 2012 12:05 pm    Post subject: Reply with quote

I'd probably not start by designing a GUI first, and then trying to program what the buttons do underneath - that path would lead to a very brittle and complicated program (it's the way Windows was designed, as far as I can tell, and look how painful that can be to use).

Try instead to focus on one feature/goal and create a small program to achieve that, perhaps just launching a program (vlc?) to play one file with some options set. Then create a simple GUI with a button to launch it.

Python would be a good candidate for something like this, or second choice a bash shell script - but that can be quite idiosyncratic to use.
_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
Back to top
View user's profile Send private message
blundakat



Joined: Wed Jul 18, 2012 10:53 pm
Posts: 13

PostPosted: Thu Sep 20, 2012 12:31 pm    Post subject: Reply with quote

Would you say I would be better off doing it all from scratch in the long run or would an mp3 player etc be too complicated to code for a beginner?

Also, why python? why would you choose that language over the others?
Back to top
View user's profile Send private message
einonm



Joined: Fri Apr 20, 2012 11:19 am
Posts: 29
Location: Cardiff, UK

PostPosted: Thu Sep 20, 2012 1:01 pm    Post subject: Reply with quote

blundakat wrote:
Would you say I would be better off doing it all from scratch in the long run or would an mp3 player etc be too complicated to code for a beginner?


What do you mean by mp3 player exactly? Is it just a GUI based player, like VLC, or are you talking about writing an mp3 decoder library as well?

One golden rule is to not try and reinvent the wheel. Even VLC uses standard external libraries for encoding and decoding. One of the benefits of coding in a unix system is that it's far more like Lego, where there are lots of small programs and libraries so you build with the pre-existing blocks as far as you can.

blundakat wrote:
Also, why python? why would you choose that language over the others?


Because it's a high level language in which there are APIs ('bindings') available for a lot of common programs and libraries - e.g. VLC, Gnome, ffmpeg. That way you can have more fun producing something that's quickly usable (that really helps with the motivation!)

Personally, I'd start with c (not c++) if you've no experience of coding at all, but it's a lower level language and would take a lot longer to code something like a music player. C is also like chess - the rules are easy to learn, and worth learning, but it takes a lifetime to master.
_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." --Brian Kernighan
Back to top
View user's profile Send private message
blundakat



Joined: Wed Jul 18, 2012 10:53 pm
Posts: 13

PostPosted: Thu Sep 20, 2012 10:15 pm    Post subject: Reply with quote

ahh decisions decisions!

I think I might go with python for now, I don't want to get discouraged (I have quite a short attention span!) Smile

Would you recommend any literature to learn python?

Thanks for your help
Back to top
View user's profile Send private message
Bazza
LXF regular


Joined: Sat Mar 21, 2009 11:16 am
Posts: 1473
Location: Loughborough

PostPosted: Sat Sep 22, 2012 10:17 pm    Post subject: Reply with quote

Here is a starter...

http://docs.python.org/py3k/tutorial/
_________________
73...

Bazza, G0LCU...

Team AMIGA...
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast