wibr Posted June 8, 2014 at 05:36 PM Report Share Posted June 8, 2014 at 05:36 PM Hey guys, I have the feeling that there are quite many people here who know how to program, so this is an attempt to gather some hard data :-). With useful I mean something like counting the number of different characters in a Chinese text or create some flashcards from a csv file. If you know more than one programming language you can just choose the one you know best. Thanks! Quote Link to comment Share on other sites More sharing options...
Shelley Posted June 8, 2014 at 07:39 PM Report Share Posted June 8, 2014 at 07:39 PM "counting the number of different characters in a Chinese text" isn't this something that can be done by the Chinese Text Analyser? This is the topic here: http://www.chinese-forums.com/index.php?/topic/44383-introducing-chinese-text-analyser/ I am so old school when it comes to programming I have had to choose other because my programing was done late 70's through the 80's. I did mine on zx81's, Acorn Atom, Atari 800, Commodore 64, but I have not kept up with new stuff. Closest I get to programming these days is using Macro media to build websites and a few macros in Excel. I would have also like to have chosen focusing on Chinese and life Quote Link to comment Share on other sites More sharing options...
lechuan Posted June 8, 2014 at 08:06 PM Report Share Posted June 8, 2014 at 08:06 PM Is it possible to choose more than one language? Quote Link to comment Share on other sites More sharing options...
wibr Posted June 8, 2014 at 09:17 PM Author Report Share Posted June 8, 2014 at 09:17 PM @Shelley sure you can use existing tools, that was just an example of what I would consider a simple but useful program, in contrast to "hello world" or fizzbuzz @lechaun no I disabled that option Quote Link to comment Share on other sites More sharing options...
Shelley Posted June 8, 2014 at 09:27 PM Report Share Posted June 8, 2014 at 09:27 PM Oh ok I misunderstood, thought you trying to find someone to write/collaborate on some programs you wanted. Sorry Quote Link to comment Share on other sites More sharing options...
lechuan Posted June 8, 2014 at 11:02 PM Report Share Posted June 8, 2014 at 11:02 PM It's just that most programmers could probably write in more than one language. I'd put down Ruby, Perl, Javascript and C, for example. Quote Link to comment Share on other sites More sharing options...
imron Posted June 8, 2014 at 11:35 PM Report Share Posted June 8, 2014 at 11:35 PM Well, Chinese Text Analyser is done completely in C++, so I guess that's my category. Like lechuan, I would also qualify for several of the languages there. Note, I would have had C and C++ as different categories. They really are quite different languages. Quote Link to comment Share on other sites More sharing options...
simc Posted June 9, 2014 at 12:30 AM Report Share Posted June 9, 2014 at 12:30 AM I have created various tools for myself. However, I also like to "focus on Chinese learning instead". When I have an idea for a tool I have to consider whether it would be something I would really use. If I wouldn't really use it it would be a waste of time to write it. If it is a worthwhile idea, I try to simply the concept as far as possible and try to come up with the simplest implementation. Recently I have written a program for counting word in a text file. I just have a word list and count the occurrences of each word. This isn't the most accurate way of doing it, as Chinese doesn't have spaces so you can't tell where the word boundaries are (so 我喜欢新西兰花 can be either "I like New Zealand flowers" or "I like fresh broccoli"). But it works well enough for me. As far as possible it is best to leverage existing tools, like Pleco or Google Translate. I have one program which takes all the lines out of a text file that contains words in the list that I want to pre-learn, and puts them in a Pleco user dictionary. That way, when I review the words I have lots of example sentences to look at when I review the flashcards. Another tool I have created takes the original text and an English translation and creates a interlinear text (assuming that the Chinese and English were divided up into paragraphs in the same way). Then I use Google translate to generate the English text. Google translate's translation is not 100% reliable but can often be useful for recognizing fixed expressions which aren't in Pleco (for example 整体解决=overall solution). Quote Link to comment Share on other sites More sharing options...
wibr Posted June 9, 2014 at 05:02 AM Author Report Share Posted June 9, 2014 at 05:02 AM @lechuan I know and that's exactly why I disabled the option ;-) I wanted the sum to be the total number of programmers...like I said, just choose the language you know best. Since I set the bar for "useful" quite low, I guess anyone proficient in one language could write a program in one of the others quite easily... @imron true, C/C++ is just what you see quite commonly, doesn't make much difference for the vote I guess Quote Link to comment Share on other sites More sharing options...
imron Posted June 9, 2014 at 06:08 AM Report Share Posted June 9, 2014 at 06:08 AM Commonly and mistakenly :-) Quote Link to comment Share on other sites More sharing options...
tysond Posted June 9, 2014 at 11:37 AM Report Share Posted June 9, 2014 at 11:37 AM I entered C# as it's what I use if giving a choice. However I know many programming languages, and have been part of teams designing and implementing new ones as well. I've written significant programs in C#, C, C++, Perl, Haskell, PHP, Prolog, Mercury, BASIC and have modified programs in Javascript, Java, Visual Basic, plus dabbled in assembler. After a while it's not the language that is the issue (a weekend to learn), it's the libraries (a lifetime to master). Unfortunately in the last 5-6 years hardly had a chance to write code, but I can perform wonders with Excel. Quote Link to comment Share on other sites More sharing options...
hedwards Posted June 13, 2014 at 04:33 PM Report Share Posted June 13, 2014 at 04:33 PM @imron, come on they both start with a C. Also Java and Javascript totally the same thing. I've gravitated more towards Java lately just because the projects I'm interested in benefit more from the cross platform aspect than I'm losing in terms of the greatly reduced options for optimization. Quote Link to comment Share on other sites More sharing options...
imron Posted June 13, 2014 at 05:07 PM Report Share Posted June 13, 2014 at 05:07 PM @imron, come on they both start with a C So does C# but that got a separate item (p.s. yes I do realise you weren't being serious) I'm interested in benefit more from the cross platform aspect The thing that bugs me about Java (and note, this is from an end-user perspective, but as a developer it's important to consider the end-user experience) is not so much the reduced performance, but rather the dependency on a huge runtime. If you don't have a version of the JRE compatible with the program you want to run then you're stuck with another however many MB download before you can use it - sucks even more if you have other programs that rely on different versions of the JRE. C# suffers from a similar problem. I remember downloading a program not to long ago thinking 10MB, that's not too bad I'll check it out. Only to then run the installer and find it had a dependency on a different version of the .NET runtime which then required another large download before running. It's a really poor user experience, hence my preference for native code when possible. As a developer I'll take a hit on development costs and time in order to provide a better user experience. As an example, I don't know if you remember what it was like installing Chinese Text Analyser, but a lot of development time and effort went in to making the process as painless and effortless as possible compared to many Windows applications - no need to choose or think about 32-bit vs 64-bit versions, no large additional dependencies to download, no Next->Next->Next clicking in the installer, just one click to say you trust the .exe, one click to install, and one click to launch and you're done. A considerable amount of time and effort was spent to make that possible, and it's something most users probably won't even realise they appreciate. From a developer's perspective, what really bugs me about Java is the enforced directory structure based on package names. All those empty directories...grrr, a real pain if you like doing things from the command line. Quote Link to comment Share on other sites More sharing options...
wibr Posted June 13, 2014 at 05:32 PM Author Report Share Posted June 13, 2014 at 05:32 PM @imron I think that is what makes webservices attractive for developers and users, the developer has full control over the environment while the user doesn't need to install anything... the drawbacks are obviously server costs for the developer and increased dependancy for the user Come to think of it, I would say Chinese Text Analyer could work quite well as a webservice for the occasional user... Quote Link to comment Share on other sites More sharing options...
Silent Posted June 13, 2014 at 06:27 PM Report Share Posted June 13, 2014 at 06:27 PM I think that is what makes webservices attractive for developers and users I've to disagree on this one. I strongly prefer a one time install of a dependency like .net framework or java runtime above a network dependency. Sure, having to instal (unexpectedly) an additional component can be a pain, but being dependent on a data network is a bigger pain. The extra component is a one time event and if the installer has a build-in check and installs them when needed there's no real issue. Data network dependency is a different beast. It requires a dataplan or is dependent on unreliable wifi connections with associated ongoing costs. Specially when travelling this is a pain and/or may turn out quite expensive. Quote Link to comment Share on other sites More sharing options...
abhoriel Posted June 13, 2014 at 07:41 PM Report Share Posted June 13, 2014 at 07:41 PM A shame you can't vote more than 1 language! C/C++ for me. But programming is a big hobby of mine rather than a profession Quote Link to comment Share on other sites More sharing options...
imron Posted June 13, 2014 at 11:31 PM Report Share Posted June 13, 2014 at 11:31 PM Come to think of it, I would say Chinese Text Analyer could work quite well as a webservice for the occasional user... I had thought of doing that, and may do somthing in the future but it has a number of drawbacks. Firstly as Silent mentioned there's a network dependency that gets introduced, secondly it will be slow to work with large files - not because of CTA but because of generally slow upload speeds, and finally I don't particularly like web-programming Quote Link to comment Share on other sites More sharing options...
hedwards Posted June 14, 2014 at 04:34 AM Report Share Posted June 14, 2014 at 04:34 AM @imron, presumably you'd be using Javascript or something else that runs on the client side. Still, I imagine the amount of code necessary to do CTA as a webservice would be rather large and probably not well suited to a webserver. Personally, I tend to prefer properly written Java applications, I use Linux, Win Vista, Win 7, Android and would be using FreeBSD as well if not for some practical drawbacks. Granted that Android doesn't really use Java for technical reasons, but I'd much rather have the same application running on all of my installs with the ability to keep it synchronized or shared between the installs. A well designed Java application is one of the easier things to share between multiple installs. In an ideal world it's no-install except for the Java runtime and the actual program files and such can be in their own directory. As far as performance goes, Java is actually quite speedy, the main issue is that it requires you to run the program for a while in order for the VM to get warmed up. Last time I checked, Java was a popular language for High Frequency Trading platforms as it's actually quite speedy compared with the alternatives. Different strokes for different folks I suppose, but for folks that use more than one computer, a well written Java program is in a much better position to allow the user to take their work to different OSes and computers than most other languages. It's hardly the perfect language, I doubt such a thing exists, but I don't think that in the modern era the bit of bloat you get from the runtime environment is such a big deal. I mean, most developers can't be bothered to optimize their own code anyways, might as well get something for the trade. Quote Link to comment Share on other sites More sharing options...
imron Posted June 14, 2014 at 06:06 AM Report Share Posted June 14, 2014 at 06:06 AM Actually most of it would be server side and would run using the same underlying code as the current exe. The only platform dependent code in CTA is the GUI. All the core segmenting and analysis is C++ and in fact was first developed on OSX as a command line tool. Server load would be minimal because the application is highly performant. It would then generate HTML with spans breaking up the text as needed. I've previously actually experimented with sending json and the piecing it together on the client, but with all the dom manipulation performance for large files is much worse than sending pre segmented HTML. Re: high performance trading, C++ is also very popular. For non GUI applications, well written C++ is also highly portable. Regarding Java apps, especially ones not written by yourself, they can be a real pain. For example, the Australian government has a java program for it's AusKey authentication process which is used by businesses for submitting quarterly tax statements and more. Written in Java ostensibly for portability between all platforms, but it breaks every time I upgrade OSX versions or Java versions. It's a real pain because it's a reasonably critical business program with no alternative. It gotten to the point where I avoid upgrading anytime around the end/beginning of a quarter because it's usually a couple of hours worth of messing about to fix, and if the various vendors haven't got their act together (oracle, AusKey, browser, OS) it may take a few weeks before a solution is available. Well written Java can avoid that problem, but there's plenty of poorly written java out there. Quote Link to comment Share on other sites More sharing options...
imron Posted June 14, 2014 at 06:25 AM Report Share Posted June 14, 2014 at 06:25 AM Also it doesn't help that Apple is actively working to destroy Java on OSX, much like they did with Flash on iOS. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.