Open Side Menu Go to the Top

06-13-2012 , 01:18 PM
Quote:
Originally Posted by jjshabado
I mean a degree is definitely going to help you get an interview. Or more accurately not having one will hurt your chances of getting an interview. And getting an interview will help you get a job.

Maybe I'm misunderstanding?
Not having a degree will definitely not hurt you in my experience. Most ppl care about job experience and that's it. Or will give you their own specific set of questions and tasks to test specific skills they care about. Obviously your personality is very important once you get to the interview.

Having a degree may or may not help you, depending on the type of company it is and the particular person in charge of hiring. All things being equal, sure I'd hire the guy with the MIT CS degree. But all things are never equal.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
06-13-2012 , 02:27 PM
Quote:
Originally Posted by gaming_mouse
you can find entry level stuff and move up. perhaps more importantly, you can write your own projects and contribute to open source ones. that kind of street cred is impressive to anyone, and is direct proof that you can program. i'd hire someone with a long list of impressive github credits over a freshly graduated CS student any day.
If what you said above is true, what are the schools doing wrong? I mean if what you said were true and with tuition as high as it is in the states id say that they are doing something wrong... no idea what it is tho
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 03:48 PM
Quote:
Originally Posted by Ryanb9
If what you said above is true, what are the schools doing wrong? I mean if what you said were true and with tuition as high as it is in the states id say that they are doing something wrong... no idea what it is tho
not necessarily, they are academic institutions, not trade schools.

but some schools, like berkeley, teach much more practical courses using ruby on rails and all the modern best practices for industry. but there's still a debate to be had about whether that's the best approach, if you sacrifice theory to do it. it does help them with job placement, however.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 03:49 PM
Degrees are more effective the fewer jobs you have. Getting your IT job with no degree is harder than your 3rd job. Work experience is usually predicated on your job history, hence the catch 22.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 04:01 PM
Unless you are a supergeek, ignore everything below this line
----------------------------------------------------------------------

Got a bit bored yesterday and so embarked on a little project I have been meaning to do for a while.

I am British but currently live in Vancouver. As such I no longer have access to BBC iPlayer, 4oD etc. I have been meaning to setup a proxy server for a while but never got round to it. I know there are a load of services out there already but I only need it running for a couple of hours a month and anyway, its more fun to do it yourself.

The end result:
Proxy Server running on AWS (Ireland zone) which I can stop and start by sending sms messages from my phone.

Howto:
Setup a new vanilla Ubuntu instance in the Ireland zone (this would also work just as well for anyone from the UK wanting US TV.. just use a US zone).

