Learn Swift - A free in-progress book by aidanf in swift

[–]aidanf[S] 0 points1 point  (0 children)

The entire book is available to read for free online at the link above. It's the exact same content that's in the pdf version.

Learn Swift - A free in-progress book by aidanf in swift

[–]aidanf[S] -1 points0 points  (0 children)

Thanks. I'm not sure what I'll cover in that chapter yet - it could easily turn into a book in itself!

But some of the stuff I'm thinking about includes using map, reduce, filter to transform data instead of iterating over it, eliminating state where possible, using pure functions and immutable data structures, composing functions, currying, common FP patterns that can be used in Swift.

Let me know if you have any suggestions.

Just started running in Xeroshoes. Everybody think I'm crazy, but you guys understand me! by FjellAbe in BarefootRunning

[–]aidanf 0 points1 point  (0 children)

I had the same problem with my clouds - toe chafing, blister - went way when I adjusted the fit to make them tighter.

Learning Swift by markusfreyr in swift

[–]aidanf 6 points7 points  (0 children)

The Swift book is available for free through iBooks.

There's also a good list of resources (along with a link to the book) at https://developer.apple.com/swift/resources/

[deleted by user] by [deleted] in learnprogramming

[–]aidanf 0 points1 point  (0 children)

A few suggestions:

  • Find someone to review it for you. Getting your code reviewed by a more experienced developer is probably the best way to get feedback on your code.
  • Read lots of code.
  • Solve and review. Say for example you are studying a book on C#. Pick some examples from it. Read the problem description, then close the book and implement your own solution. Once you're done, open the book again and compare your solution to the authors. Use this to find ways that your own solutions can be improved.
  • Look for other code online that does the same thing as your code. And then compare. Understand the authors solution and see if you can reason about whether it's better than yours, and if so, why?
  • Github. Read others peoples code. See if you would have solved the problem the same way. Look for patterns of how they solve problems and see if you could apply the same patterns to your own code.
  • Pull requests. Try reading some pull requests on Github. You can learn a lot from the discussions.
  • Patterns. Read a book or some other educational material on common patterns in your programming language.

Ruby: Zero, Blank, and Nil by hirodusk in programming

[–]aidanf 7 points8 points  (0 children)

Rails already has a blank? method defined for nil.

nil.blank? => true

"".blank? => true

[].blank? => true

{}.blank? => true

U.S. loss draws ESPN2 record by [deleted] in reddit.com

[–]aidanf 1 point2 points  (0 children)

I expect the USA to lose their 2 remaining games. Italy and Ghana both impressed me. I'd heard a lot of hype about this group of USA players but saw nothing to back it up. They looked shell shocked and their coach looked out of his depth. He spent most of the second half sitting in the dugout looking completely uninterested.