« first day (1302 days earlier)      last day (2000 days later) » 

7:05 AM
good morning all
 
7:16 AM
pai te ata
later today I have to interview a candidate for a job at our department; she has send an R-script she wrote which has the following code for transforming certain columns of a dataframe to factors:
for (v in names (df)) {
  if (identical(v,"ColA")==FALSE & identical(v,"ColB")==FALSE & identical(v,"ColC")==FALSE) df[,v] <- as.factor(df[,v])
}
What impression about her R proficiency would above code give you?
 
@Jaap I thought you said R-script
...
whenever I see such code, the first thing that comes to mind is that they do not know the concept of vectorization, i.e. one of the biggest advantages of R
 
@Sotos besides that, it also indicates to me that she doens't know how to compare stuff in R
identical(v,"ColA")==FALSE can be rewritten to v != "ColA" which is more the R-way of doing this and much easier to write, read & understand
 
7:34 AM
@Jaap Indeed.
btw...is == the same as identical?
 
we are looking for a candidate who has at least intermediate R knowledge :-/
(someone who can help me in supporting en teaching R to my collegues)
 
> identical(as.character(3), 3)
[1] FALSE
> as.character(3) == 3
[1] TRUE
@Jaap I 'd keep looking :)
 
@Sotos based on her code, that is my impression too; hopefully she can surprise us positively during the interview
 
7:52 AM
@Jaap Are you looking for computer science or more mathematical/statistical background?
 
@Sotos someone with a statistical background with also knowledge about education (it is a researcher position)
 
Hello hello :-)
 
8:24 AM
@Jaap sounds like an interesting position. What is the research subject?
Hiya @Cath :)
 
Hello
@Jaap yep, agree with Sotos, "next please!"
unless you have explicitly asked to use forloops, and identical, and "==" :)
Kind of opposite of codegolf
 
8:45 AM
@Sotos maintaining and further developing a model / procedure for estimating childrens educational achievement capacity (age 2.5 - 12)
@zx8754 @Sotos my first question about this script will be "Why did you choose this script to show us?"
 
9:00 AM
 
9:32 AM
@Jaap to be fair, they might be a fast learner, could be better than "I know it all" candidate. You will get the chance to shape her. For me at least, attitude scores higher than skills.
 
@Jaap This sounds like some other language spoken with R syntax. I've seen C speak through R many many times.
On the up side, at least it's not a tidyverse syntax. :P
 
@Jaap here is the ==FALSE thing again
So more common than I imagined
 
Tried to search for [r] "== FALSE" is:question but search ignores "=="
 
@Jaap In my (limited) experience of recruiting staff, I noticed that it's important for the candidate to have some prior knowledge, but I put much greater emphasis on the rate of being able to learn new stuff. You can test this by throwing the candidate in deep water and see how fast they start learning to swim. Note that the end goal is not that the candidate is an olympic swimmer, but rather to see the process of how they tackle the problem.
3
 
@RomanLuštrik I wish ! traffic jam starts hours before that (I put my kids at school around 7:50, then I'm on my way to the office and I can notice there is way too many people already in their cars...)
 
9:49 AM
With school runs it is impossible to avoid traffic, I think it was shown that traffic is caused mainly because of school runs.
 
@zx8754 @RomanLuštrik True, I'm also asking about that kind of stuff :-)
 
@zx8754 school begins at 8:50 so it's more "before-school stuff" runs ;-) and people starting jobs at 8:00, 8:30 or 9:00. But office start hours depend on school hours anyway...
 
It just means you have to send kids to school via foot or public transport. Problem solved. :)
 
@RomanLuštrik I don't think so or you need to add "and, afterwards, take the same mean (foot/bus/bike) to go to your office"
 
bike+1kid+work is within 5km(?) works, but bike+3kids...
 
 
2 hours later…
11:36 AM
I bike 8 km to work and back.
It takes me 30 minutes of very leisurely cycling. Luckily a lot of it is through a forest.
 
I bike to one of my places of work (I have 2) but the other one is about 12 km away from home, with lots of ups and downs, and I'm afraid, I would be useless at work for the whole day if I went by bike :-/
 
11:59 AM
@RomanLuštrik good to get some exercise & commute in the same time! and it refreshes your mind as well is my own experience :-)
 
And it gives me time to catch up on podcasts.
 
with regards to the job candidate: I'm afraid we will have to look further :-/
too much doubts unfotunately (not only about her R knowledge)
 
12:24 PM
I wish we utilized bikes more here in Cyprus. We have the (bad) mentality of driving everywhere and parking almost inside the building
 
1:01 PM
In developing countries car is seen as status, making cyclists less human.
 
1:20 PM
@zx8754 What if it's true? :)
You have that mentality and little or no infrastructure for cyclists. It's a self perpetuating loop, but who will break it?
 
@RomanLuštrik Are you suggesting there is genetic predisposition to be a cyclist or poor?
 
@zx8754 No, just that maybe we should test that hypothesis. :)
If us cyclists are really inferior on the social scale.
 
Certainly not true in developed countries, there are some rich cyclists with bikes that cost a half a Ferrari.
 
evolution will speak: people taking their car for 3 meters will soon all have diabets and cardiovascular diseases and die ;-)
 
@Cath if that is true all office workers (smarter than average?) will die out faster than car drivers.
 
1:26 PM
@RomanLuštrik the cyclists...?
 
@Sotos no the dead ones.
 
@Cath But probably only after their reproductive burst.
 
@zx8754 very likely, it has started already, no ? only the fit ones will last
@RomanLuštrik but then, their offsprings will know better and start bike ^^
 
@zx8754 an extreme route for them to see the need but sadly it's true
 
1:52 PM
@Cath Hehe, that's a nice theory.
Point in case: smokers.
It is well established it's hazardous to your health and health of people around you, but people still do it.
I would not wager any money on the next generation being significantly smarter.
 
define smart
 
so the bottleneck is people always think it will not apply to them :-/ cars are not addicting though
you smoke when you're a teenager because you're a rebel but then you get smarter, want to stop, but it's not really a piece of cake
 
@Sotos sadly true, recent 2 examples from uzbekistan: 1. the whole bus had to burn down with people in it before gov started looking into getting new busses. 2. Some rich famous girl had to die on pedestrian zebra crossing, before gov started fixing the zebra crossings.
 
2:12 PM
@zx8754 Tragic. They never heard the word "proactive"
 
 
2 hours later…
4:01 PM
@zx8754 Sounds very familiar. Things here move when there's a media outcry, not before. So public shaming really works wonder for us.
 
 
2 hours later…
6:12 PM
good news: finally I got 16GB in RAM at work :-)
(instead of the standard 4)
the bad news: when I want to read an fwf file of 5GB I get the "Cannot allocate vector of size .. " error :-(
 
6:24 PM
@Jaap Check memory.limit() and try increasing it.
And note that the 5GB file doesn't always result in 5GB memory usage.
 
6:51 PM
@m0nhawk already tried that, it sais: 16383
should be enough I guess ....
 
7:12 PM
Did you try gc() before reading file?
 
7:42 PM
yep
 

« first day (1302 days earlier)      last day (2000 days later) »