The Joys Of Programming

One simple thing you can do if you want to make it easier to read is to use the += operator.

complement = complement + 'T' not_nucleotide = not_nucleotide + 1 is equivalent to: complement += 'T' not_nucleotide += 1

They just showed us that in the next lecture video. I went back and edited the files with it but haven't committed them yet.

For get complement, think about how a dict could make that function into one return line.

So Edwin, how are you liking it so far?

boogle wrote:

For get complement, think about how a dict could make that function into one return line.

This is good advice, too.

One other bit of advice: Write get_complementary_sequence so that it uses get_complement. That way you're only implementing the complement logic once. If you ever have to make changes to it you only make it one place. It will also simplify the get_complementary_sequence logic.

Edwin wrote:

I made another thing! It's a bunch of functions involving DNA sequences and nucleotides. The stuff towards the end is pretty ugly, but it's all I know how to do at the moment.

Pretty neat.

For bonus credits now implement Needlman and Wunsch

SixteenBlue wrote:
boogle wrote:

For get complement, think about how a dict could make that function into one return line.

This is good advice, too.

I really like dicts as an expression of a mapping from domain X -> domain Y. So nice to be able to save that.

SixteenBlue wrote:
boogle wrote:

For get complement, think about how a dict could make that function into one return line.

This is good advice, too.

One other bit of advice: Write get_complementary_sequence so that it uses get_complement. That way you're only implementing the complement logic once. If you ever have to make changes to it you only make it one place. It will also simplify the get_complementary_sequence logic.

This is getting in to the realms of refactoring. Which you should look up and then get in the habit of doing (which I say as someone who always takes the time to refactor his code, ahem, cough)

DanB wrote:
SixteenBlue wrote:
boogle wrote:

For get complement, think about how a dict could make that function into one return line.

This is good advice, too.

One other bit of advice: Write get_complementary_sequence so that it uses get_complement. That way you're only implementing the complement logic once. If you ever have to make changes to it you only make it one place. It will also simplify the get_complementary_sequence logic.

This is getting in to the realms of refactoring. Which you should look up and then get in the habit of doing (which I say as someone who always takes the time to refactor his code, ahem, cough)

Sure, in this situation it's refactoring. I was just trying to give the general advice of only implementing a give piece of logic in one place.

SixteenBlue wrote:

Sure, in this situation it's refactoring. I was just trying to give the general advice of only implementing a give piece of logic in one place.

I think of it as an extension of the "There should be one, and preferably only one, solution to a problem" axiom of PEP8.

boogle wrote:

For get complement, think about how a dict could make that function into one return line.

As soon as I learn what that is and how to use it, I will. Thanks for pointing it out.

trueheart78 wrote:

So Edwin, how are you liking it so far?

I'm enjoying it! It's so much better than learning Java from a big book with a bunch of teachers in college who could barely speak English. It was always difficult to hear and understand them so the frustration factor went through the roof when you combined those two things with their scatter brained nature. I know plenty of other classmates did fine, but many others had to wash out because of these things.

SixteenBlue wrote:
DanB wrote:
SixteenBlue wrote:
boogle wrote:

For get complement, think about how a dict could make that function into one return line.

This is good advice, too.

One other bit of advice: Write get_complementary_sequence so that it uses get_complement. That way you're only implementing the complement logic once. If you ever have to make changes to it you only make it one place. It will also simplify the get_complementary_sequence logic.

This is getting in to the realms of refactoring. Which you should look up and then get in the habit of doing (which I say as someone who always takes the time to refactor his code, ahem, cough)

Sure, in this situation it's refactoring. I was just trying to give the general advice of only implementing a give piece of logic in one place.

The last video lecture I just watched covered this so I'll be doing this today as well.

Edwin wrote:

The last video lecture I just watched covered this so I'll be doing this today as well.

Awesome. Sounds like you're taking a solid class.

I'm doing three classes and one book at the same time. There is some common ground but that's to be expected and I take it as reinforcement.

Two coursera courses, which I would have linked to but AWS is down at the moment. One is done by U of Toronto and the other by Rice University. The third "class" thing I'm doing is Code Academy and lastly I'm reading a book but I am pretty behind on that.

I'm not sure if this thread is a good place for this or not, but you Goojers are a good group and forgiving... right?

I'm interested in learning mobile development, specifically iOS or maybe even Windows Phone. Beyond going through Lifehacker's Learn-to-code beginners guide, I have no programming or development background at all. I work on the social media/community/support team for a website y'all might have heard of or used before, and I think learning more about how this stuff works from the inside out would really help me at my job. Plus, this stuff is just cool, and I love learning.

