Day 55-56: R you gonna go Windows shopping or give me a Perl necklace

Fun fact: \n does not print out a newline when you program in C#. I discovered this a while back when I was writing scripts that would record our data for us. The simple fix was to type in \r\n. I’m going to get a little political now, so stop reading if you can’t take it. Windows is not a good operating system. UNIX based operating systems are so much better. The command line is better. It doesn’t take up a crap-ton of memory. Most programming languages work on it. Everything is better. Anyways, here’s the thing about regular expressions. I’m a genius when it comes to regular expressions. I’m kidding, of course, but I do find myself using them frequently for even small programming tasks. They’re very useful and I find myself using them all of the time. When I took my Comparative Programming Language course(it’s a class where you learn different programming languages(and learn the theory behind them, but that part’s not as important. Sorry if you’re a theoretical computer scientist)), we had to learn five languages: F#, Perl, Go, C, and Prolog. For those of you non-programming people, Perl is really good at text-processing and one of the things that are needed for text processing are regular expressions, which are patterns you need to find in text( such as five numbers proceeded by the letter a, etc.) and when I started working for him in his Bioinformatics lab, I used Perl a lot. I’m fairly certain this is one of the reasons we all had to learn Perl; in case we would work for him. Anyways, we use Perl all the time, but I also use regular expressions all the time. He tells me regular expressions are not the solution to everything, but it’s always funny how he only wanted me to use part of his lectures. Anyways, I tested my regular expression on this website and it worked, but not in my script. I spent lots of time trying to figure out why it wasn’t working, until I realized that I should have been using \r\n instead of \n. Anyways, I hate Windows because it has the dumbest way to do new lines. At least we’re getting data collected. We even made our first chart!

I don’t know what it means either

This boring part of data processing is trying to fix the errors made by our participants, which requires me to go through the text files and try to figure out what their actual responses were. If only I could have written a Perl script to do that for me, but I can’t always trust computers. Another annoying thing is outliers since we’re not sure what to do with them. Bad responses are important because they show that the participants were confused in a trial, but they also skew the data. Pretty much, outliers suck, I hate manually doing stuff, and Windows sucks. At least I’m learning R (again).


Comments

Day 55-56: R you gonna go Windows shopping or give me a Perl necklace — 1 Comment

Leave a Reply