Unofficial Programming Thread IV

Post » Tue Jun 18, 2013 11:08 am


I bought http://www.amazon.co.uk/gp/product/0321635361/ a while back: got sidetracked before I could really give it a try and never got back to it, but it seemed pretty well written from what I remember.
User avatar
Blaine
 
Posts: 3456
Joined: Wed May 16, 2007 4:24 pm

Post » Tue Jun 18, 2013 6:53 am

For UI development I used to work with Trolltech's Qt and liked it a lot for its easy concept (signals and slots). Since then I've moved to Windows development and MFC, and Nokia bought Trolltech. Nokia then switched to Windows and technically ran down Qt, and I'm hating every bit of MFC. Can't win every time, well.

Anyways, I've never associated Python with any kind of UI development, but there is an interface to Qt it seems. C# however, has its own UI libraries (other than MFC) and I don't see much of a point to make dependencies to Python just for that.
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Tue Jun 18, 2013 5:35 am

When I do C# even though I am not great at it I tend to use WPF. Some stuff is easier, some is harder, but its more flexible. I know Python isn't meant nessesarily for GUI development but for a couple projects I need one, and another if I could figure out how to use it for web development I would go that route.
User avatar
Amanda Furtado
 
Posts: 3454
Joined: Fri Dec 15, 2006 4:22 pm

Post » Tue Jun 18, 2013 5:03 am

Well, I guess even though the basics of any particular language are simple, but the language still requires libraries for anything useful to be implemented with. In the end you depend on UI libraries, some math stuff and maybe some network and database communication libs too. There are plenty of choices with varying levels of documentation. What I'm bothered with is that some of these engineers like to implement obscure stuff just so that they can sell consultation and training packages for the stuff they just released. Not to mention the price of the development tools, and then the certification for developers. /tongue.png' class='bbc_emoticon' alt=':P' /> Java and .Net have a never-ending cycle of new releases and then there's Oracle, Direct X etc.
User avatar
Maria Leon
 
Posts: 3413
Joined: Tue Aug 14, 2007 12:39 am

Post » Tue Jun 18, 2013 2:29 pm

C# is rather easy on client and server based communication thanks to its built-in support for XML. As long as you don't need to interface with servers that have been implemented with Java and some such.. The basic idea is that you can import a WSDL or some definition, fill in the blanks in the message, and call send. I'm not too familiar with the server side though. UI side probably has some hooks to link the data into the components.

Still there are a few routes and there's a barrier between .Net 3.5 and 4.0. They implemented some new stuff into 4.0 and later came up with compatible updates for 3.5.
User avatar
Luis Longoria
 
Posts: 3323
Joined: Fri Sep 07, 2007 1:21 am

Post » Tue Jun 18, 2013 6:13 am

I think after consideration I will go with C# and WPF for this application that I am about to start and then try and work more with Python in the future if possible. It just seems like it will be easiest considering it is only a Windows application anyways.
User avatar
jeremey wisor
 
Posts: 3458
Joined: Mon Oct 22, 2007 5:30 pm

Post » Tue Jun 18, 2013 4:30 pm

Courtesy of today's fortune randomness:


/laugh.png' class='bbc_emoticon' alt=':laugh:' />
User avatar
Matt Gammond
 
Posts: 3410
Joined: Mon Jul 02, 2007 2:38 pm

Post » Tue Jun 18, 2013 10:49 am

So what do you guys here think of http://www.dartlang.org/?

I personally think that JavaScript svcks in a lot of ways and needs to be thrown out, but sadly that's not going to happen. /frown.gif' class='bbc_emoticon' alt=':(' />
User avatar
Cameron Garrod
 
Posts: 3427
Joined: Sat Jun 30, 2007 7:46 am

Post » Tue Jun 18, 2013 12:49 am

Well, unless ModifiedStat and ModifyingAttribute are type equivalent (one is an ancestor of the other) your problem is where you're trying to add a ModifyingAttribute object to a generic list of ModifiedStat. Even if they are type equivalent then you'll probably need to explicitly cast from one to the other.

Edit:
Ah, just noticed where ModifyingAttribute is defined. /tongue.png' class='bbc_emoticon' alt=':P' /> Yeah, that's just a type conversion problem. You can't put an object of one type into a generic list of items of another non-equivalent type. Generics can cause certain issues with polymorphism as well depending on which direction the conversion is happening in.
User avatar
Maya Maya
 
