Python Programming & other inferior programming languages thread

Discussion in 'The Mainboard' started by Walt Disney, Jul 15, 2015.

  1. leroi

    leroi -
    Donor
    South Carolina GamecocksGrateful Dead


    C++ is one of the first object-oriented languages. It is difficult to find a more powerful language that is in widespread use, but the learning curve is very steep. You WILL learn memory management, or else you won't survive C++.

    to say it is "Not intuitive" is kind of an understatement IMO. It would imply that intuitiveness was ever a design consideration in the first place. But then some people out there like to write assembly.

    i don't use it because i don't need to extract maximum performance out of the things I do. It is a good language for people who design things like 3D engines for video games. It won't run "on the web", but it is what the most common web server (apache) is written in.
     
    #251 leroi, Oct 14, 2015
    Last edited: Oct 14, 2015
    BellottiBold and Skiddly like this.
  2. leroi

    leroi -
    Donor
    South Carolina GamecocksGrateful Dead


    Javascript was originally a sort of 'community standard' rather than an actual programming language. Mainly because it was interpreted by the browser. So each user's version of Internet Explorer, Chrome, Opera, etc., all have their own unique ways of interpreting the Javascript sent by the webserver. Historically that meant Javascript was a HUGE clusterfuck that required a developer have intricate knowledge of 5 or 6 different sets of browser quirks to be useful. That said, in modern days that is not a problem. Javascript has matured into a network of API's, meaning that there is a ton of pre-written code out there that deals with the browser quirks so the average developer doesn't have to. Google created "v8" which, as I understand it, breathed new life into Javascript -- and it now dominates the web. So the MEAN stack is, in reality, 4 different pieces of software that serve different roles.

    Java is totally different. It is an actual product, developed by Sun Microsystems. compiled by a java compiler into something called "Bytecode." Back in 1995 this was revolutionary. It meant you didn't have to write a Linux version, a Mac version, and a Windows version of the same code. It could run inside a browser applet or on your desktop. However it was always slow as fuck, and required the user to download a Java runtime, something your average grandma struggles with. Today it is showing its age, nobody really "wants" to code in Java, and its the sort of job that would typically involve wading through old legacy code for some corporate monolith.


    i'm not sure about scalable. That's a bit beyond my level of expertise, but my understanding is that Java has its share of bottlenecks.

    Java is 'portable' by the standards of desktop software development, but you really can't compare it to a browser-based language like Javascript.
     
    #253 leroi, Oct 14, 2015
    Last edited: Oct 14, 2015
  3. Where Eagles Dare

    Where Eagles Dare The Specialist Show On Earth
    Donor
    Auburn TigersAtlanta BravesWashington Football TeamAtlanta United

    What are you trying to do?
     
  4. Pile Driving Miss Daisy

    Pile Driving Miss Daisy It angries up the blood
    Donor
    Texas LonghornsAtlanta BravesAtlanta HawksAtlanta FalconsAtlanta UnitedGeorgia Southern Eagles

    Mostly Front-End web development with occasional coding of the back-end. I work with ASP.NET right now but very interested in AngularJS and NoSQL like the MEAN stack mentioned earlier.
     
    Where Eagles Dare likes this.
  5. Joe_Pesci

    Joe_Pesci lying dog-faced pony soldier
    Donor
    Wolfsburg

    apparently they use it to weed out the weak in computer science programs
     
    leroi likes this.
  6. Skiddly

    Skiddly Well-Known Member
    Donor
    Kansas State WildcatsChicago BearsChicago FireUnited States Men's National Soccer Team

    I'm not a CS major. I'm a Mech E major.

    The class is called "Programming for Engineers" and is the only CS class Mech E's are required to take. (I'll be taking more as tech electives though)

    I don't have enough experience to know why they chose C++.
     
  7. leroi

    leroi -
    Donor
    South Carolina GamecocksGrateful Dead

    C , being a language from the early 70's, runs very well on embedded systems. After all these years it is still the standard choice for small devices with limited RAM and limiting processing capability. C++ is newer (early 80s) and has concepts that make it slightly easier to learn than C, and more suitable for desktop software.

    C++ (as opposed to C) seems like an odd choice for mechanical engineering, so my guess is that your university has chosen C++ as a sort of 'intro to programming' for a curriculum whose end goal is to be able to write C for embedded devices.

    Or, like Joe Pesci said, it may actually exist mainly as weed-out course.
     
    #258 leroi, Oct 14, 2015
    Last edited: Oct 14, 2015
    Skiddly likes this.
  8. kennypowers

    kennypowers Big shit like a dinosaur did it
    Donor TMB OG
    UCF KnightsAtlanta BravesJacksonville Jaguars

    It's a good one to learn, I wish they would have taught us C or C++ but instead chose Matlab which, while useful, is not really a programming language and is extremely easy to learn on your own. You'll likely never have to use it again unless you are working with really really big datasets and/or doing a lot of complex calculation on that data. My company develops massively parallel computational physics software so our solvers are written in C/FORTRAN, but the users (me) usually default to Python or bash to post process data.
     
  9. OHW

    OHW Well-Known Member
    Donor TMB OG
    Nebraska CornhuskersSan Francisco GiantsDemocrat

    The interview was all business, no tech stuff discussed at all. Questions about how I'd prioritize features, strategy to get a certain product to market, how many pounds of dog food are sold each year, etc...
     
    Walt Disney and leroi like this.
  10. Skiddly

    Skiddly Well-Known Member
    Donor
    Kansas State WildcatsChicago BearsChicago FireUnited States Men's National Soccer Team

    We actually spend the last 3 weeks on MATLAB. I'd never even heard of it before this course.
     
  11. jorge

    jorge Founder of Post ITT if your team sucks
    Donor
    Penn State Nittany Lions

    Most programs choose either C++ or Java to teach object oriented design. They also like to use those as "first" languages because they teach structure thats applicable to lots of other languages. Its easier to go from Java to something like Python than the other way around.
     
  12. Pile Driving Miss Daisy

    Pile Driving Miss Daisy It angries up the blood
    Donor
    Texas LonghornsAtlanta BravesAtlanta HawksAtlanta FalconsAtlanta UnitedGeorgia Southern Eagles

    I feel like C++ is very rarely taught as a first OO language now. Hell 10 years ago when I took my first programming course, Java was already widely taught.
     
  13. Walt Disney

    Walt Disney #Dawgzy
    Donor TMB OG
    Georgia BulldogsManchester City

    thinking of learning javascript next to pair with python for d3 viz stuff

    hopefully that's a good combo in the big data world for the future
     
  14. Walt Disney

    Walt Disney #Dawgzy
    Donor TMB OG
    Georgia BulldogsManchester City

  15. lomcevak

    lomcevak The suck zone
    Donor TMB OG
    Notre Dame Fighting IrishDetroit LionsDetroit Red WingsDetroit Tigers

    I'm trying to write a program that pulls xml data from the web. This program will pull the data every x seconds and I want the program to run for only 24 hours. Is there an easy way to add some final code to the program that terminates it 24 hours after it is called?

    This is in python, btw
     
  16. Room 15

    Room 15 Mi equipo esta Los Tigres
    Donor
    Auburn TigersAtlanta BravesAtlanta FalconsUnited States Men's National Soccer Team

    I don't really know Python but assuming it can pull system time, just pull it at the beginning then as you loop through check it against the current system time?
     
    lomcevak likes this.
  17. lomcevak

    lomcevak The suck zone
    Donor TMB OG
    Notre Dame Fighting IrishDetroit LionsDetroit Red WingsDetroit Tigers

    I think I got it by doing pretty much that.

    I was getting overwhelmed by all the ppl on stackoverflow that were utilizing seemingly complicated solutions to similar questions. I've begun to notice that a lot of the answers on there seem overly complicated...is it just me?
     
  18. Name P. Redacted

    Name P. Redacted I have no money and I'm also gay
    Donor
    Kansas State WildcatsSeattle Kraken

    i agree
     
  19. OHW

    OHW Well-Known Member
    Donor TMB OG
    Nebraska CornhuskersSan Francisco GiantsDemocrat

    Some of my developers were talking about this. I wonder if they overcomplicate things on there to come off smarter. :idk:
     
    Where Eagles Dare likes this.
  20. Pile Driving Miss Daisy

    Pile Driving Miss Daisy It angries up the blood
    Donor
    Texas LonghornsAtlanta BravesAtlanta HawksAtlanta FalconsAtlanta UnitedGeorgia Southern Eagles

    I mean you might want something more sophisticated and robust if it's part of a bigger solution, but if all you're doing is this one thing then who cares what the solution looks like.

    I assume there's a sort of timeout or interval function in Python? Maybe wrap your logic in that and then have it called every X number of seconds and stop after a certain number of iterations (24 * 60 minutes * 60 seconds / X number of seconds)? I'm also assuming that Python has a way for you to call something like System.exit(0).
     
  21. kennypowers

    kennypowers Big shit like a dinosaur did it
    Donor TMB OG
    UCF KnightsAtlanta BravesJacksonville Jaguars

    One of my scripts runs an external program (vdat) and I have it terminate after 100 minutes

    Code:
           
            vdat = '/home/shelf8/Software/Vdat/vdat_latest'
            timeout = 6000
            poll_period = 10
            p = subprocess.Popen(vdat)
            p.poll()
            while p.returncode is None and timeout > 0:
                  time.sleep(poll_period)
                  timeout -= poll_period
                  p.poll()
            if timeout <= 0:
              p.kill()
            else:
               pass
    
     
    jorge and Name P. Redacted like this.
  22. Where Eagles Dare

    Where Eagles Dare The Specialist Show On Earth
    Donor
    Auburn TigersAtlanta BravesWashington Football TeamAtlanta United

    While not the one writing it, but have interns developing a pretty large rating tool in python. Will have a sql backend and a Web interface. Rate various shipment from packages to trucks to whatever the mode.

    Have had my interns write me 2 programs so far in pythons to complete repetitive tasks. <3 it.

    Need to get python the hard way and knock that out. Done with Coursera, but need more in depth shit. Job should slow down a bit and I can focus more on python learning.

    Walt Disney we use a lot of the D3 graphics. The are pretty sick.
     
    ChopRoll42 and Walt Disney like this.
  23. Walt Disney

    Walt Disney #Dawgzy
    Donor TMB OG
    Georgia BulldogsManchester City

    #jealous

    I'm still trying to decide between Bokeh viz in Python vs D3
     
    Where Eagles Dare likes this.
  24. Pile Driving Miss Daisy

    Pile Driving Miss Daisy It angries up the blood
    Donor
    Texas LonghornsAtlanta BravesAtlanta HawksAtlanta FalconsAtlanta UnitedGeorgia Southern Eagles

  25. lomcevak

    lomcevak The suck zone
    Donor TMB OG
    Notre Dame Fighting IrishDetroit LionsDetroit Red WingsDetroit Tigers

    Anyone used pandas much? I'm trying to learn how to use it with some simple tracking data but do not find it all that intuitive. Either that or I am way more sleep deprived than I thought
     
    Walt Disney likes this.
  26. Catchacold

    Catchacold Z28gY2F0cy4=

    Workers Comp? I am familiar with this. No experience with Argentinians though.
     
  27. PhupaPhever

    PhupaPhever Well-Known Member
    Donor
    TennisNew Orleans SaintsTulane Green WaveNew Orleans Pelicans

    Yes, Workers' Compensation. Are you in the insurance industry? We can talk FROI's/SROI's all day if you want
     
  28. Catchacold

    Catchacold Z28gY2F0cy4=

    Yeah, I work for a large insurance service org... my code has probably parsed your flat files. :chan:
     
  29. J.R. Bob Dobbs

    J.R. Bob Dobbs Fan of: Firing Coaches, Cutting Players

  30. PhupaPhever

    PhupaPhever Well-Known Member
    Donor
    TennisNew Orleans SaintsTulane Green WaveNew Orleans Pelicans

    My team uses two 3 separate ways to transmit to the various states.

    2 of them are vendors. One being HeathTech which scrubs our data and sends it off automatically without data entry, the other being Ebix where my team manually enters the data. The last is an internal process we created to not have to pay a vendor fee. The internal process is for high profile states that fine heavily for late transmissions
     
  31. Catchacold

    Catchacold Z28gY2F0cy4=

    We are a vendor, but also contract with a few states to handle their data collection.
    I manage our SFTP server and some ruby code that routes files to the proper location.
     
    PhupaPhever likes this.
  32. Catchacold

    Catchacold Z28gY2F0cy4=

    so, anyone else use ruby? tried elixir yet? looks pretty interesting.
     
  33. Walt Disney

    Walt Disney #Dawgzy
    Donor TMB OG
    Georgia BulldogsManchester City

    I use pandas all the time
    For cleaning/data manipulation
     
  34. PhupaPhever

    PhupaPhever Well-Known Member
    Donor
    TennisNew Orleans SaintsTulane Green WaveNew Orleans Pelicans

    How did you get involved in the area of the insurance industry?
     
  35. Catchacold

    Catchacold Z28gY2F0cy4=

    First job out of college was with a small EDI vendor. Started out doing web development (still do some, but mostly internal apps)
     
  36. OHW

    OHW Well-Known Member
    Donor TMB OG
    Nebraska CornhuskersSan Francisco GiantsDemocrat

    Anyone who knows SQL pretty well want to make a little money? I have an aptitude test tonight and I don't know SQL at all.
     
  37. kentucky_dawg

    kentucky_dawg Fan of: Georgia
    Donor
    Georgia Bulldogs

    I would definitely take advantage of this if I wasn't loading up a UHAUL tonight. Do you have to take it tonight?
     
    OHW likes this.
  38. OHW

    OHW Well-Known Member
    Donor TMB OG
    Nebraska CornhuskersSan Francisco GiantsDemocrat

    Yeah, they're trying to get the position filled next week and I already committed to getting it done tonight.
     
  39. Room 15

    Room 15 Mi equipo esta Los Tigres
    Donor
    Auburn TigersAtlanta BravesAtlanta FalconsUnited States Men's National Soccer Team

    Not to be a complete dick but does the position require you to know SQL pretty well? Are you concerned that you don't know it at all?
     
  40. kentucky_dawg

    kentucky_dawg Fan of: Georgia
    Donor
    Georgia Bulldogs

    All good. How'd it go?
     
    OHW likes this.
  41. OHW

    OHW Well-Known Member
    Donor TMB OG
    Nebraska CornhuskersSan Francisco GiantsDemocrat

    No, they're hiring a QA person too in a few months. The SQL stuff is a nice to have for them as a stopgap until they get the QA person hired.

    Well. There were only two SQL questions and they were both really simple. Other than that I had to write requirements for simple things. That was most of it.
     
    Room 15 likes this.
  42. clemsontyger04

    clemsontyger04 Two offensive coordinators are better than one
    Donor TMB OG
    Clemson TigersAtlanta BravesCharlotte HornetsCarolina PanthersCarolina HurricanesChelseaTiger WoodsCollege Football PlayoffNational LeagueGame of ThronesUnited States Men's National Soccer TeamBarAndGrillOlympics

    so yeah fuck C#. Having trouble with validation and not sure how to code email addresses since my damn book doesnt even give a damn example or even discuss the option in general. Any help?
     
  43. Walt Disney

    Walt Disney #Dawgzy
    Donor TMB OG
    Georgia BulldogsManchester City


    what did they ask?

    difference in a left and inner join?
     
  44. kentucky_dawg

    kentucky_dawg Fan of: Georgia
    Donor
    Georgia Bulldogs

    Sorry I haven't been able to get to your message sooner, been super busy at work these past couple weeks.
     
    clemsontyger04 likes this.
  45. clemsontyger04

    clemsontyger04 Two offensive coordinators are better than one
    Donor TMB OG
    Clemson TigersAtlanta BravesCharlotte HornetsCarolina PanthersCarolina HurricanesChelseaTiger WoodsCollege Football PlayoffNational LeagueGame of ThronesUnited States Men's National Soccer TeamBarAndGrillOlympics

    you're fine. i always appreciate any help
     
  46. OHW

    OHW Well-Known Member
    Donor TMB OG
    Nebraska CornhuskersSan Francisco GiantsDemocrat

    concatenate and count
     
  47. leroi

    leroi -
    Donor
    South Carolina GamecocksGrateful Dead

    never used C#

    but what do you mean by 'code email addresses' ? is it an issue with character literals?
     
  48. clemsontyger04

    clemsontyger04 Two offensive coordinators are better than one
    Donor TMB OG
    Clemson TigersAtlanta BravesCharlotte HornetsCarolina PanthersCarolina HurricanesChelseaTiger WoodsCollege Football PlayoffNational LeagueGame of ThronesUnited States Men's National Soccer TeamBarAndGrillOlympics


    im supposed to add code to parse email addresses into two parts but split the address into username and domain name in a message box.