Could anyone point me in the direction of some very basic, entry level, 101-type of resources online that could get me started? Free resources would be better, but not required. My apologies if there's another thread covering this.

T-Prime wrote:

I'm not sure if this thread is a good place for this or not, but you Goojers are a good group and forgiving... right?

I'm interested in learning mobile development, specifically iOS or maybe even Windows Phone. Beyond going through Lifehacker's Learn-to-code beginners guide, I have no programming or development background at all. I work on the social media/community/support team for a website y'all might have heard of or used before, and I think learning more about how this stuff works from the inside out would really help me at my job. Plus, this stuff is just cool, and I love learning.

Could anyone point me in the direction of some very basic, entry level, 101-type of resources online that could get me started? Free resources would be better, but not required. My apologies if there's another thread covering this.

Edwin wrote:

I'm doing three classes and one book at the same time. There is some common ground but that's to be expected and I take it as reinforcement.

Two coursera courses, which I would have linked to but AWS is down at the moment. One is done by U of Toronto and the other by Rice University. The third "class" thing I'm doing is Code Academy and lastly I'm reading a book but I am pretty behind on that.

Edwin is having success with his approach, clearly.

Go to python.org
Pick a for beginners tutorial and complete it
???
Profit

boogle wrote:

Go to python.org
Pick a for beginners tutorial and complete it
???
Profit

Do not go to python.com, as it is (or used to be) a porn site, and the distinction has bitten me multiple times.

Bonus_Eruptus wrote:
boogle wrote:

Go to python.org
Pick a for beginners tutorial and complete it
???
Profit

Do not go to python.com, as it is (or used to be) a porn site, and the distinction has delighted me multiple times.

FTFY

Bonus_Eruptus wrote:
boogle wrote:

Go to python.org
Pick a for beginners tutorial and complete it
???
Profit

Do not go to python.com, as it is (or used to be) a porn site, and the distinction has bitten me multiple times.

Not anymore.

IMAGE(http://i.imgur.com/745YX.png)

*Legion* wrote:
Bonus_Eruptus wrote:
boogle wrote:

Go to python.org
Pick a for beginners tutorial and complete it
???
Profit

Do not go to python.com, as it is (or used to be) a porn site, and the distinction has bitten me multiple times.

Not anymore.

IMAGE(http://i.imgur.com/745YX.png)

Why did I expect you to check?

He's WFH.
Also Legion is sleazy.

T-Prime wrote:

I'm not sure if this thread is a good place for this or not, but you Goojers are a good group and forgiving... right?

I'm interested in learning mobile development, specifically iOS or maybe even Windows Phone. Beyond going through Lifehacker's Learn-to-code beginners guide, I have no programming or development background at all. I work on the social media/community/support team for a website y'all might have heard of or used before, and I think learning more about how this stuff works from the inside out would really help me at my job. Plus, this stuff is just cool, and I love learning.

Could anyone point me in the direction of some very basic, entry level, 101-type of resources online that could get me started? Free resources would be better, but not required. My apologies if there's another thread covering this.

Here are the two relevant courses I found on Coursera.

https://www.coursera.org/course/andr... https://www.coursera.org/course/digi...

Edwin wrote:

Here are the two relevant courses I found on Coursera.

https://www.coursera.org/course/andr... https://www.coursera.org/course/digi...

Thanks! A buddy also sent me to this Harvard iTunes U Intro to Comp Sci course. Guess I'll start soaking this stuff up now...

boogle wrote:

He's WFH.
Also Legion is sleazy.

So I've decided to explore starting a professional services firm specializing in development and database administration. I meet so many contractors who are absolutely getting taken to the cleaners by contract firms who pocket 40-50% of the billing rate as well as dealing with short-sightedness from employers who don't want to invest in training for their employees.

Long story short, I'm looking at an employee owned model or some sort of co-op where the margins going to the contractors are higher and earmarking a portion of the billing rate towards training for the workers and apprenticeship programs in partnership with local universities.

Just sharing. If anyone has ever thought about this and/or wants to kick around ideas. pm me.

Someone talked about an IT Guild in this thread or another. It sounds similar to that.

Edwin, are you "The Edwin Garcia Links Machine"?

Lex Cayman wrote:

Edwin, are you "The Edwin Garcia Links Machine"?

I figured he had to be.

I am indeed.

Edwin wrote:

Someone talked about an IT Guild in this thread or another. It sounds similar to that.

Any more info than that? Searching for the word "guild" on a gamer site is going to be futile.