Posts: 3511
Joined: Wed Jul 05, 2006 7:35 pm

Post » Tue Jun 18, 2013 7:34 am

Isn't Qt getting sold or discontinued by Nokia or did I misunderstand one of the articles I read lately?
User avatar
Doniesha World
 
Posts: 3437
Joined: Sun Jan 07, 2007 5:12 pm

Post » Tue Jun 18, 2013 1:27 am

Thank ye kindly. Will look into this. /smile.png' class='bbc_emoticon' alt=':)' />
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Tue Jun 18, 2013 9:37 am

You might appreciate http://lolcode.com/:
Spoiler

HAICAN HAS STDIO?VISIBLE "HAI WORLD!"KTHXBYE


Or https://en.wikipedia.org/wiki/Chef_%28programming_language%29:
Spoiler

Hello World Souffle.Ingredients.72 g haricot beans101 eggs108 g lard111 cups oil32 zucchinis119 ml water114 g red salmon100 g dijon mustard33 potatoesMethod.Put potatoes into the mixing bowl.Put dijon mustard into the mixing bowl.Put lard into the mixing bowl.Put red salmon into the mixing bowl.Put oil into the mixing bowl.Put water into the mixing bowl.Put zucchinis into the mixing bowl.Put oil into the mixing bowl.Put lard into the mixing bowl.Put lard into the mixing bowl.Put eggs into the mixing bowl.Put haricot beans into the mixing bowl.Liquefy contents of the mixing bowl.Pour contents of the mixing bowl into the baking dish.Serves 1.

These actually exist...
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Tue Jun 18, 2013 4:17 pm

Does anyone know of any easy to follow tutorials for PyQt? I think its the best route to go for Python 3 but the documentation and stuff I was trying got me pretty frustrated today to the point I had to walk away from the whole computer for a few hours. I did find http://www.amazon.com/Introduction-Python-Programming-Developing-Applications/dp/1435460979/ref=sr_1_1?ie=UTF8&qid=1344210896&sr=8-1&keywords=pyqt book but am not sure if I should purchase it. I have over $100 in C# books I haven't used much in the past but they are good reference if I don't understand MSDN.
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Tue Jun 18, 2013 3:48 pm

My dad has a pretty low opinion of C++ but I really need to move from standard C to an object oriented language. My dad is a big proponent of Pascal and especially Delphi, but the extended syntax of those languages is kind of a turn off for me, and I'm really fond of how strongly typed the C language is.

That said, I've considered learning Objective-C to fill this gaping void in my programming skill set, but the D language also looks rather attractive to me. Can anyone suggest which of these languages I should learn now? I ask because I learn languages best when I apply them to real projects, and I'd rather start my next project in a language I think I'll like, rather than something I'll be fighting with every step of the way...
User avatar
biiibi
 
Posts: 3384
Joined: Sun Apr 08, 2007 4:39 am

Post » Tue Jun 18, 2013 12:56 pm


Awesome! I'd heard about LOLCODE a while back when it was still at the joke stage, I guess it was inevitable that someone turned it into an actual language. I love people with too much time on their hands. /laugh.png' class='bbc_emoticon' alt=':laugh:' />


If it's really a toss-up between the latter two, although I personally find D more interesting conceptually (and know very little about Objective C), Objective C is going to be the more practical language to learn, at least for the foreseeable future. I'm not a fan of C++ or the Pascal-derived languages, though C++ is by far the most useful of the bunch when applying for jobs so perhaps pragmatism should have some sway.
User avatar
Amy Siebenhaar
 
Posts: 3426
Joined: Fri Aug 10, 2007 1:51 am

Post » Tue Jun 18, 2013 10:59 am

I just discovered Python 3.3 is in its second beta and contains an IP address module that will make a planned project much easier. Would you all recommend I siwtch to it for the development or continue using 3.2.3 and then make changes later?
User avatar
Guy Pearce
 
Posts: 3499
Joined: Sun May 20, 2007 3:08 pm

Post » Tue Jun 18, 2013 6:19 am


