I'm just trying to refactor some code and I have been told to implement something in terms of a named tuple. I want to add some methods to the named tuple class so that existing code can keep using it without needing changes. What's considered the clearest way to write such code?
One specific question: is there some way of conveniently adding a docstring to a namedtuple class?
class MyClass(namedtuple('MyClass', 'x y')):
"""Docstring...."""
pass
Is this an ok way to go about it?
Oh and this is python 2.7 so no _doc_ unfortunately :(
Well, I told him that I wanted to learn a language where I could be a lot more productive without having to worry about low level details. I chose Python, because thats what MIT and a lot of other good universities start with.
No, it did not go under, its still there, but what happened is that one partner decided to withdraw all the firms money. He was able to do this, because another partner gave him a cheque to withdraw some money for employee salaries.
The cheque was a blank cheque.
So the partner withdrew all the money from the joint account, leaving the business in a horrible situation.
My boss who was planning to hire two more, was not even able to keep us employed.
I'm looking for a job, primarily because I want to gain more practical experience.
I can only learn so much by myself. Working with a team who're about to push a new product to the market is a great opportunity to learn from.
I mean, I could use the experience when I try to push my own idea to Y-Combinator.
First of - (I shouldn't really have to say this) you need to tell the truth. Now - I don't mean "no lying" I mean, if you are asked something like "do you know php?" you should only say "yes" if you really are a php developer, not if you just know a "hello world" in php. This is true mostly for things like MSQL where some people know how to write DB selects etc, but not everyone knows about joins and groups etc... so, firstly - is to be honest, and that includes not bloating your resume.
Second - Experience is the most important thing that potential jobs are interested in - that is the only thing that (unless you simply lied on your resume) can tell them if you really know your stuff.
A job won't keep someone around for long if they don't know what they are doing. So, if someone has lots of experience (especially an extended time at 1 place) that is very beneficial.
During interviews, often times you will be asked to tell them "bad things" about yourself, for instance "what do you feel is your greatest weakness?" or "when was the last time you failed your task?" etc.. questions which are meant to judge your responses, and how you are as a person. You need to already think of examples that are not "so bad" and that can also kind of make you come out alright.
For instance a question like "what do you feel is your greatest weakness as an employee?" Answering "I hate authority and I like doing things on my own" is the worst kind of answer, but wording the exact same thing in a positive way is much better, something like "It is hard for me to work with others and I find that I work best on my own, often times I will continue projects beyond the required so that I can do it on my own - sometimes this clashes with the teams scheduling, but ...
... as a perfectionist it is hard to stop before I feel what I work on is finished"
For instance, a project where you and a friend wrote a game like minesweeper (for example). You could say "A friend and I wrote a minesweeper game" and that's it.. or you could really give a good answer..... like.....
"A friend an I decided to test our programming skills by copying the classic game minesweeper, we first analysed the game - learned how it works, then we started by distributing the work - I was working on the logic, my friend worked on the GUI. We used git to maintain our code, and used a unittesting framework to check our work. Once completed we tested it with some other friends and made sure to fix any bugs that we found until it was perfect"
This is just an example - I am sure you are intelligent enough to understand the general idea I am trying to convey here.
Well, I wanted to take on an ambitious project that involved me having to learn something new, or using my python skills to be absolute max.
And perhaps also to enhance them.
I previously made a tic-tac-toe game in Java, so I was thinking that making a connectfour game in python would be something interesting to make.
At that time, I just finished a course from pluralsight on how to test code
and started learning how to use tkinter properly from Lutz's Programming Python.
So, I thought that something like connectfour would be interesting.
Now, I wanted to do this with someone else.
The reason for this being that most project I've done, I've worked on my own.
And thats all well and good, but getting the synergy working in a team was something that I wanted to pick up as well.
So, I asked falsetru, a member of Stackoverflow and a python veteran.
I made the initial commit, and he worked on testing the code.
I wanted to see how he wrote the testing code, so that I could pick up a few things.
Initially, we chose py.test, but later on moved onto unittest, since our debugger provided enough information regarding the test failures that we did not really need py.test
That is a good trick - if anything you say that would be replaced by nonsense like "the sky is blue" would not change anything about what you are saying? don't say it.
Wow - well.... Then I don't think your skills/experience/personality are going to be the most important things in the decision of the company - but you definitely won't get anything if you fail those... So... I guess that you really need to show your worth above others. Why will it be a good choice to take you specifically .
Initiative, dedication, working well with others, --- let me expand on that before I continue, in a startup, you have usually a small group of people, everyone is working closely together, many aspects of the company are not fully realized, maybe there is no secretary, maybe no QA yet - maybe your job is the developer of the app, but also the webmaster - So you need to be good with others, and have initiative, and be able to do many things at once...
You will usually have lots of workload - strange schedules - sometimes staying a whole night will be important - so you need a flexible schedule.
An advantage you have is that if you are relocated - the only thing you will pretty much have where you mvoe is the job. So you will be able to be there many hours.
My startup is a very close group of about 20 people.
So we are constantly going to lunch together, spending time after hours in bars near work - so I would say being sociable is also important.
@JonClements: a biologist, a chemist and a statistician go out hunting. The spot a deer. The biologist shoots and misses by 5 feet to the left. The chemist shoots and misses 5 feet to the right. The statistician rejoices "yay! we got him!"
No sweat! The great thing about my schedule that I stay up late, so when I come here, even though I'm technically jetlagged, I sleep and wake up with the rest of the family :P
You're somewhere in the UK (if I remember correctly)?