Интервью SPJ на channel 9: http://channel9.msdn.com/Blogs/Charles/YOW-2011-Simon-Peyton-Jones-Closer-to-Nirvana
на реддите: http://www.reddit.com/r/haskell/comments/nf4kg/simon_peytonjones_closer_to_nirvana/
понедельник, 19 декабря 2011 г.
how to become a better programmer
- Programming. Working on interesting projects
- Working with people far smarter than myself
- Always listening to what others have to say, regardless if they're junior, intermediate, senior or guru
- Learning other frameworks/languages, and seeing how they do things, and compare that to stuff that you already know
- Reading about patterns, best practices, and then examining your stuff and applying those patterns where necessary
- Consciously try to improve. Never stop learning
- Read: books, websites, blogs
- Read other people's code
- Hit the gym regularly
- Start a Pet project
- Contributing to/participating in open-source projects
- Competing in TopCoder Algorithm contests.
- Solve problems on Project Euler
- Challenge yourself with extracurricular activities (dancing, board games, musical instrument)
- Learn English (for Russian Software Engineers only)
Links:
http://programmers.stackexchange.com/questions/44177/what-is-the-single-most-effective-thing-you-did-to-improve-your-programming-skil
http://stackoverflow.com/questions/82639/how-to-become-a-better-programmer
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer/
http://www.codinghorror.com/blog/2007/01/how-to-become-a-better-programmer-by-not-programming.html
Ярлыки:
programming,
self-improvement,
skills,
stackexchange
четверг, 15 декабря 2011 г.
Unit-Testing SICP
Recently while reading SICP I got an idea of using unit-testing techniques to perform the exercises. This is a excellent way to practice both SICP and unit-testing. Because of using MIT Scheme, my choice fell on the library "test-manager" by Alexey Radul. It is really easy to use and contains all required features)
So, let's try to use it for the exercise 1.16.
Run:
Oops! I completely forgot about condition when the exponent n is zero.
Fix it:
Run it again:
That's it!
So, let's try to use it for the exercise 1.16.
Design a procedure that evolves an iterative exponentiation process that uses successive squaring and uses a logarithmic number of steps, as does fast-expt.
; code
(define (fast-expt b n)
(define (iter a b n)
(cond
((= n 1) (* a b))
((even? n) (iter a (* b b) (/ n 2)))
(else (iter (* a b) b (- n 1)))))
(iter 1 b n))
; tests
(load "test-manager/load.scm")
(define-each-test
(assert= 1 (fast-expt 2 0))
(assert= 2 (fast-expt 2 1))
(assert= (expt 2 8) (fast-expt 2 8))
(assert= (expt 2 6) (fast-expt 2 6)))
(run-registered-tests)
Run:
mit-scheme < ex1_16.scm
1 ]=> (run-registered-tests)
Oops! I completely forgot about condition when the exponent n is zero.
Fix it:
(define (fast-expt b n)
(define (iter a b n)
(cond
((= n 0) a)
((even? n) (iter a (* b b) (/ n 2)))
(else (iter (* a b) b (- n 1)))))
(iter 1 b n))
Run it again:
1 ]=> (run-registered-tests)....
4 tests, 0 failures, 0 errors.
That's it!
Ярлыки:
MIT Scheme,
Sicp,
test-manager,
unit-testing,
xUnit
среда, 14 декабря 2011 г.
Список книг по Computer Science и IT
Появилось свободное время и огромное желание чего-нибудь такого почитать, чтобы стать чуть умнее) Пока остановил свой выбор на SICP (когда-то давно смотрел видео лекции, но уже почти ничего не помню), а остальные книжки взял на заметку.
Список:
Functional Programming:
Список:
- Don Knuth. The Art of Computer Programming
- Structure and Interpretation of Computer Programs
- Compilers: Principles, Techniques and Tools
- Cormen. Introduction to algorithms
- "Gang of Four" Design Patterns book
- The Mythical Man-Month
- Concepts, Techniques and Models of Computer Programming
- Douglas Hofstadter. Gödel, Escher, Bach
- Martin Fowler. Patterns of Enterprise Application Architecture
- Martin Fowler. Domain Specific Languages
- Artificial Intelligence: A Modern Approach
- Code Complete (2nd Ed) by Steve McConnell
- Pragmatic Programmer
Functional Programming:
- Learn You a Haskell for Great Good
- Types and Programming Languages by Pierce.
- Purely Functional Data Structures by Chris Okasaki
- The Haskell Road to Logic, Maths and Programming. Kees Doeats & Jan van Eick
- Real World Haskell
- Tanenbaum. Structured Computer Organization.
- Tanenbaum. Operating Systems: Operating System Design and Implementation
- Tanenbaum and Wetherall. Computer Networks
- Tanenbaum. Operating Systems
- Herb Sutter. Guru Of the Week
- Jeffrey Richter. CLR via C#
- Jeffrey Richter. Windows via C/C++
- Stroustrup: The Design and Evolution of C++
- Modern C++ Design
- http://www.reddit.com/r/compsci/comments/gprp0/is_there_a_list_of_the_canonical_introductory/
- http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read
- http://stackoverflow.com/questions/143760/what-books-should-i-read-to-have-an-undergraduate-education-in-computer-science
- http://stackoverflow.com/questions/5489432/sicp-equivalent-for-haskell
- http://blog.stackoverflow.com/2008/07/podcast-12/
- http://stackoverflow.com/questions/302270/what-is-the-best-book-for-learning-about-algorithms
Ярлыки:
книги,
books,
Computer Science,
CS,
Knuth,
self-improvement,
Sicp
Подписаться на:
Сообщения (Atom)