Discussion Forums > Technology
Programming Questions | Repositories
rkruger:
--- Quote from: Bob2004 on March 20, 2012, 10:11:21 AM ---If you're not going to be using it on Windows at all, then yeah, I guess developing directly on Linux would be better. Linux Mint isn't designed for programming, so it might not have all the development tools you want installed at first, but it should work fine. For C# you'll need to use Mono, and MonoDevelop.
--- End quote ---
Let me introduce you to a new concept:
IDE != Programming
I think you are over-complicating things here.
The only things you really need are a text editor and a compiler/interpreter, that's it!
And as you said earlier:
--- Quote from: Bob2004 on March 19, 2012, 05:43:06 PM ---It might just be because it's what I'm used to using, but I never found it as easy to get things going in Linux. Too many things to manually configure, too many things to go wrong.
--- End quote ---
This is probably because you are too focused on using an IDE for everything.
--- Quote from: asermax on March 20, 2012, 02:58:39 PM ---I would recommend Python; although it takes some more time to learn and adapt to it than other languages given it's sintax and some other pecualiarities, most C and C++ libraries have Python bindings , making a lot of things a lot easier than in other languages.
--- End quote ---
Again, I agree with going for Python.
And actually, many Linux distributions already comes pre-installed with a Python interpreter, since it's used for scripting tasks in the distribution itself.
kitamesume:
all of the linux distributions? which language does python have a similarity to? seems interesting.
asermax:
--- Quote from: rkruger on March 20, 2012, 03:44:46 PM ---And actually, many Linux distributions already comes pre-installed with a Python interpreter, since it's used for scripting tasks in the distribution itself.
--- End quote ---
True that.
Nevertless, I recommend Debian since it's pretty easy to install/update things thanks to it's package managment system. I fell in love since I learned what a .deb file was.
--- Quote from: kitamesume on March 20, 2012, 04:26:30 PM ---which language does python have a similarity to? seems interesting.
--- End quote ---
I wouldn't know how to answer that since I only use a few languages, but I can tell you some particularities of the laguage:
- It uses and indentation based sintax to demarcate scopes, instead of curly braces ('{}') or end of block statements (e.g.: End If).
- It uses objects, but it's not purely object oriented. It allows "free functions" (functions not attached to any object) and they are objects themselves, so you can pass a function as an argument as if they were plain integers. This makes calling a callback procedure really easy.
- Python, as it has been noted before, is an interpreted language. There are multiple interpreters out there that compliant with the Python specification, and each one can access libraries of the implementing language very easily. Example: CPython (written in C) can acces C and C++ libraries directly, Jython (based on Java) can access java classes as if they were Python classes).
- List and Tuples are native datatypes.
Those are the most relevant IMO. You can find out more on the Python Documentation page ,the tutorial is a good start point to get an overview of the basics.
Btw, the version 3 of python is currently on development, and some libraries haven't been ported to it yet, so I would recommend you use the version 2.7, which is currently the most widespread version.
P.S.: You should check if there's an easy way to do what you intend with the USB port from python. I assume there's some kinda of C bindings or Python library to do that, but I couldn't tell for sure.
Edit: maybe this could work PyUSB
Bob2004:
--- Quote from: rkruger on March 20, 2012, 03:44:46 PM ---
--- Quote from: Bob2004 on March 20, 2012, 10:11:21 AM ---If you're not going to be using it on Windows at all, then yeah, I guess developing directly on Linux would be better. Linux Mint isn't designed for programming, so it might not have all the development tools you want installed at first, but it should work fine. For C# you'll need to use Mono, and MonoDevelop.
--- End quote ---
Let me introduce you to a new concept:
IDE != Programming
I think you are over-complicating things here.
The only things you really need are a text editor and a compiler/interpreter, that's it!
And as you said earlier:
--- Quote from: Bob2004 on March 19, 2012, 05:43:06 PM ---It might just be because it's what I'm used to using, but I never found it as easy to get things going in Linux. Too many things to manually configure, too many things to go wrong.
--- End quote ---
This is probably because you are too focused on using an IDE for everything.
--- End quote ---
What I meant by "If you're not going to be using it on Windows at all, then yeah, I guess developing directly on Linux would be better." was that, if the application will not need to be used on Windows, just Linux, then he may as well program it in Linux to begin with, to save having to then port it over later. Obviously not really an issue with Java, since that works basically the same in every environment, but pretty much any other language it is a concern. It's easier to build it for your target platform in the first place than it is to code it for something else, then find half of it doesn't work when compiled for Linux and you have to spend ages changing it all.
The rest of that paragraph was a seperate point. Linux Mint isn't designed for programming, so it has fewer development tools. That has nothing to do with IDEs at all - the last time I used Mint, for example, it didn't have any version of the JDK installed, which means you couldn't do any Java development even in just a text editor. And it doesn't come with any of the Mono development tools either, which are needed to compile C# - regardless of any IDEs, if you don't even have a compiler, you can't do much. None of that is particularly hard to install of course, you just use Synaptic and it only takes a few minutes. I was just mentioning it.
On the IDE point, while a good IDE is definitely not a requirement to be able to program, it's certainly really, really helpful. Easy code management, snippets, templates etc come in handy, as do tools for easily integrating libraries into a project. But mostly, inline debugging! It is so, so, so much easier to debug code when you can step through it line by line, inspect variables at every stage of the process, and easily track down the exact location of any problems. Having to type stuff in a text editor, then manually call the compiler, with the only debug output being the name of the exception, the line number, and a call stack (and any debug output you manually add to your program).
When I was programming in Linux, I was using Java, before I switched to Windows (and Netbeans). I was basically just using gedit and javac to develop with, and it worked. Then I installed something totally unrelated (I can't remember exactly what), and it somehow broke my JDK install, which meant I couldn't get anything to compile. Even uninstalling Java, the JDK, and everything related then reinstalling them all again didn't fix it, I spent hours trying to work it out. Hours that would have been better spent getting some actual work done.
rkruger:
--- Quote from: Bob2004 on March 20, 2012, 08:39:08 PM ---What I meant by "If you're not going to be using it on Windows at all, then yeah, I guess developing directly on Linux would be better." was that, if the application will not need to be used on Windows, just Linux, then he may as well program it in Linux to begin with, to save having to then port it over later. Obviously not really an issue with Java, since that works basically the same in every environment, but pretty much any other language it is a concern. It's easier to build it for your target platform in the first place than it is to code it for something else, then find half of it doesn't work when compiled for Linux and you have to spend ages changing it all.
--- End quote ---
Well, in the case of Python, you don't need to compile it at all, since it's normaly interpreted directly.
As long as you don't utilize OS specific functions, you can just copy the same Python file to every platform and just run it.
--- Quote from: Bob2004 on March 20, 2012, 08:39:08 PM ---The rest of that paragraph was a seperate point. Linux Mint isn't designed for programming, so it has fewer development tools. That has nothing to do with IDEs at all - the last time I used Mint, for example, it didn't have any version of the JDK installed, which means you couldn't do any Java development even in just a text editor. And it doesn't come with any of the Mono development tools either, which are needed to compile C# - regardless of any IDEs, if you don't even have a compiler, you can't do much. None of that is particularly hard to install of course, you just use Synaptic and it only takes a few minutes. I was just mentioning it.
--- End quote ---
I agree that Mint is probabaly not "designed for programming", but as other major Linux distributions I believe it includes out of the box support for C, C++, Perl, Tcl and Python.
Both of those languages you mention (C# & Java) are not good examples in this case, since they both rely on their own runtime environments (what you call "development tools"?), and not the native system libraries.
--- Quote from: Bob2004 on March 20, 2012, 08:39:08 PM ---On the IDE point, while a good IDE is definitely not a requirement to be able to program, it's certainly really, really helpful. Easy code management, snippets, templates etc come in handy, as do tools for easily integrating libraries into a project. But mostly, inline debugging! It is so, so, so much easier to debug code when you can step through it line by line, inspect variables at every stage of the process, and easily track down the exact location of any problems.
--- End quote ---
Yes, and you can also integrate easily with revision control, bug tracking, and all that jazz. But does kitamesume really need all this? Maybe he does, but I'm just saying there is a simpler way.
--- Quote from: Bob2004 on March 20, 2012, 08:39:08 PM ---Having to type stuff in a text editor, then manually call the compiler, with the only debug output being the name of the exception, the line number, and a call stack (and any debug output you manually add to your program).
--- End quote ---
Strangely enough, I find this to be enough information to track down most bugs.
And as for that manual debug output, it can be crucial if you are gonna run that program in a customer's production environment. Hint: They don't run your program in an IDE debugging session there when it crashes.
--- Quote from: Bob2004 on March 20, 2012, 08:39:08 PM ---When I was programming in Linux, I was using Java, before I switched to Windows (and Netbeans). I was basically just using gedit and javac to develop with, and it worked. Then I installed something totally unrelated (I can't remember exactly what), and it somehow broke my JDK install, which meant I couldn't get anything to compile. Even uninstalling Java, the JDK, and everything related then reinstalling them all again didn't fix it, I spent hours trying to work it out. Hours that would have been better spent getting some actual work done.
--- End quote ---
Look on the bright side, you probably learned a few things about Java (good & bad) while looking into that problem.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version