As someone who has just done a course on using C++ and opengl (that's the straight opengl library, no LWJGL) I can understand why you would be confused. But after 4 months of learning about it I know everything I need to make a functioning 3D game engine in C++ now......and before that course I have only used Java and Actionscript for programming, so after using c++ its my new favourite language. Before this I had never used pointers, but pointers are the greatest things ever, I can make much more efficient code with them and when building a game engine they are nearly required in order to pass information between classes efficiently.

I will admit C++ has some serious downsides, like separate header and class files requiring so much switching between files.....but the amount of control c++ gives you is really nice. Just make sure you use an actual program to write it in, I notice many talking about C++ in notepad and that sounds truly terrible to try and use.
User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am

Post » Tue Jun 18, 2013 1:35 am

Does anyone have any recommendations for web frameworks that I can use with Python 3.2-3.3? Preferably something not overly complex that I can pick up a book on Amazon to help me learn?
I also do not exactly understand what I need to do to use PyQt from a licensing standpoint when I write an application using it. Would anyone be able to explain simply which license I need to use, I think GPL but not sure of which version of it, and what the terms are for the options? All I found was alot of legaleze which I did not understand.

Edit- For the web application I have in mind I would need to be able to work with lists or tree views and tables primarily, and I realize there will be a learning curbe but I figure it should not be too difficult.
User avatar
Erich Lendermon
 
Posts: 3322
Joined: Sat Nov 03, 2007 4:20 pm

Post » Tue Jun 18, 2013 3:17 am

in Python, what would be the best way of repeating a process every 5 seconds? (or every second, or every 2 minutes or whatever)
User avatar
bimsy
 
Posts: 3541
Joined: Wed Oct 11, 2006 3:04 pm

Post » Tue Jun 18, 2013 10:32 am


We need to know why. What are you looking for source code wise and threading wise?
User avatar
Stu Clarke
 
Posts: 3326
Joined: Fri Jun 22, 2007 1:45 pm

Post » Tue Jun 18, 2013 3:37 am

What do you all think of Python from a systems administration point of view? I have switched from C# and WPF to Python with PyQt for more cross platform development but at work we use Windows for everything and there are so many batch and VBScript files floating around. I know Powershell may be better for Windows but I want to further learn Python. I found a couple discussions using Google and there really wasn't anything clear on it.

Edit: I guess it also comes down to rather than learning two or more languages (bash, Powershell, etc) I would want to more learn just one (Python) to use on either operating system. I know some functions may not be available in certain cases which is fine but I am looking for just a high level opinion on using it in this type of role.
User avatar
Alberto Aguilera
 
Posts: 3472
Joined: Wed Aug 29, 2007 12:42 am

Post » Tue Jun 18, 2013 12:15 am


Since I don't know much about Python I can't say how viable it is for systems stuff in itself, but I would say that on a live system you should stick with whatever they're using unless there's already an established skill set and some enthusiasm to try something different: I think every workplace has someone who tries some on-the-job learning, and in particular I'm reminded of some guy who decided to write reams of Motorola M88000 assembly code because he thought it was interesting, but which was both non-portable and entirely unmaintainable; he wasn't thought of very fondly when he left!

I'm not saying that's the sort of thing you'd do and I think your own systems are a great place to see what's possible, but at work the tedium of established standards is the best approach...
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Tue Jun 18, 2013 5:06 am

I agree, they have standards in place and ways they do things which I am not trying to change, I am just looking at the big picture. I am just wondering for little things I may need to do either at home, or that I maintain at work if it would be viable. Ultimately I think it was me being bored one day and just thinking about how things apply and work together.
User avatar
Jeff Turner
 
Posts: 3458
Joined: Tue Sep 04, 2007 5:35 pm

Post » Tue Jun 18, 2013 2:46 pm

I started doing some GUI work with Python using PyQt 4 but then I discovered pyside which also binds to Qt so my book will still work for it even though it specifies PyQt. The only difference is GPL for PyQt4 or LGPL for pyside. I am not well versed in legalese so I am unsure which is the more open license. Since its Python people can see the source anyways which is fine, but I am a bit iffy on Riverbank (developers of PyQt) wanting people to buy developer licenses even if it is only for commercial closed source projects. Which license would be the least restrictive? I have tried to Google it but still get lost in all the text.
User avatar
candice keenan
 
Posts: 3510
Joined: Tue Dec 05, 2006 10:43 pm

Post » Tue Jun 18, 2013 2:10 pm

Anything that uses something that is licensed as GPL, has to be released as GPL itself.

Something that links to something licensed as LGPL does not need to be itself released as (L)GPL.

At least that is how it looks to me. But I'm not a lawyer.
User avatar
Flesh Tunnel
 
Posts: 3409
Joined: Mon Sep 18, 2006 7:43 pm

PreviousNext

Return to Othor Games