As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Recently I made the switch from windows to linux (arch). As a student majoring computer science I have quite some programming experience (mainly java so not really platform dependant).
Now I want to create some simple desktop applications for my linux machine. For some small projects I made for personal use on windows I used C#.net. Now I want to do something similar in linux.
I did some research and I guess my main toolkit choices for GUIs are QT and GTK but since I'm using GNOME I'm guessing the best choice is GTK?
What are some good options to get started with?
PS: Something I had in mind for a first little project was a simple download manager, basically a GUI on top of wget since I couldn't really find one that I liked.
(I could use java on linux too but I'd prefer something more "native")
Well if you want something fast and easy I'd recommand the use of Qt, since it comes with a graphical editor
C++ is really powerful and you can do a lot of crazy stuff, but you also have to write a lot and scratch your head sometimes. A really good alternative is Python to get things running faster. Qt has binding for Python too, Pyside and PyQt
In most modern Linux distributions, it is trivially easy to install and maintain the entire Qt tool chain. Coming from C#, you are also more likely to find C++ a bit more familiar.
On the other hand, your proposed project might be a bit more instructive should you decide to go the C/GTK route. After all, wget is written in C, and, being Open Source, is freely available to incorporate into your projects. To learn good programming, IMHO, it is more important to expose yourself to code that's stood the test of time and is being actively maintained than to fool around with desktop decorations. Heck, if you discover something interesting, you can drop an email to Hrvoje Niksic himself. Now there is a feature that's not available even with the $5,000 Vis Studio Premium.
Also, both Qt and GTK have great UI designers, so that really shouldn't influence your choice. So, really my answer would be, why not try both?
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Benchmark
Hacker News Discussion
Hacker News Discussion 2
It's not like Node.js is even really dominant today (except in the Hacker News community of course), it hasn't even had a 1.0 release yet. Funny to be speculating on what might replace it already :)
Performance is nice (though micro-benchmarks are not the right way to judge that) but if that was the only thing that mattered we would all be writing custom web servers in C for every app. One of the other important things is the community support, which Node.js definitely has going for it at the moment. It has a very healthy open source (this being the key) community that has created a large library of tools.
I think Vert.x is interesting and has a different way of looking at things than Node.js which is great. If they are able to continue to make progress, get more people interested in it, and show that it is easier and faster to write web apps then who knows? Maybe in a few years we can have a discussion on what is going to threaten Vert.x's future.
There are some interesting things brought up by this micro-benchmark that may be worth addressing in Node, but it's very important to remember that nobody doing 100's of millions of hits per day (which these benchmarks show) does so on one machine. They do it on many machines.
There are certain levels where faster languages make a difference (see for example Twitter migrating their backend from Ruby to Java), but it's VERY rare to get to that position.
Most people need a language that is clean and easy to program in, and a good ecosystem.
Vert.x has no ecosystem to speak of. If you want a JVM based system you can get plenty of options there. If you want a Javascript based system the best option right now is Node.js. It's that simple.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I want to learn more about sandboxing. Not just about it. I want to learn such that I will be able to write a simple sandbox.
Surprisingly, there isn't any information available anywhere. Even the Wikipedia article is not good.
Can any one please suggest me good material. I know that its very advanced level concept. So, what are the prerequisites for learning & mastering it.
read about API hooking, for example sandboxie hooks Windows kernel to filter all api calls to filesystem and redirects it results to sandbox, you could hook APIs and filter it, pass only valid parameters, return errors for invalid calls
for API hooking you will find plenty materials on the net, try on codeproject.com
Google's Chromium uses sandboxing and has several documents about it:
http://dev.chromium.org/developers/design-documents/sandbox
http://code.google.com/p/chromium/wiki/LinuxSandboxing
You might also look at jails in FreeBSD. These are the FreeBSD equivalent of sandboxes.
The source code for jail is available (though you'll have to understand the rest of the FreeBSD code as well.)
A simple sandbox would simply be an environment in which you let 'something' execute, but restrict what it can do.
Typically, this "something" is an already-existing language, like Java, or JavaScript, or C#, or native code. Java has 'sandboxing' apis for applets and so on, and .NET has various 'trust' levels, JavaScript has the bounds placed on it by the interpreters (browsers).
So it's a little weird to "write" your own sandbox unless you also have a language you want to sandbox.
Do you have such a language? What do you want to learn about, specifically?
This is very dependent on what do you want to sandbox. If it is a full-blown system with multiple interfaces/languages available, you really do not want to re-invent the wheel, but run a virtual machine in VirtualBox, QEmu or some other alternative
In any case, a sandbox IS, at least on some level a virtualization of the system you are 'supposed to be' running...
If you need to sandbox applications for a single (interpreted) language, modifying the interpreter sound like a sensible approach.
The answer will likely be language specific. Unfortunately most languages don't have built-in sandboxing capabilities. But functional languages tend to be powerful enough that one can be built from scratch without extending the language.
In Tcl the basic mechanism is to create slave interpreters:
interp create -safe sandbox
interp eval sandbox $set_up_code
set result [interp eval sandbox $unsafe_code]
I wrote an overview of the ways of sandboxing within Linux the other day, which links to a lot of references for the different techniques. Similar methods are applicable in other operating systems. I hope it is helpful - I couldn't find much comprehensively documented either.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'll be writing an XMPP (Jabber) bot, and I need to decide in which language should I write it. Currently I'm considering Python, Java, and PHP.
Since I'm expecting the bot to be running most of the time (i.e. 23.5/7), are there some specific arguments for or against using one of these languages? (e.g. not "$x sucks", but "$y has good daemon library" or "$z leaks memory")
The bot's purpose will mostly be responding to user input.
If none of these languages seem suitable to you, what would you recommend?
I would say Python with the Twisted framework. Twisted is amazing framework for asynchronous networking and most of the time it already has the support for the protocol you are looking for. There's a slight learning curve because of the reactor pattern but once overcome you can do amazing things with the littlest amount of code. As for the IRC protocol twisted already has it, so while I'm not an expert on IRC bots, I would definitely recommend Python and Twisted.
BTW, this is the first one that came up with google: Python IRC bot using Twisted
If you want to service for multiple users at the same time(probably you want), PHP may not be a good choice, since it does not support(or experimentally support) threading, you have to fork a copy of your application for each user.
I recommend Java for this purpose. Sun describes Java as "simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multithreaded, and dynamic.".
In my opinion with exception of time critical jobs Java best suits for client-server architecture.
Of the options you posted, I would have to suggest Java. PHP, for one, simply isn't going to do what you want it to; it's meant to be a web scripting language, not an anything-else scripting language. Python is capable of doing what you want, but I think Java will provide more out-of-the-box support for the functionality you're trying to achieve.
Personally I'd start with the ejabberd codebase and work from there -- for a headless network server agent, Erlang would be the language/platform I'd reach for first, unless there were compelling arguments for another technology. Immutable data and actor-based concurrency pushes all the normal housekeeping code down into the platform, leaving you free to concentrate on the bits that are really what your app is about.
Wrote some years ago bot for IRC using delphi. It is much better than interpreter languages - eats less memory, works much faster, and you can be sure that it will have great reserve of speed if you will need add more and more features in future - parsing users phrases, process them. For example my bot particularly logged all chat and performed quick search by user request (user just wrote !search word/phrase - bot performed search and sent to user results as short quotations, so user could select one of quotations and get more posts around it from log). It is almost unimplementable using for example php because it is too slow.
If bot is proposed to work under *nix - just use c/c++ :)
If you want to use only languages enumerated in your post - then only Java to my mind. Read above why.
Python Jabberbot
This is a fairly easy way to create a jabberbot with python.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 13 years ago.
I am currently working in a .Net project but from university I have also a good background in Java. Recently I am asking myself, if multi plattform languages (like Java, or VM based like Scala) aren't on the rise?
Lets have a look at Suns WORA write once, run anywhere principle, which had been rephrased to write once, TEST everywhere because in the past especially desktop applications were/are still a Windows domain. But the last years there were quite some changes like
Linux has improved hugely in driver support and usabilty
Mac OS is getting even more popular
native look & feel thanks to SWT/JFace for Java
Rich Client Frameworks (RCP and Netbeans) that save a lot of time and provide rich experience
So, creating applications targeted on multi plattforms should be a reasonable way to go. For example, why should a small/mid-sized company pay a lot of money for windows/mac when it can use Linux (honestly, when you are not a gamer you dont need windows ;) ). And of couse then those companies would prefer software that runs on their machines (maybe the CEO a has MAC because he can afford it but needs the same apps.) Eclipse RCP can provide for example and then it really is WORA.
I like working on C# right now, but in 1-2 years when I want to have my own little company I will use Linux and the development will probably focus on what I've just written. I just wanted to know what others are thinking (maybe I change my mind).
Please don't start a war on Linux vs. Windows vs Mac (I use the first two). Its only about if multi-plattform is a good way for the future, or if you gain more by the advantages of a single platform (special features).
I work for a Qt consultancy company that's been writing multiplatform applications for a few years and I work on KDE's port to OSX and previously at a company providing a client for Windows/Linux/Mac.
The obvious benefits you get from supporting multiple platforms are:
Goodwill from niche communities (including blogging, word of mouth support)
Your developers can work on whatever platform they like so you can recruit them more easily
Your application will probably be slightly less buggy as you'll be testing on multiple platforms
The downsides:
Packaging/distribution/support becomes a big of a pain
Some platforms can get easily neglected
You don't tend to hook into the backend features of the OS as well
If writing a GUI application then you tend to end up with something that doesn't really meet the HIG of any platform unless you have quite a lot of platform-specific tweaking or have a toolkit that helps with this (e.g. Qt)
I still think it's worthwhile and agree with you that it's the future of applications. Really, there is enough good, high-level technologies that there's no need to limit your market to a single platform's users and Linux is a huge in emerging markets so being able to run your application there will be more and more important as time goes on.
Cross-platform solutions I've seen used to good effect:
Adobe Air
C# (with .NET or Mono)
Qt
Java
Web applications (obviously)
Yes, this is happening, but it's a very slow process.
You can trace the trend back to the UCSD Pascal P-system from the early 80's. In the 90's we got the JVM, and in the naughties we got the CLR. These newer VMs each support many languages from third parties. Python, for example, has long had its own VM, but also comes in a version that runs on the JVM, called Jython, and another one that runs on .NET's CLR, called Iron Python.
Other VMs exist that are targeted by multiple languages. The Parrot VM was created initially for Python and Perl 6. The Reia language runs on Erlang's BEAM VM. I'm sure there are other examples.
On top of that, there are many languages that have been cross-platform for a decade or two, like Smalltalk, early versions of Perl, Ruby, etc.
This is all a kind of long-term tectonic shift. It's driven by the fact that computers are getting faster, while many tasks we use computers for don't need to get faster. So, we can use high-level languages to write programs to do these tasks, where it wouldn't have made sense in the past. In the early 80s, the successful new word processors were written in assembly language. In the 90s's, C. Today, Javascript.
Check out mono http://www.mono-project.com/Main_Page if you like C#
Use SWT (http://www.eclipse.org/swt/) if you prefer java
YMMV
If you are going to spend hundreds of thousands (or millions) of dollars developing an application, it makes sense for it to be capable of running on as many machines as possible. Just a few years ago, platforms had many platform-sepcific features, but that distinction is rapidly disappearing with the availability of cross-platform compilers like Mono.
All depends of the activity domain of the software that you develop...
If end users are or plan to use multi-pateform so you must care about it ! If not, you can develop on the plateform used by your customers !
Of course, some peope would say : even if all customers are on Windows, the development is more productive on MacOS... but it's an other question !
In general, your users will generally prefer an app that looks and behaves like a native application. Many of the cross-platform frameworks are really very good at emulating the native look and feel. Just be aware that if your app doesn't feel native (maybe through some quirk in your toolkit of choice), critics will beat you over the head about it forever.
Also, The issue of using cross-platform toolkits really depends on the application domain you're targeting. For example, if you're working with video, creating a cross-platform app with a good user experience is very, very challenging. On the other hand, CRUD (Create-Update-Delete) apps commonly used inside of enterprises are excellent candidates for developing with cross-platform languages/toolkits.
Also, one reason that Java is very popular for applications deployed inside of enterprises is the ease with which you can deploy updates (via Java Web Start - I think C# has a similar update technology too). However, once you step outside of the walls of the business most users will shy away from Java Web Start apps.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have noticed some developers picking up new skills and moving from one platform to the other? How do they do it? How do they justify for the lack of experience in the said platform they get the job?
Is it based on relevance to their previous experience? do they get certified in the target platform and work at a junior level accepting a pay cut? is it simpler if you are into contracting/consulting? Or is it simply a matter of projecting the resume correctly?
Actually, a lot of seemingly different platforms are really very similar, if you understand what goes on "under the hood," as it were. Though I've barely touched a Microsoft platform for well over a decade, for example, I have little difficulty developing things there because deep knowledge of computer systems in general is quite transferable.
For me, moving from LAMP to .Net was a work necessity. The consulting company I work for needed a PHP guy right away which is how I got in, but that project completed abruptly and they did not have an PHP work on the horizon.
In the closing weeks of the PHP project, I took an online O'Reilly course in C# and worked closely with a more experienced developer on a Windows application for the same client. Once the PHP gig completed I was able to start right away on a .Net project and I've had .Net clients ever since.
The key for me was flexibility. I let my employer know immediately that I was interested in different technologies and platforms and have taken the initiative by requesting access to courses and taking advantage of our yearly book allowance to explore different areas. When opportunities arise for investigating new directions like Mobility (PDAs, specialty devices and tablets) I jumped at the chance.
If your employer doesn't have policies which promote this type of self-directed expansion, then try to build a type of application you are familiar with in a new platform. Once you have you have a decent grasp of the tech, get involved with open source projects in your target platform and look for paid outside opportunities (i.e. Craigslist, elance, etc.) while you are still learning.
Most likely it is a result of circumstances. In these touch economic times being able to move outside your comfort zones is crucial
I really haven't seen a lot of reluctance on anybody's part to put developers on platforms that are new to them. Changes in computer language tend to be far more worrisome to managers than platform changes.