Options

SELECT * FROM posts WHERE tid = 'PA PROGRAMMING THREAD'

14849515354100

Posts

  • Options
    CantidoCantido Registered User regular
    Ah, that did it. I'm going to make it prettier now. Thank you.

    3DS Friendcode 5413-1311-3767
  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Woot427 wrote: »
    Infidel wrote: »
    woot you're not doing anything wrong, if you need a developer that knows a database then you look for one.

    As someone already mentioned you're going to see a swath of shit developers applying. Welcome to hiring! The ones that list "SQL" but can't answer questions about joins or relationships are liars and should never be hired by anyone.

    A lot of developers might not touch SQL or understand the intricacies of data and databases. You'll probably need to advertise specifically for a database-inclined developer, someone that has the right experience probably has reporting or web experience.

    Agreed wholeheartedly. I'm interviewing a lot of younger developers, straight out of school types, as that is what the market is overwhelmed with right now. This is where I see a lot of the 'lying'. If I've gotten to the point in the interview where I know this isn't going anywhere in terms of employment, and they are the fresh out of school type, I usually ask if they'd like some feedback on their resume, etc. I tell a lot of them that mentioning a concept in class does not constitute a skill, and that for those items, they may be better off listing classes they took that are relevant to the job they are applying for. At least this frames it in a way where you can discuss what they learned in the class, how they applied it, as opposed to claiming proficiency and turning a good impression and good conversation into only being remembered as having a misleading resume.

    I think tailoring our ad better for the positions, as some of you mentioned, for a database-inclined developer, will go a long way to attracting the right kind of skillsets.


    It's funny because when I talked with my school's "resume doctor" that beefs up your resume she always that if you learned it in a class put it on there. SQL and C++ are on my resume even though they aren't my strong points at all (especially since I've been doing Java for almost a year). I hate doing that because if a question about it comes up in an interview I hate looking like an idiot, but I also don't like to not be given a chance.

    If that makes any sense. But I'm ALWAYS 100% honest in an interview.

  • Options
    TomantaTomanta Registered User regular
    I think that's what I'm going to struggle with whenever I get around to looking for a (first) programming job again. I'm afraid my resume will look sparse with "Python, basic C#, basic SQL" and "Wrote an python script to check for price changes on Amazon." as the only notable programming experience.

    I mean, I've been programming off and on for 14 years and have toyed with a lot of languages, but I'm not comfortable answering questions on any of them. Including C, and I spent several months adding to and debugging MUD source code. But I haven't touched C in a decade.

  • Options
    Woot427Woot427 Registered User regular
    urahonky wrote: »
    Woot427 wrote: »
    Infidel wrote: »
    woot you're not doing anything wrong, if you need a developer that knows a database then you look for one.

    As someone already mentioned you're going to see a swath of shit developers applying. Welcome to hiring! The ones that list "SQL" but can't answer questions about joins or relationships are liars and should never be hired by anyone.

    A lot of developers might not touch SQL or understand the intricacies of data and databases. You'll probably need to advertise specifically for a database-inclined developer, someone that has the right experience probably has reporting or web experience.

    Agreed wholeheartedly. I'm interviewing a lot of younger developers, straight out of school types, as that is what the market is overwhelmed with right now. This is where I see a lot of the 'lying'. If I've gotten to the point in the interview where I know this isn't going anywhere in terms of employment, and they are the fresh out of school type, I usually ask if they'd like some feedback on their resume, etc. I tell a lot of them that mentioning a concept in class does not constitute a skill, and that for those items, they may be better off listing classes they took that are relevant to the job they are applying for. At least this frames it in a way where you can discuss what they learned in the class, how they applied it, as opposed to claiming proficiency and turning a good impression and good conversation into only being remembered as having a misleading resume.

    I think tailoring our ad better for the positions, as some of you mentioned, for a database-inclined developer, will go a long way to attracting the right kind of skillsets.


    It's funny because when I talked with my school's "resume doctor" that beefs up your resume she always that if you learned it in a class put it on there. SQL and C++ are on my resume even though they aren't my strong points at all (especially since I've been doing Java for almost a year). I hate doing that because if a question about it comes up in an interview I hate looking like an idiot, but I also don't like to not be given a chance.

    If that makes any sense. But I'm ALWAYS 100% honest in an interview.

    Ya, I get a few response where someone in their career center suggested that they put it on their resume based on similar experience.

    What I remember from our 'resume doctor' was to add a relevant coursework section to your resume, for items that perhaps aren't proficient enough to be considered skills but that you've been exposed to and could pick up quickly on. I find that a lot of 'resume doctors' at universities focus so much on getting you the interview that they lose sight on not setting you up for failure by overstating some truly crucial items. It's one thing to claim you are proficient in Microsoft Office and really only be at an intermediate stage, but completely another when it comes to some other list-able skills. I try to find a happy medium of being given a chance by having a good looking resume but not coming across as misleading. Especially for some of these kids, it gives a little more meat to their resume, as they may have a park district job or retail job (in addition to a relevant internship) that really isn't relevant so if they were to remove that they'd have a pretty empty page.

    I need to stop saying 'kids', I only graduated 2 years ago...

  • Options
    InfidelInfidel Heretic Registered User regular
    Hiring is just wading through a lot of shit, doesn't matter the position so long as it's just an open call.

    I know in my university we had a few classes on databases in the abstract that were really good knowledge and simple to apply to a specific database later. Relational algebra, keys and reductions, joins, indexes, etc. It's a simple matter to look into a specific DBMS and figure out where all of that applies.

    I had a lot of experience with databases and SQL from my prior web development experience, but these courses alone would get me an entry level job that requires "SQL" no problem.

    The problem is that these courses are mostly optional, they were very popular but that's possibly just an outlier at my school.

    OrokosPA.png
  • Options
    zeenyzeeny Registered User regular
    edited March 2012
    "What do you mean "cartesian product"?"

    zeeny on
  • Options
    Woot427Woot427 Registered User regular
    Infidel wrote: »
    Hiring is just wading through a lot of shit, doesn't matter the position so long as it's just an open call.

    I know in my university we had a few classes on databases in the abstract that were really good knowledge and simple to apply to a specific database later. Relational algebra, keys and reductions, joins, indexes, etc. It's a simple matter to look into a specific DBMS and figure out where all of that applies.

    I had a lot of experience with databases and SQL from my prior web development experience, but these courses alone would get me an entry level job that requires "SQL" no problem.

    The problem is that these courses are mostly optional, they were very popular but that's possibly just an outlier at my school.

    A lot of the Chicago-area universities, including the one I went to, only have one database class which is of course an intro course. It's very much in the abstract and doesn't go beyond basic insert/select/delete/update syntax. If there are other courses, they are offered one every couple years and are not too popular. To an extent I'm overgeneralizing, I really only give the suggestion of listing coursework where it's obvious that the experience isn't even entry-level. I had a student last week list SQL as a skill, per the advice of his career center, who was only in the first week of the class (trimesters, I guess) and hadn't had a homework assignment yet.

    As an aside, we at one point were entertaining the idea of outsourcing some work, especially some mind numbingly simple work, where really just needed live bodies. We were interviewing the potential development team, got to the point of explaining the project to them, started going over source code, etc, to explain the scope of work. The utility itself that needed to be extended was in PHP at the time and 'PHP' had been said at least 50 times previously in the call, while on a webinar where they could see the source code. Their 'lead' PHP developer bluntly asks, 'is this java?'. You could tell the guy immediately regretted asking, and I genuinely felt bad for the guy. Ultimately we didn't go that route because having a 12 hour difference from your development team just wouldn't work for us, but that was a tough point in the conversation to get past.

  • Options
    zeenyzeeny Registered User regular
    edited March 2012
    I'm trying to think of one line of code that can make you mistake PHP with Java. I'm striking out.

    Edit:
    //This is a tricky one
    

    Maybe?

    zeeny on
  • Options
    CantidoCantido Registered User regular
    How tough is learning Perl after PHP?

    3DS Friendcode 5413-1311-3767
  • Options
    bowenbowen How you doin'? Registered User regular
    Tomanta wrote: »
    I think that's what I'm going to struggle with whenever I get around to looking for a (first) programming job again. I'm afraid my resume will look sparse with "Python, basic C#, basic SQL" and "Wrote an python script to check for price changes on Amazon." as the only notable programming experience.

    I mean, I've been programming off and on for 14 years and have toyed with a lot of languages, but I'm not comfortable answering questions on any of them. Including C, and I spent several months adding to and debugging MUD source code. But I haven't touched C in a decade.

    Your weakness is a strength.

    You may not think so, but it is. This reads "I have robust knowledge of the programming landscape and can adapt and learn new technologies for the task at hand."

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    bowenbowen How you doin'? Registered User regular
    zeeny wrote: »
    I'm trying to think of one line of code that can make you mistake PHP with Java. I'm striking out.

    Edit:
    //This is a tricky one
    

    Maybe?

    That's about the only thing I can think of. Anything to do with variables is out. But that's not code. Unless PHP lets you do things like:
    "This is my string"[3].print();
    

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    Gilbert0Gilbert0 North of SeattleRegistered User regular
    zeeny wrote: »
    "What do you mean "cartesian product"?"

    We're not that bad. We tailer it one of two ways. If you are an OOP (java/C#), we ask stuff "difference between overload and override" or if you are an SQL, "inner vs outer join" and they increase with difficulty from there.

    90% of our code is PLSQL, and when I was hired 4 years ago, I had been shown PLSQL in my databases class AS A CONCEPT. No assignments, just a week showing it off. The Prof was "if you get into databases, you may see this". I was hired because I can explain clearly, able to learn other languages and can adapt (because I was just out of school and basically every 4 months, adapt to a new class).

  • Options
    TomantaTomanta Registered User regular
    bowen wrote: »
    Tomanta wrote: »
    I think that's what I'm going to struggle with whenever I get around to looking for a (first) programming job again. I'm afraid my resume will look sparse with "Python, basic C#, basic SQL" and "Wrote an python script to check for price changes on Amazon." as the only notable programming experience.

    I mean, I've been programming off and on for 14 years and have toyed with a lot of languages, but I'm not comfortable answering questions on any of them. Including C, and I spent several months adding to and debugging MUD source code. But I haven't touched C in a decade.

    Your weakness is a strength.

    You may not think so, but it is. This reads "I have robust knowledge of the programming landscape and can adapt and learn new technologies for the task at hand."

    I never really thought of it as a weakness, just not something easy to convey on a resume without just listing languages and hoping to avoid questions being asked about, say, PHP. I think you just helped solve that problem!

  • Options
    CantidoCantido Registered User regular
    Nvm. I haven't worked with Excel before, but is it possible to combine an XML sheet, Comma Seperated Value File, and Pipe Delimited file into something excel can read?

    3DS Friendcode 5413-1311-3767
  • Options
    zeenyzeeny Registered User regular
    Gilbert0 wrote: »
    zeeny wrote: »
    "What do you mean "cartesian product"?"

    We're not that bad. We tailer it one of two ways. If you are an OOP (java/C#), we ask stuff "difference between overload and override" or if you are an SQL, "inner vs outer join" and they increase with difficulty from there.

    90% of our code is PLSQL, and when I was hired 4 years ago, I had been shown PLSQL in my databases class AS A CONCEPT. No assignments, just a week showing it off. The Prof was "if you get into databases, you may see this". I was hired because I can explain clearly, able to learn other languages and can adapt (because I was just out of school and basically every 4 months, adapt to a new class).

    Oh, I hadn't followed the conversation. Just the last post. There are a shitload of guys who know their DB of choice inside out as well as what the expected result of an operation is, but have no clue of the mathematical definitions behind it.
    From your description though, you were hired because you were cheap;o).

  • Options
    Gilbert0Gilbert0 North of SeattleRegistered User regular
    zeeny wrote: »
    Gilbert0 wrote: »
    zeeny wrote: »
    "What do you mean "cartesian product"?"

    We're not that bad. We tailer it one of two ways. If you are an OOP (java/C#), we ask stuff "difference between overload and override" or if you are an SQL, "inner vs outer join" and they increase with difficulty from there.

    90% of our code is PLSQL, and when I was hired 4 years ago, I had been shown PLSQL in my databases class AS A CONCEPT. No assignments, just a week showing it off. The Prof was "if you get into databases, you may see this". I was hired because I can explain clearly, able to learn other languages and can adapt (because I was just out of school and basically every 4 months, adapt to a new class).

    Oh, I hadn't followed the conversation. Just the last post. There are a shitload of guys who know their DB of choice inside out as well as what the expected result of an operation is, but have no clue of the mathematical definitions behind it.
    From your description though, you were hired because you were cheap;o).

    Well the other 10% is java and java was the language I used through university and co-op jobs.

    And yes I was (note: was) cheap. 4 years later I make almost $20/hour more (hurray for strong union contracts)

  • Options
    Woot427Woot427 Registered User regular
    bowen wrote: »
    zeeny wrote: »
    I'm trying to think of one line of code that can make you mistake PHP with Java. I'm striking out.

    Edit:
    //This is a tricky one
    

    Maybe?

    That's about the only thing I can think of. Anything to do with variables is out. But that's not code. Unless PHP lets you do things like:
    "This is my string"[3].print();
    

    Nah, you can't do that. The only thing I can think of is that it was completely object oriented. It was a data importer tool as we get data from many sources in many formats. I needed to be able to add transports (i.e. sftp, ftp, email) and file types (i.e. delimited, xls, hl7) on the fly so everything extended some base transport or file_type class, etc. Based on all those, there were data source configs that said get the files from there, they are this file type, it's this kind of data, this column number is that field, etc. All they had to do was make the config files editable via a web front end. Maybe they were so used to being way too scripty in PHP that this guy saw classes all over the place and immediately attributed it to Java? That's the only thing I could come up with.

  • Options
    InfidelInfidel Heretic Registered User regular
    That actually is a reasonable answer. Also a good reason to not hire them anyways!

    "Object-oriented PHP looks foreign to me."

    OrokosPA.png
  • Options
    iTunesIsEviliTunesIsEvil Cornfield? Cornfield.Registered User regular
    Gilbert0 wrote: »
    Well the other 10% is java and java was the language I used through university and co-op jobs.

    And yes I was (note: was) cheap. 4 years later I make almost $20/hour more (hurray for strong union contracts)

    What are those? I'm not sure we get those around here... :P
    :cry:

  • Options
    admanbadmanb unionize your workplace Seattle, WARegistered User regular
    That thar sounds like some so-sha-list buullllllshit ta me.

  • Options
    bowenbowen How you doin'? Registered User regular
    Woot427 wrote: »
    bowen wrote: »
    zeeny wrote: »
    I'm trying to think of one line of code that can make you mistake PHP with Java. I'm striking out.

    Edit:
    //This is a tricky one
    

    Maybe?

    That's about the only thing I can think of. Anything to do with variables is out. But that's not code. Unless PHP lets you do things like:
    "This is my string"[3].print();
    

    Nah, you can't do that. The only thing I can think of is that it was completely object oriented. It was a data importer tool as we get data from many sources in many formats. I needed to be able to add transports (i.e. sftp, ftp, email) and file types (i.e. delimited, xls, hl7) on the fly so everything extended some base transport or file_type class, etc. Based on all those, there were data source configs that said get the files from there, they are this file type, it's this kind of data, this column number is that field, etc. All they had to do was make the config files editable via a web front end. Maybe they were so used to being way too scripty in PHP that this guy saw classes all over the place and immediately attributed it to Java? That's the only thing I could come up with.

    Waaaaat.

    Waaaaaaaaaaat.

    The language constructs are different completely and php class code is fucking alien looking compared to java and other c-like languages.

    $variable would've been the biggest giveaway you were working for php. What the dick is my response to your story.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    bowen, that was entirely my point.

    PHP class code is fucking alien looking compare to PHP "code"

    OrokosPA.png
  • Options
    bowenbowen How you doin'? Registered User regular
    Yeah but still, Java? I can still tell this is php code:
    class MyClass {
    
      // singleton instance
      private static $instance;
    
      // private constructor function
      // to prevent external instantiation
      private __construct() { }
    
      // getInstance method
      public static function getInstance() {
    
        if(!self::$instance) {
          self::$instance = new self();
        }
    
        return self::$instance;
    
      }
    
      //...
    
    }
    

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    InfidelInfidel Heretic Registered User regular
    Now compare that to "good ol PHP" spaghetti.

    If you were a spaghetti-slinger, and you saw what you just posted? Well shit, that looks like that filthy Java to me!

    That's the perspective I'm postulating. :lol:

    OrokosPA.png
  • Options
    Woot427Woot427 Registered User regular
    bowen wrote: »
    Woot427 wrote: »
    bowen wrote: »
    zeeny wrote: »
    I'm trying to think of one line of code that can make you mistake PHP with Java. I'm striking out.

    Edit:
    //This is a tricky one
    

    Maybe?

    That's about the only thing I can think of. Anything to do with variables is out. But that's not code. Unless PHP lets you do things like:
    "This is my string"[3].print();
    

    Nah, you can't do that. The only thing I can think of is that it was completely object oriented. It was a data importer tool as we get data from many sources in many formats. I needed to be able to add transports (i.e. sftp, ftp, email) and file types (i.e. delimited, xls, hl7) on the fly so everything extended some base transport or file_type class, etc. Based on all those, there were data source configs that said get the files from there, they are this file type, it's this kind of data, this column number is that field, etc. All they had to do was make the config files editable via a web front end. Maybe they were so used to being way too scripty in PHP that this guy saw classes all over the place and immediately attributed it to Java? That's the only thing I could come up with.

    Waaaaat.

    Waaaaaaaaaaat.

    The language constructs are different completely and php class code is fucking alien looking compared to java and other c-like languages.

    $variable would've been the biggest giveaway you were working for php. What the dick is my response to your story.

    Plus the fact that this file had HL7 mapping in it with multi-dimensional associative arrays out the ass, i.e.
    $options = array(
            'fields' => array(
    				'event' => 'EVN.1.1',
    				'consultants' => array('PV1.1.9.1','PV1.1.9.2'),
    				'firstName' => 'PID.1.5.2',
    				'lastName' =>  'PID.1.5.1'
            )
    );
    

    The class based connection was the only thing I could come up with, not an excuse in any way whatsoever. There is no excuse, especially with me having said PHP so many times.

  • Options
    bowenbowen How you doin'? Registered User regular
    Haha hl7 in php you guys are masochists .

    Yeah I see what you're saying infidel... guy was bad news. I still don't quite understand how he'd not recognize something like woot posted though. But yeah spaghetti slinger hp coders are the worst.

    I like your code though @woot427 , pretty easy to read.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • Options
    Woot427Woot427 Registered User regular
    edited March 2012
    bowen wrote: »
    Haha hl7 in php you guys are masochists .

    Would it have been my first choice? No. We weren't getting HL7 right away, so it was a late addition to the project, so had to shoehorn it in. It ended up working out pretty well, surprisingly. I have a function that breaks the message, it's segments, lists and components into a nice multi-dimensional associative array which means I can use addresses, i.e. the PV1.1.2.1 to walk to that field. Get a templating system in place for 2.3 v 2.5, etc, and it's actually pretty fast.

    The main concern being is there is no way in hell I'm going to write a TCP/LLP connection handler in PHP, but hey, that's what Mirth is for.

    Now, data crunching is one thing, but boy do I laugh about the fact that I have a side project where I'm controlling call flows via PHP....

    Woot427 on
  • Options
    CantidoCantido Registered User regular
    edited March 2012
    I applied for this job, not through Monster.com, but through my school's Career Services. They were understanding regarding my USAF situation, but they asked me a programming question that's really out of the blue for me. It's not in the skills they're looking for either in the job posting, so it must be something obvious I've never heard of. Possibly because I'm still in school?

    * If you have 3 files: 1 XML sheet (sounds fair), 1 CSV and 1 pipe delimited, and each file contains 4 different fields of information about a person, combine the data from each file to produce a tabled layout that can be read into excel

    I've been relearning PHP and MySQL all semester, and am learning jQuery and jQuery Mobile for the first time, but I have never ever heard of CSV and Pipe Delimited until today, nor did I put XML on my resume because even though I know what it is, I haven't learned it as intensely as PHP or worked with it in a project. It makes me feel dumb as hell. He doesn't even want the code. He just wants comments.

    Doing some research, CSV means Comma Separated Value, and they look like this. They seem simple enough. It looks like a database you can make from scratch with nothing but commas separating values (or headers) and a break between rows.
    Year,Make,Model,Length
    1997,Ford,E350,2.34
    2000,Mercury,Cougar,2.38
    

    XML sheets provide metadata. I remember that part. And they can say whatever you want as long as they're consistent and standardized.

    A pipe delimited, like CSV, I have never heard of before, but the idea behind them looks similar to csv, just without the header row.
    Fred|Flintstone|40
    Wilma|Flintstone|36
    Barney|Rubble|38
    Betty|Rubble|34
    Homer|Simpson|45
    Marge|Simpson|39
    Bart|Simpson|11
    Lisa|Simpson|9
    

    I'm imagining something like a PHP file that includes the XML sheet, csv and pipe delimited text file. If each file has four different fields on a person, I'll assume that all three files have the same number of rows and row 1 of one file will be the same person as row 1 on the other (and the first major "person tag" in the XML sheet)

    This page describes making a .xls from scratch. I'm assume you would read in chunks of each file one row (XML bracket) at a time, and start making rows in a similar fashion?

    I feel dumb right now, but the military thing has put me in a bad situation after graduation.

    Cantido on
    3DS Friendcode 5413-1311-3767
  • Options
    Jimmy KingJimmy King Registered User regular
    edited March 2012
    Tomanta wrote: »
    bowen wrote: »
    Tomanta wrote: »
    I think that's what I'm going to struggle with whenever I get around to looking for a (first) programming job again. I'm afraid my resume will look sparse with "Python, basic C#, basic SQL" and "Wrote an python script to check for price changes on Amazon." as the only notable programming experience.

    I mean, I've been programming off and on for 14 years and have toyed with a lot of languages, but I'm not comfortable answering questions on any of them. Including C, and I spent several months adding to and debugging MUD source code. But I haven't touched C in a decade.

    Your weakness is a strength.

    You may not think so, but it is. This reads "I have robust knowledge of the programming landscape and can adapt and learn new technologies for the task at hand."

    I never really thought of it as a weakness, just not something easy to convey on a resume without just listing languages and hoping to avoid questions being asked about, say, PHP. I think you just helped solve that problem!

    I list the languages with a brief description of what my experience with them looks like, that way the interviewer can see that I can find my way around pretty much any language without getting the idea that I'm claiming to be an expert in them. That's actually based on input from the other guys here and helped land me my current job. I also offer up code examples in a wide variety of languages via urls and bring in a couple short ones printed out which make good use of the sort of concepts interviewers tend to ask about. I brought in the source to a Scala OAuth client lib I wrote for this last job and walked the interviewers through it and offered up Perl, Python, Java, and some of the stuff I did for the 7 languages book via urls.

    An example of my descriptions for languages I'm weaker in or haven't touched in a long time is like so:
    • C# - Windows Forms applications for XML document generation and basic ASP.net websites
    • C - Simple console games and applications


    I also describe a few of my more interesting projects using different languages at the end of my resume, again showing that I can work with many languages and get good at anything they need but making it clear what my immediate skill level with any of those languages is.

    Jimmy King on
  • Options
    InfidelInfidel Heretic Registered User regular
    @Cantido

    "Can be read into Excel" is not the same thing as "make an .XLS" just FYI.

    You can create a CSV file as output, for example. That can be "read into Excel" just fine.

    OrokosPA.png
  • Options
    Jimmy KingJimmy King Registered User regular
    Cantido wrote: »
    I've been relearning PHP and MySQL all semester, and am learning jQuery and jQuery Mobile for the first time, but I have never ever heard of CSV and Pipe Delimited until today, nor did I put XML on my resume because even though I know what it is, I haven't learned it as intensely as PHP or worked with it in a project. It makes me feel dumb as hell. He doesn't even want the code. He just wants comments.
    Basically anything can be used as a delimiter between fields in a file, with or without a header row depending on what the thing reading it needs. Pipes, commas, tabs, and semi-colons are all fairly common but you could use the letter "a" if you really wanted to. Commas are the most common but can be troublesome for some data types because the values themselves might have actual commas in them. That problem is solved by putting the value in quotes, but even with a simple solution it occasionally complicates things, depending on what you're working with.

    It's also really fun when you start working internationally. Excel when set for Germany actually creates a semi-colon separated file when they save it as a .csv, rather than using commas as the name and extension suggest.

  • Options
    CantidoCantido Registered User regular
    edited March 2012
    Infidel wrote: »
    @Cantido

    "Can be read into Excel" is not the same thing as "make an .XLS" just FYI.

    You can create a CSV file as output, for example. That can be "read into Excel" just fine.

    Hmm. If csv can be read into Excel as is, than perhaps all three files can be parsed in and changed into one big csv. So it takes in all three files, and one of them is a csv, but a csv is an output.

    PHP has a function called explode() that can take in the pipe delimited and put it's contents in an array, with the "|" character as the break point between the pieces.
    $array = explode("|", $data);
    

    XML also has a way of being broken up into arrays.
    http://codestips.com/php-xml-to-csv/

    Finally, PHP has a function called fgetcsv that makes an array from a csv file. That makes three arrays.

    Making the assumption that there are now have three arrays and each row is one person, yet one person is now split between three different arrays, a loop could build a new csv row composed of one row from each file, before moving on, and when all rows from all three files (again, we're assume they are symmetrical), we would have a csv we could export.

    Cantido on
    3DS Friendcode 5413-1311-3767
  • Options
    Monkey Ball WarriorMonkey Ball Warrior A collection of mediocre hats Seattle, WARegistered User regular
    edited March 2012
    I've absolutely had some problems in the past exporting data to CSV, modifying it in excel, and then reimporting it. MS Office makes some weird assumptions about text that makes this not work for certain data types, unfortunately I've forgotten exactly what type it was or what the specific issue was. In the end I ended up using an open source library to read/write actual Excel files, which fixed the issue.

    Monkey Ball Warrior on
    "I resent the entire notion of a body as an ante and then raise you a generalized dissatisfaction with physicality itself" -- Tycho
  • Options
    quietjayquietjay Indianapolis, INRegistered User regular
    If Excel sees text data in a cell that looks like a number, it may treat it like a number, unless you put a ` character at the beginning of the field. This may cause you to loose data. For example the zip code 00123 could turn into simply 123.

    Become a Star Citizen
  • Options
    CantidoCantido Registered User regular
    edited March 2012
    He never wanted too much specifics, so here is the answer I've written for him so far. Also, it's a Perl company and I'm PHP but they hire PHP all the time and said I could answer the question in a php style. All he wants is a paragraph, rather than code so....
    I would perform the exercise in PHP. To begin, although I would be working with one XML, one CSV, and one pipe delimited, the trick is that Excel can read an CSV as is. So while I'm working with these three files, I would combine them all into one big CSV. I will assume that the files all have the same number of people in the same order. So row 1 of the CSV, row 1 of the pipe delmited, and the first XML bracket to it's closing bracket holds the first customer in between. First, I would use the explode() function to break apart the pipe delimited file and put it in an array, because explode can look for a "|" character to know where to split the data. PHP has a csv version of the fgets() function called fgetcsv() that can break apart a CSV with a comma designated as the break between fields. Finally, the XML file needs to be converted to an array. This has no built in PHP functions but there are plenty of examples available online. I would use an open source libaray or sample function from an online source. At this point we would have three arrays that come from three different files. Following the assumption that all three have the same number of "people" in them, in the same order, we could loop through the same row number of all three arrays, take their content and write their contents all on one larger CSV row. PHP has no function for this so I would write one or use a library. When all rows of all three files are put together, the end result would be one large csv table, which can be imported into Excel.

    In conclusion, the strategy would be:
    1. Import the three files.
    2. Use explode() to convert pipe delimited into one array
    3. Use fgetcsv() to convert csv into one array
    4. Use an open source library to convert XML sheet into one array
    5. Look at the same row in each array and put it's contents into one csv file, and do this for all rows.

    Will this answer be not-retarded?

    Cantido on
    3DS Friendcode 5413-1311-3767
  • Options
    Jimmy KingJimmy King Registered User regular
    Tonight I am learning that running a multi-site django installation where each separate site does not necessarily have the same apps installed can be a total pain in the ass when it comes to South migrations.

    I had apps A and B. B had a model Customer() and A had a model which used B.models.Customer() has a foreign key. B was a site specific app which was intended to only ever have data which is specific to that site, but as requirements rolled in, it turned out A was NOT site specific and neither was B.models.Customer(). So the Customer() model was refactored out to a different shareable app, A was fine to use across multiple sites as is.... or so I thought.

    Today I add a second site. It uses app A but not app B. Even though the current version of app A does not rely on app B, the old South migrations for app A do. What happens when you run unit tests? All of the South migrations are applied in order and it blows the fuck up because app B is not in INSTALLED_APPS for the new site.

    There is a South setting which causes syncdb to be used for unit tests rather than migrations, but I'm hesitant to use that. Having the unit tests run the migrations has on occasion revealed bugs in the migration. The other option is to edit the migration file to not reference app B in current versions... but that feels dirty and wrong and is just asking for crazy problems in the future.

  • Options
    Gilbert0Gilbert0 North of SeattleRegistered User regular
    Cantido wrote: »
    He never wanted too much specifics, so here is the answer I've written for him so far. Also, it's a Perl company and I'm PHP but they hire PHP all the time and said I could answer the question in a php style. All he wants is a paragraph, rather than code so....
    I would perform the exercise in PHP. To begin, although I would be working with one XML, one CSV, and one pipe delimited, the trick is that Excel can read an CSV as is. So while I'm working with these three files, I would combine them all into one big CSV. I will assume that the files all have the same number of people in the same order. So row 1 of the CSV, row 1 of the pipe delmited, and the first XML bracket to it's closing bracket holds the first customer in between. First, I would use the explode() function to break apart the pipe delimited file and put it in an array, because explode can look for a "|" character to know where to split the data. PHP has a csv version of the fgets() function called fgetcsv() that can break apart a CSV with a comma designated as the break between fields. Finally, the XML file needs to be converted to an array. This has no built in PHP functions but there are plenty of examples available online. I would use an open source libaray or sample function from an online source. At this point we would have three arrays that come from three different files. Following the assumption that all three have the same number of "people" in them, in the same order, we could loop through the same row number of all three arrays, take their content and write their contents all on one larger CSV row. PHP has no function for this so I would write one or use a library. When all rows of all three files are put together, the end result would be one large csv table, which can be imported into Excel.

    In conclusion, the strategy would be:
    1. Import the three files.
    2. Use explode() to convert pipe delimited into one array
    3. Use fgetcsv() to convert csv into one array
    4. Use an open source library to convert XML sheet into one array
    5. Look at the same row in each array and put it's contents into one csv file, and do this for all rows.

    Will this answer be not-retarded?

    I think that's good. Your showing that you know several things (what XML is, what csv is, what pipe delimited is), showing logic skills on how you do it and showing that you have some knowledge of PHP (ie function names and how they work).

  • Options
    zeenyzeeny Registered User regular
    This has no built in PHP functions but there are plenty of examples available online.

    http://uk3.php.net/manual/en/function.simplexml-load-file.php etc.

    From my reading of your posts in this thread(I have no other impression), you are vastly overestimating your current ability to work in programming. You need to apply yourself a lot more to do well at an interview or to actually be useful at a job. Personally, if you are serious about trying to get a job, I think a very good advice would be to spend some time with books(introduction to data structures & algorithms and if you have decided to try and get a junior PHP gig, go for Dynamic Web Solutions Made easy as it should be easily accessible to people with limited programming background.
    Good luck with this interview, as it's always possible that "junior" means something different in the US.

  • Options
    SporkAndrewSporkAndrew Registered User, ClubPA regular
    zeeny wrote: »
    This has no built in PHP functions but there are plenty of examples available online.

    http://uk3.php.net/manual/en/function.simplexml-load-file.php etc.

    From my reading of your posts in this thread(I have no other impression), you are vastly overestimating your current ability to work in programming. You need to apply yourself a lot more to do well at an interview or to actually be useful at a job. Personally, if you are serious about trying to get a job, I think a very good advice would be to spend some time with books(introduction to data structures & algorithms and if you have decided to try and get a junior PHP gig, go for Dynamic Web Solutions Made easy as it should be easily accessible to people with limited programming background.
    Good luck with this interview, as it's always possible that "junior" means something different in the US.

    Yeah, in the nicest way possible, from what I've seen in this thread you're lacking even a rudimentary knowledge of PHP / programming. Maybe it's time to take a step back, read up on some of the basics and start again.

    Like zeeny said though, maybe 'Junior' means something different in the US. Over here in the UK you'd be expected to know the basic constructs, have an understanding of what happens and why and not be making the kind of mistakes I've seen you making. My first position was as a Junior Web Developer and that was after I spent 3 years getting an Internet Computing degree with a focus on object-oriented PHP.

    The one about the fucking space hairdresser and the cowboy. He's got a tinfoil pal and a pedal bin
  • Options
    urahonkyurahonky Resident FF7R hater Registered User regular
    Nice, just got notification that one of our best developers here (good source of knowledge) is moving off-site to work as a contractor for another company. This could get ugly.

This discussion has been closed.