Skip to content

Commit 55e8ebc

Browse files
committed
Updates
1 parent bf9e301 commit 55e8ebc

File tree

14 files changed

+189
-39
lines changed

14 files changed

+189
-39
lines changed

README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,31 @@
1-
My learning notes pushed up here so I can refer to them easily. These represent
2-
my understanding of various topics so are probably inaccurate in places and
3-
usually incomplete.
1+
# My learning notes
42

5-
If you are unusually kind you might alert me to things I have wrong via an
6-
issue.
3+
_These are quite likely incomplete and sometimes incorrect_. They are after all
4+
topics that I am still learning. YMMV.
75

8-
YMMV.
6+
7+
# How I think about learning
8+
9+
* Commit to finishing a page, not a book. I should remain nimble about the
10+
depth I learn a particular topic. To commit to a whole book lets the author
11+
decide on the depth that might not be a good investment of time for me.
12+
13+
* Organise notes by topic, not by source. Notes are for
14+
1. Revising what I have learned
15+
2. Express what I have learned to help me find holes in my understanding
16+
Notes organised by topic are more suitable for these goals - I will keep track
17+
of which resources I have finished separately
18+
* It's ok for notes to be messy/wrong. Building them up is an iterative process
19+
and there is as much value in re-reading and improving them as creating the
20+
initial draft.
21+
22+
23+
# Possible approaches to learning stuff
24+
25+
* my learning is a very iterative process that is shaped by questions I ask as a
26+
result of something I read - I follow the trail as long as it seems interesting.
27+
28+
* decide on a structure before I begin a topic, follow a cirriculum decided by
29+
me based on some resource e.g. a book
30+
31+
I'm not sure which of these is best...

c/000-progress.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
# Questions
3+
4+
# TODO
5+
6+
* get extern variables working between files in my Xcode example
7+
8+
9+
# Completed sources
10+
11+
* A Guide to C Programming
12+
* complete

c/TODO.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

c/generic-pointers.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Generic pointers
2+
3+
```
4+
+ allows you to avoid type checking
5+
+ can point to anything
6+
- must be cast to another pointer before it can be dereferenced
7+
- the programmer must keep track of this
8+
- cannot do pointer arithmetic on them
9+
```

ios-swift-objc/000-progress.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
# Questions
3+
4+
5+
Q: can you get at instance variables wihout a getter/setter in objc?
6+
7+
Q: what does @selector do?
8+
9+
Q: What are best practices for managing files in Xcode?
10+
11+
# Completed
12+
13+
A source is _complete_ if I have understood it and taken notes from it i.e.
14+
there is no value in going back to it because I have notes.
15+
16+
* Big Nerd Ranch Guide
17+
* chap 1
18+
* NSScreencasts
19+
* episode 1

ios-swift-objc/big-nerd-ranch-guide.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@ means they will be copied into the resulting `.app` directory.
156156
It seems in Xcode you have to manage your project navigator view and your
157157
filesystem separately.
158158

159-
#### Questions
160-
161-
Q: How does this work in practice?
162-
Q: What are best practices for managing files in Xcode?
163-
164159

165160
### Building Interfaces
166161

ios-swift-objc/ns-screencasts.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,4 @@ TODO: find out more about it
188188

189189

190190

191-
Q: can you get at instance variables wihout a getter/setter in objc?
192-
Q: what does @selector do?
193191

ios-swift-objc/uiwebview.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,44 @@
11
# UIWebView
22

3+
_IIRC these are notes on the new webview in iOS 8+_
4+
35
* has a `delegate` property
4-
???
6+
* which is sent messages while the content is loading
7+
* can implement methods to talk to the UIWebView instance
58

69
* Ancestors: `UIView < UIResponder < NSObject`
7-
* part of UIKit "framework" `import UIKit` to get it
8-
* conforms to 7 interfaces
9-
10-
has a delegate
11-
* which is sent messages while the content is loading
12-
* can implement methods to talk to the UIWebView instance
10+
* part of UIKit "framework" `#import UIKit` to get it
11+
* conforms to 7 interfaces. These are ???
1312

1413

1514
## Plugins
1615

1716
One instance of a plugin object is created for the life of each UIWebView
1817

19-
Plugins are ordinarily instantiated when first referenced by a call from JavaScript. Otherwise they can be instantiated by setting a param named onload to true in the config.xml file
18+
Plugins are ordinarily instantiated when first referenced by a call from
19+
JavaScript. Otherwise they can be instantiated by setting a param named onload
20+
to true in the config.xml file
2021

21-
methods to implement (where???)
22-
onReset - called when the webview is refreshed or moves to different screen
23-
pluginInitialize - called when your plugin is initailzied
24-
action
25-
* this is what the javascript exec() will hit in your class
22+
* methods to implement (where???)
23+
* onReset - called when the webview is refreshed or moves to different screen
24+
* pluginInitialize - called when your plugin is initailzied action
25+
* this is what the javascript exec() will hit in your class
2626

27-
the pattern is that JS initiates all work done on the iOS side
27+
* the pattern is that JS initiates all work done on the iOS side
2828

29-
messages from JS -> iOS
29+
* messages from JS -> iOS
3030
* sent to the action method of the given plugin class
3131
* can have arbitrary num of args
3232