Install PPTP. Its super easy to setup, i used this tutorial (http://www.dikant.de/2010/10/08/sett...on-amazon-ec2/) it shouldnt take you more than 20 mintutes.

Setup dyndns (AWS dont charge for instances that are 'stopped', but do charge for IP addresses that are not being used. This means that we need to setup a new IP every time we start the box). If you use the above tutorial, the last couple of steps setup dyndns for you. I actually found that by simply installing ddclient, it took me though the setup.

Now for the SMS control. For this you will need a computer that has a permanent internet connection. I used my development server, but there is no reason why you couldnt use a home computer connected to the internet.

Make sure the EC2 command line tools are installed and setup. The ubuntu package is called ec2-api-tools (tutorial here https://help.ubuntu.com/community/EC2StartersGuide)

Create a start and stop scrip. This is my start script (https://gist.github.com/2926069#file_vpn_start) and stop script (https://gist.github.com/2926069#file_vpn_stop). The start script starts the instance, allocates an IP to my account and assigns it to the instance. Note: as the instance boots, dyndns will kick in and update your dyndns to point to the new ip!! The stop script does the exact opposite. Place these scripts in /home/ubuntu/bin.

Finally, you need to be able to send/receive sms messages. I uses a service called smsified which is free (not going to link it but a google search will find it). The setup is very simple, you just need to set up a new 'app' and have the subscription url point to your server. In my case, I set it up on my dev server at port 8811.

The script I used to start and stop my server is a NodeJS (of course ) script so you will need to have it installed, but you could just as easily write a PHP/python script to do exactly the same thing. The script accepts 3 sms messages, Start, Stop and Status, and in each case, sends a reply message with the contents of stdout stderr. The scrip can be seen here https://gist.github.com/2926069#file_gistfile1.js


And thats it... I can now txt to start and stop my VPN. Completely stupid and useless, but kept me busy yesterday
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 04:21 PM
that's awesome
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 04:26 PM
+1
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 04:30 PM
I had a mental lapse when writing a bunch of python scripts a few months back. I used 2 spaces for indentation instead of 4. The code still runs properly but it's a pain in the ass to maintain, and doesn't jive with my vim indent settings.

Can anyone think of a good way to fix this? Simply finding and replacing 2 spaces with 4 is too dangerous imo. Extra points if you know of a way to do this using vim.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 04:40 PM
I'm pretty sure that both vim has a function that will just fix all the indentation in your script for you. Don't know off-hand how to make it happen cause I don't use vim, but pretty sure I've seen that. It's possible that this will mess with the formatting in ways that you don't like, though, if you're not in the habit of using whatever formatting vim things is pretty.

Also, you can just write a script that doubles the number of spaces after a new line, right? Replacing pairs of spaces with 4 spaces could get a little messy, but doubling the number of spaces after a new line seems fine.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 04:43 PM
Quote:
Originally Posted by NoahSD
Also, you can just write a script that doubles the number of spaces after a new line, right? Replacing pairs of spaces with 4 spaces could get a little messy, but doubling the number of spaces after a new line seems fine.
Good thinking. I'll probably go this route. Even if there's an easier way I could use the coding practice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 05:04 PM
Yeah. I can't think of a way to code it that's elegant, but there are lots of ways to hack it. E.g.,

Code:
i = 0
while i < len(text) :
    if text[i] == '\n' :
      count = 0
      while text[i+1+count] == ' ' :
          count += 1
      text = text[:i+1] + ' '*2*count + text[i+count:]
      i += 2 * count
   i += 1
I'm sure that I'm off by one somewhere or something, but that's the rough idea of my hackish solution. I'm sure someone on here can come up with something that's much nicer, but for a problem like this, a hackish solution is prob fine.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 05:20 PM
Quote:
Originally Posted by gaming_mouse
Not having a degree will definitely not hurt you in my experience. Most ppl care about job experience and that's it. Or will give you their own specific set of questions and tasks to test specific skills they care about. Obviously your personality is very important once you get to the interview.
Looking at online job postings (say stackoverflow jobs) at least half of them will state a requirement for a CS or equivalent degree. I can't imagine anyone believing that not having a degree won't hurt you getting a job.

And sure, the more senior the job the less relevant the degree - but for junior and lower intermediate positions there often isn't that much experience to go off of.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 05:32 PM
Quote:
Originally Posted by jjshabado
Looking at online job postings (say stackoverflow jobs) at least half of them will state a requirement for a CS or equivalent degree. I can't imagine anyone believing that not having a degree won't hurt you getting a job.

And sure, the more senior the job the less relevant the degree - but for junior and lower intermediate positions there often isn't that much experience to go off of.
i think this argument has gotten off track. my comment was inspired by someone asking what they should do to get into programming as a career. my answer was to get on the job experience or start contributing to open source projects. i stand by that as a more practical and useful route to his goal than getting a 4 year CS degree and then going from there.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 05:34 PM
select, then "=" will format in vim.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 07:11 PM
Quote:
Originally Posted by NoahSD
Yeah. I can't think of a way to code it that's elegant, but there are lots of ways to hack it. E.g.,

Code:
i = 0
while i < len(text) :
    if text[i] == '\n' :
      count = 0
      while text[i+1+count] == ' ' :
          count += 1
      text = text[:i+1] + ' '*2*count + text[i+count:]
      i += 2 * count
   i += 1
I'm sure that I'm off by one somewhere or something, but that's the rough idea of my hackish solution. I'm sure someone on here can come up with something that's much nicer, but for a problem like this, a hackish solution is prob fine.
regexs to the rescue!

Code:
import re
in = open("myfile.py","r")
out = open("new_file.py","w")
out.write(re.sub("^(\s+).*$","\1\1",in.read(),re.DOTALL))
edit: should also be a 1 liner command with sed if you're on *nix system.

Code:
sed -E 's/^(\s+)/\1\1/g' ./test.py > new.py

Last edited by Neko; 06-13-2012 at 07:21 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 07:13 PM
Ahhh. I considered using re, but I forgot about the \1 trick. v nice.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 09:56 PM
Quote:
Originally Posted by gaming_mouse
not necessarily, they are academic institutions, not trade schools.

but some schools, like berkeley, teach much more practical courses using ruby on rails and all the modern best practices for industry. but there's still a debate to be had about whether that's the best approach, if you sacrifice theory to do it. it does help them with job placement, however.
re: berkeley: what are you basing this on -- the existence of a single online class that is specifically about professional software development? berkeley's CS program is heavy in hard CS. the intro classes are still taught in Scheme, including 61A which uses SICP.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 09:58 PM
if you can't blindly

Code:
:%s,  ,    ,g,
, then your code is formatted poorly (or contains weird literal data in which case goto :your_code_is_formatted_poorly).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 10:08 PM
Quote:
Originally Posted by tyler_cracker
if you can't blindly

Code:
:%s,  ,    ,g,
, then your code is formatted poorly (or contains weird literal data in which case goto :your_code_is_formatted_poorly).
huh. I had no idea you can use ,'s instead of /'s in vim.

** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 10:11 PM
Quote:
Originally Posted by tyler_cracker
re: berkeley: what are you basing this on -- the existence of a single online class that is specifically about professional software development? berkeley's CS program is heavy in hard CS. the intro classes are still taught in Scheme, including 61A which uses SICP.
yeah i didn't mean to imply something general about their CS program, because yeah, i'm basing it off that course and some interviews i saw with the course's instructors. that why i said "if you sacrifice theory".... not that berkeley does. not very clear on my part.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 10:14 PM
Quote:
Originally Posted by tyler_cracker
so ****ing awesome.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 10:16 PM
Quote:
Originally Posted by Neko
huh. I had no idea you can use ,'s instead of /'s in vim.
you can use most punctuation marks, actually
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 10:24 PM
cool.


What are peoples thoughts on TDD? I have tried a couple of times to do full on TDD but I always fall out of the habit after a week or two and end up back at writing my tests after my code.

I think subconsciously I like writing tests after the fact so I can recreate that immensely satisfying moment where my tests hit 100% coverage over and over again.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
06-13-2012 , 10:47 PM
Quote:
Originally Posted by gaming_mouse
you can use most punctuation marks, actually
I knew you could in Perl. I tried it once as an optimistic guess in Vim... and was glad it worked!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m