Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Monday April 07 2014, @02:51PM   Printer-friendly
from the I-forget-more-than-I-remember dept.

I've historically always tried to stick to one or two big languages, because as soon as I start deviating even for a week, I go back to my primaries and find that I, humiliatingly, have forgotten things that anyone else would be completely incapable of forgetting. Now, I'm going to be learning assembly, since that kind of thing falls in line with my interests, and I'm concerned about forgetting big chunks of C while I learn. I already often have the standard open in a tab constantly despite using C since 2012, so my question is, how do you guys who are fluent in multiple languages manage to remember them? Have you been using both for almost forever? Are you all just mediocre in multiple languages rather than pro in one or two?

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2, Interesting) by physicsmajor on Monday April 07 2014, @04:22PM

    by physicsmajor (1471) on Monday April 07 2014, @04:22PM (#27599)

    I am a core dev on a scientific Python toolkit, and in my humble biased opinion Python, today, is far superior to Matlab in ease of use, ergonomics, and capability. Everyone I've sat down with and explained the differences has agreed, but realizing I have a biased view, would you mind elaborating on the issues you encountered with Python?

    Usability? GUI? The Microsoft Office effect (everyone uses ______, including collaborators)? Honest question. Because we need to know to direct and fix any ways we may be failing our users, or failing to attract and keep those who try Python out.

    Thanks.

    Starting Score:    1  point
    Moderation   +1  
       Interesting=1, Total=1
    Extra 'Interesting' Modifier   0  

    Total Score:   2  
  • (Score: 3, Interesting) by umafuckitt on Monday April 07 2014, @05:19PM

    by umafuckitt (20) on Monday April 07 2014, @05:19PM (#27628)

    I'd love to discuss with you, since shifting to Python would be nice. It'll make nicer GUIs (Qt) if I need that and it's a general-purpose programming language, so larger projects and stand-alone applications become easier. The OO is much nicer than even the newer system in MATLAB. I can see all those advantages. The lack of a MATLAB-like GUI isn't a problem for me, I use MATLAB from a console prompt and edit in Emacs. Two things have put me off Python as a MATLAB replacement. The first isn't Python's fault: I have a big MATLAB codebase for my current projects and it would take months to re-code it all in Python. Furthermore, my colleagues also use MATLAB so it would hurt collaboration. In the future, if I start from scratch on a new project, I will consider Python from the outset. The second problem I had was that data analysis in Python with numpy, etc, felt more clunky and less cohesive than MATLAB. Last year I messed around for a month re-implementing some of my MATLAB code in Python. I was successful with a few things but the process didn't convince me that I want to move just yet. The following are the issues I recall having:

    A. I re-wrote my data import MATLAB routines in Python. This involves parsing an XML file and loading a bunch of associated TIFFs and turning them into a multi-page TIFF that can viewed a "movie." This process took a while, as I'm not very familiar with Python, but the resulting class did everything I wanted. I then went on to make an plotting function based on this class. I wanted to make animated graphs (load the multi-page TIFF file, display it as a "movie" and have some dynamic graphs alongside the "movie"). After a few hours screwing around with matplotlib I discovered that it wouldn't do this (at least not fast enough). I searched for a while and chose PyQtGraph. I recall it being a bitch to install all the dependencies for PyQtGraph in OS X. Eventually I got everything together and made my animated plots. The resulting plots arguably look better than MATLAB and the rendering speed was faster. The annoying thing, though, was the amount of time I wasted choosing and installing PyQtGraph and then figuring out the new syntax (different from matplotlib and not intuitive) to make my plots. The fact that there are multiple plotting system with overlapping abilities is a bonus in some ways, but it also disrupts workflow. It also slows you down having to learn the syntactic idiosyncrasies of each package.

    B. The second issue that I had involved re-implementing image registration. I use a MATLAB function from the FileExchange that performs an FFT-based image translation correction. I decided to re-write it in Python as an exercise. As I recall, there were some things I didn't like so much in Python. The linear algebra is a little more long-winded in Python; it's easier to read in MATLAB. I also had issues getting my Python code running at the same speed as the MATLAB original. I wasted quite a lot of time on that [stackoverflow.com] and had trouble finding a fast way to do the FFT. I got some speed improvements by tinkering and I learned more about programming, but I never got it as fast as the MATLAB version due to the FFT issues (I gave up at that point). Overall, it seemed like a lot more work than it was in MATLAB.

    C. The MATLAB toolboxes are often very mature, have excellent documentation, and are consistent with respect to each other. So it's very easy to get started in a new branch of analysis in MATLAB. In Python I felt like I was spending ages on Google trying to find the right package for the job, say image processing. I know there's image processing stuff out there, but there's research involved in finding the package that does what you want, is well documented, etc.

    D. I found a few profilers [stackoverflow.com] for Python, but nothing I liked as much as MATLAB's profiler, which I have used often to improve my coding practices.

    Overall, I can see that Python could work very well as a MATLAB replacement but the amount of time I'd have to put into it it (improving Python skills, researching packages, learning multiple packages where one ought to suffice) isn't worth it for me right now. In the future I hope to switch but I can't justify the time at the moment.