33-
34-
messages from iOS -> JS
35-
* You can use CDVPluginResult to return a variety of result types back to the JavaScript callbacks, using class methods
36-
* You can create String, Int, Double, Bool, Array, Dictionary, ArrayBuffer, and Multipart types. You can also leave out any arguments to send a status, or return an error, or even choose not to send any plugin result, in which case neither callback fires.
33+
* messages from iOS -> JS
34+
* You can use CDVPluginResult to return a variety of result types back to the
35+
JavaScript callbacks, using class methods
36+
* You can create String, Int, Double, Bool, Array, Dictionary, ArrayBuffer,
37+
and Multipart types. You can also leave out any arguments to send a status, or
38+
return an error, or even choose not to send any plugin result, in which case
39+
neither callback fires.
3740
* you seem to return an instance of CDVpluginResult that encapsulates the response
3841

3942

40-
There doesn't seem to be a way for the iOS to send a message to JS without the JS polling
43+
There doesn't seem to be a way for the iOS to send a message to JS without the
44+
JS polling ???

rails/questions.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
Are multiple classes in the same file a bad idea in rails? Even if it just for a
22
while before we refactor it out?
3+
4+
how to do chaining methods in ruby?
5+
6+
how to implement a delegate patter in ruby
7+
8+
9+
AR observers vs callbacks
10+
11+
http://samuelmullen.com/2013/05/the-problem-with-rails-callbacks/
12+
http://blog.crowdint.com/2013/04/23/fun-with-activerecord-observer.html
13+
http://robots.thoughtbot.com/post/9123160250/activerecord-caching-and-the-single-responsibility
14+
http://blog.bignerdranch.com/1658-the-only-acceptable-use-for-callbacks-in-rails-ever/
15+
16+

rails/rails-perf.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Rails Performance
2+
3+
## http://confreaks.com/videos/4107-rdrc2014-speed-up-rails-speed-up-your-code
4+
5+
* Typically we trade off time and memory space when improving performance
6+
* Implications:
7+
* To improve speed, we use more RAM
8+
* To improve RAM usage, we go slower
9+
* There is also the possibility of finding a better algorightm but this is less
10+
common.
11+
12+
Tools
13+
14+
What do we measure?
15+
16+
We measure the performance of individual methods.
17+
? Does it make sense to measure performance of a class?
18+
19+
`benchmark/ips`
20+
* iterations per second
21+
* provides standar deviations
22+
* you give it a block to run as many times as it can in X seconds
23+
24+
* ruby has `benchmark` gem built-in.
25+
26+
Things to watch out for
27+
28+
* Noise - how much other work is your machine doing at the same time? How much
29+
does this change between benchmarks
30+
* It is handy to have a standard deviation here so you can see how noisy
31+
your result is.
32+
"say the slowest was X and the fastest Y and it was mostly in the middle at Z"
33+
TODO refresh std dev
34+
* `benchmark/ips` can show you std dev
35+
36+
37+
stackprof
38+
GC.stat()
39+
GC.stat(:total_allocated_objects) # num of objects allocated in the system since start
40+
allocation_tracer gem

rails/thoughtbot-learn/workshops/intermediate-rails/part-2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151
the table
5252
* why is this bad?
5353

54-
```
54+
```ruby
5555
class Owner
5656
end
5757

@@ -71,7 +71,7 @@ end
7171

7272
he thinks about his data models as db columns first
7373

74-
```
74+
```ruby
7575
# if shout.content is a polymorphic relationship, render will render the partial
7676
# name based on the type - this is a pretty neat pattern!
7777
render shout.content
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Intro to TDD
2+
3+
## Notes
4+
5+
## Questions for Rose
6+
7+
* Talk me through what the `red->green->refactor` means.
8+
* Tell me what these do
9+
* Factory girl
10+
* Rspec
11+
* Shoulda matchers
12+
* Timecop
13+
* Capybara
14+
15+
* What is the command to create a new rails app but not setup the default
16+
testing framework
17+
* Show me the repo you setup with rspec

random.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
* http://comonad.com/reader/2014/letter-to-a-young-haskell-enthusiast/
3+
> s this really what you want to do? Do you want to help people, do you want to
4+
> teach people new wonderful things? Do you want to share the things that excite
5+
> you? Or do you want to feel better about yourself, confirm that you are
6+
> programming better, confirm that you are smarter and know more, reassure
7+
> yourself that your adherence to a niche language is ok by striking out against
8+
> the mainstream? Of course, you want to do the former. But a part of you probably
9+
> secretly wants to do the latter, because in my experience that part is in all of
10+
> us.

regular-expressions/regexps.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# look(ahead|behind)
2+
3+
```
4+
(?<!a)b # matches a "b" that is not preceded by an "a (negative look behind)
5+
(?<=a)b # matches a "b" only if it is preceded by an "a" (positive look behind)
6+
a(?!b) # matches "a" only if it is not followed by a "b" (negative lookahead)
7+
a(?=b)i # matches "a" only if it is followed by a "b" (positive lookahead)
8+
```
9+
10+
Oddities
11+
12+
* JS regexps do not support negative lookahead/lookbehind
13+

0 commit comments

Comments
 (0)