Programming language selection for simple standalone program

DVDL

Active Member
Joined
Jan 6, 2009
Messages
48
Reaction score
0
Location
Pta
Hey clever peeps

All right, I'm in need to develop a simple program that needs to:
- Take user input (text fields)
- Have telnet ability (e.g. configure an access point through CMD)
- Configure a text file on a removable drive
- Have a simple user interface

The program will be used as a configuration tool, meaning it will usually only be used once by a user.
Browser-based will be the 1st choice, but I don't believe this will be possible if the application needs the telnet ability.
Cross-platform is an optional plus, but because I want to keep it simple I'd rather not let the user install a whole runtime like Java. Despite this, Java is still an option.

I'm only a final year engineering student and can code somewhat in C++ (thanks to Arduino), Java (thanks to final year project), and Delphi (school), but I'm willing to learn basics of a new language.

Is Delphi too old these days? How frequent do users have problems with Java vs JAR versions? What about C#, C++ or .Net?

Any critique, comments and ideas are welcomed.
 
Last edited:
You could use C++ with something like Qt(Can also be used on android and ios) or Gtk.
 
Use Visual Studio express with C# and WPF / Winform. (I recommend WPF)

Really fast, really easy to learn.
 
Yeah, I would suggest Java. Avoid delphi, its pretty dead and not really that cross platform.
Sounds like a strange project that needs telnet, but AFAIK java would fit almost all your needs and be pretty simple to find code examples to do what you need.
 
Yeah Telnet is a weird requirement.... seeing it's disabled by default these days.
Otherwise whatever language you are capable of coding in.
C++ could work, but it would be less effort doing it in C#.
 
Since it is a small application i would go with something you are already familiar with and that would be JAVA. C++ is good for producing highly optimized code and is a pain to debug and get working properly. If you fluent in both c++ and java, you can code a java application much faster and debug any issues allot faster. Personally i use JAVA and c++ together. I do allot of digital signal processing in c++ and then the rest of code in java and access it through JNI(java native interface). Since java will never be as fast as c++ when it comes to raw computational speed. I am not saying java is slow, im just saying that your code can be allot more optimized especially when you deal with allot of data and need to make some low level calls to the IPP libraries.

so java gets a +1 from me.
 
Do not avoid Delphi because it's "pretty dead". Avoid it for a legitimate reason.

It continues to have a large user support and ships with a modern IDE and cross platform compilation. Since you have done Delphi in school, you should not have a huge learning curve to get back into the swing of things.

So consider it objectively with the other languages mentioned and choose one that fits the task and you are most comfortable with.
 
I take it from your username you are an Embarcadero employee :)
 
I would use c# and then just make a batch file to telnet to access point.
 
I do loads of these type of things. Webpages that based on user input ssh/telnet/wmi to various systems (Computers and Routers) to execute commands and post the results.

Regex for parsing stdout ftw!

I use and love Perl, Python is better option though I'm just to lazy to get into it.
 
You could write that whole thing in assembly, after all, you can never have code that is too optimised :D.

For real:
I would use Python in combination with batch files. For this type of application, it is fast enough. When I have to do something like a massive 1 million element nested for loop, I use cython for the looping.
 
Ruby can do all these things.

It'll also make your life awesome knowing ruby.

File: example.rb
Code:
#!/usr/bin/ruby

require 'open3'

def telnet(host, port)
  raise "Invalid port" unless (port.to_i > 0)
  
  stdin_thread = nil
  Open3.popen3("telnet #{host} #{port}") do |stdin, stdout, stderr, wait_thr|
    stdin_thread = Thread.new do
      while !stdin.closed? do
        stdin.puts(Readline.readline('').chomp)
      end
    end

    error_thread = Thread.new do
      while !stderr.eof? do
        putc stderr.readchar
      end
    end

    output_thread = Thread.new do
      while !stdout.eof? do
        putc stdout.readchar
      end
    end

    Process::waitpid(wait_thr.pid) rescue nil 

    error_thread.join
    output_thread.join
  end
  stdin_thread.kill rescue nil
end

puts "Which server would you like to telnet?"
server = gets.chomp
puts "On what port?"
port = gets.chomp.to_i

telnet(server, port)

File.open('mytext.txt', 'w') do |file|
  file.puts "yay, text"
end

File.open('mytext.txt', 'r') { |file| file.read }

I just did a quick test in Ubuntu but I'm fairly certain this will work in Windows.

I'm running Ruby 1.9.3 but I would recommend running the latest version.

Also Ruby is super simple to install.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X