Fully informed and experienced decision

My comment for “Why I Don’t Use Interface Builder”:Β http://blog.teamtreehouse.com/why-i-dont-use-interface-builder

IB is about Organizing, not about Replacing. IB is a tool, not a regulation.
Once you know the limits of IB and developed good programming habits, IB can be extremely useful.

I saw too much terrible spaghetti codes, which could have been helped by adopting MVC principles and knowing the life cycles of UIViewController & UIView instances.
As a way to help those developers to learn about the principles, I show them how to complete a project using IB and later replace it using only codes, to help them to realize the limits of XIB files and see how whole structure is preserved, to show the real reason for using IB: Separating codes.

And once VIEW components are separatedΒ from others, I point out patterns or repetition, which are just configurations at loading of the instances.
Other than iteration, they are not so easy to be solved creatively and quickly, without taking precious seconds, minutes, or hours.
Also, there are more important tasks for fulfilling the requirements of the app, than tasks for calculating frames for labels.

Unless you like it (I saw some people who like it), it’s smart or even necessary to use a tool which was developed to avoid working mechanically. Fortunately in Xcode, we have Interface Builder.

Depending on the characteristic of the projects, the decision to use or not to use IB is totally up to the developers. When they decide not to, I hope it’s fully informed and experienced one, instead of one caused by estranged or uncomfortable feeling toward IB.

Advertisement

Don’t punish Yourself

It’s given as a PUNISHMENT to a student to write sentences REPEATEDLY on a blackboard.

If you are not careful, it’s quite easy to REPEATEDLY paste copies of identical code snippets. Not using iterative methodologies and not trying to find algorithmic solutions, is like let yourself to be in the state of uncomfortable incompetency, which is a PUNISHMENT.

Learning to Adopt Concurrency with Confidence

Recently, I have been enjoying the opportunity to practice implementing concurrency in my software engineering.

Following iOS’s own concurrency programming guidelines, I could develop some confidence in designing the workflow from the initial stage to achieve optimal performance.

By separating works into two types; for UI & not for UI; I have been able to keep queues of operations to be as simple as possible. Also, due to obvious convenience of using Block programming with iOS SDK, I could be able to actually see where asynchronous queues branched out, and merged back, right within the scopes of codes.

Being able to keep tracks of these operations was quite exciting for me, since I used to have great fear in adopting concurrency. But the real issue I have to fear should have been lack of real performance and difficulty in seeing the workflows among the objects.

Fortunately, learning more about the convenience of using NSOperationQueue and the basic criteria for deciding when to branch out and when to merge back, which is; “Are these operations for UI or not?”, I could see what’s actually going on much clearer than ever.

It has been a good case for me to realize it’s not enough to memorize the list of methods, but often it’s more important to know when and where to use them appropriately.

[Korean] About my comment on the book, ‘Real iOS Programming without Interface Builder’

This is the comment I left at following URL: http://www.acornpub.co.kr/blog/406Β  ‘μΈν„°νŽ˜μ΄μŠ€ λΉŒλ” 없이 ν•˜λŠ” 아이폰 리얼 ν”„λ‘œκ·Έλž˜λ°’

It’s about questioning the intention of the book about doing iOS development WITHOUT usingΒ  Interface Builder. It’s written without reading the book yet.

I’m a strong proponent of Interface Builder and its usefulness, and my comment was about that not using the Interface Builder may not be useful for those who need to read this book, who may be new to programming. And ironically to the author’s intention, it may not be able to help creating the application which should be easily maintained and expanded.

(λ‚΄μš©μ„ 읽지 μ•Šκ³ , λ³„λ„μ˜ ν”„λ‘œκ·Έλž˜λ° κ΄€λ ¨ 주제의 λŒ“κΈ€μž…λ‹ˆλ‹€. μ†Œκ°œκΈ€λ§Œ 읽고 적은 κ²ƒμ΄λ―€λ‘œ. 책에 λŒ€ν•œ ν‰κ°€λ‘œ μ˜€ν•΄ν•˜μ§€ λ§μ•„μ£Όμ„Έμš”.)

쒋은 책이 λ‚˜μ˜¨ 것 κ°™μŠ΅λ‹ˆλ‹€. μΈν„°νŽ˜μ΄μŠ€ λΉŒλ”’만’ μ“Έ 쀄 μ•„μ‹œλŠ” λΆ„λ“€μ—κ²Œ λ¬΄μ²™μ΄λ‚˜ μœ μš©ν•˜κ³  μ˜λ―ΈμžˆλŠ” λ‚΄μš©μ„ κ°€μ§€κ³  μžˆμ„ 것이라 μƒκ°λ©λ‹ˆλ‹€.

μ •κ΅ν•˜κ³  λ””ν…ŒμΌν•œ, 100% ν†΅μ œλ₯Ό ν•΄μ„œ λͺ¨λ“  μš”μ†Œλ“€μ„ 일일이 λ‹€ μ±™κΈ°λŠ” 것이 μ€‘μš”ν•œ ν”„λ‘œμ νŠΈλΌλ©΄ λ‹Ήμ—°νžˆ μ½”λ”©μœΌλ‘œ VIEW λ˜ν•œ μ†μˆ˜ λ‹€ κ·Έλ¦¬λŠ” 것이 쒋을 수 μžˆμŠ΅λ‹ˆλ‹€.
λ˜ν•œ, .xib 은 μΌμ’…μ˜ XML λ‘œμ„œ parsing 과정을 거쳐야 ν•˜κΈ° λ•Œλ¬Έμ—, 0.001 μ΄ˆλΌλ„ μ•„κ»΄μ•Όν•˜λŠ” κ²½μš°μ—λŠ” λΆ„λͺ… μ‚¬μš©ν•˜μ§€ μ•ŠλŠ” 것이 λ§žμŠ΅λ‹ˆλ‹€.

ν•˜μ§€λ§Œ, MVC 뢄리법에 λŒ€ν•œ μΆ©λΆ„ν•œ 이해가 λ˜μ§€ μ•Šμ€ 초보 개발자, μ‹€μ œλ‘œ μ‘μš©ν•΄λ³Έ κ²½ν—˜μ΄ 적고, κ·Έ κ°€μΉ˜λ₯Ό μ œλŒ€λ‘œ μ΄ν•΄ν•˜μ§€ λͺ»ν•œ κ°œλ°œμžλ“€μ—κ²ŒλŠ” 잘λͺ»ν•˜λ©΄, VIEW-CONTROL-MODEL 에 μ†ν•˜λŠ” μ½”λ“œλ“€μ΄ μš°ν›„μ£½μˆœ 막 μ„žνžˆλŠ” 결과물을 λ‚΄κ²Œ λ§Œλ“€κΈ°λ„ ν•©λ‹ˆλ‹€. λ§ˆκ°λ‚ μ§œκ°€ κΈ‰ν•œ κ²½μš°μ—λŠ” λ”λ”μš± μœ μ§€λ³΄μˆ˜μ— λ¬Έμ œκ°€ μžˆλŠ” (μ•žμœΌλ‘œ λ¬Έμ œκ°€ 생길) ‘μœ„ν—˜ν•œ μ½”λ“œ’λ₯Ό λ§Œλ“€κ²Œ λ˜μ§€μš”.

μ΄λ ‡κ²Œ 되면 μ†Œκ°œκΈ€μ— λ‚˜νƒ€λ‚œ λŒ€λ‘œ μœ μ§€λ³΄μˆ˜μ— νƒμ›”ν•œ 해결책이 λ˜μ–΄μ£Όμ§€ λͺ»ν•˜κ²Œ λ©λ‹ˆλ‹€.

λΆ„λͺ… ν•˜λ“œμ½”λ”©μ€ μ€‘μš”ν•˜κ³ , μ–΄λ–€ κ°œλ°œν™˜κ²½λ„ λ°˜λ“œμ‹œ 이것을 κ°€λŠ₯μΌ€ ν•΄μ•Ό ν•©λ‹ˆλ‹€. ν•˜μ§€λ§Œ, 이것은 과거의 생산물이 κ°€μ§„ 생λͺ…λ ₯을 μ—°μž₯ν•˜λŠ”λ° 쒋은 것이지, 미래λ₯Ό μœ„ν•œ ν˜μ‹ μ μΈ 결과물을 λ§Œλ“œλŠ”λ° μž₯μ• κ°€ λ˜λŠ” 것이라 μƒκ°ν•©λ‹ˆλ‹€.

κ·Έλž˜μ„œ, ν˜Ήμ‹œλΌλ„ 미래λ₯Ό μœ„ν•΄μ„œ 일해야할 초보 κ°œλ°œμžλ“€μ—κ²Œ 잘λͺ»λœ μŠ΅κ΄€μ„ κ°€μ§€κ²Œ ν•˜κ±°λ‚˜ 자칫 ν˜Όλž€μ„ μ£Όμ§€ μ•Šμ„κΉŒ ν•˜λ„€μš”. 컴퓨터가 ν•  수 있고, 컴퓨터가 ν•΄μ£ΌλŠ” 것이 훨씬 더 쒋은 일인데도 λΆˆκ΅¬ν•˜κ³ , 단지 μžκΈ°λŠ” μ΄λ ‡κ²Œ κ°€λ₯΄μΉ¨ λ°›μ•˜κ³ , μ΄λ ‡κ²Œ ν•˜κ³  μ‹Άλ‹€λŠ” 이유만으둜 ν•˜λ“œ 코딩을 κ³ μ§‘ν•˜λŠ” 것은 λ―Έλž˜μ— λŒ€ν•œ 쒋은 μ€€λΉ„μžμ„Έκ°€ μ•„λ‹ˆλΌκ³  μƒκ°ν•©λ‹ˆλ‹€.

λ˜ν•œ 단지 μ½”λ©˜νŠΈλ₯Ό 많이 남기기 μœ„ν•΄μ„œλ„ 쒋은 이유라고 μƒκ°λ˜μ§€ μ•Šλ„€μš”. μ½”λ©˜νŠΈ λŒ€μ‹ μ— μ½”λ“œ κ·Έ 자체둜 λͺ¨λ“  λ‚΄μš©μ„ ν‘œν˜„ν•  수 μžˆλ‹€λ©΄ 제일 μ’‹λ‹€κ³  λ§Žμ€ 뢄듀이 μ–˜κΈ°ν•˜μ‹œλŠ” 것 κ°™λ˜λ°.

λ°˜λŒ€λ‘œ, μΈν„°νŽ˜μ΄μŠ€ λΉŒλ”λ₯Ό μ“°λ©΄ 그에 λŒ€ν•œ μ„€λͺ…을 ꡬꡬ절절 μ½”λ©˜νŠΈλ‘œ μ–΄λ”˜κ°€κ²Œ 남겨둬야 ν•˜λ‹ˆ, μ•„μ˜ˆ μ½”λ©˜νŠΈ 없이 코딩을 ν•˜κΈ° μœ„ν•΄μ„œλΌλ„ ν•˜λ“œμ½”λ”©μ„ ν•˜λŠ”κ²Œ μ’‹λ‹€κ³  ν•˜λ € ν•˜μ‹  거라면, 적극 동감할 μˆ˜λŠ” μžˆμŠ΅λ‹ˆλ‹€.

μ±…μ˜ λ‚΄μš©μ€ λΆ„λͺ… 좔정컨데 νšŒμ‚¬λ‚΄ λ² ν…Œλž‘ κ°œλ°œμžλ“€μ—κ²Œ λ¬΄μ²™μ΄λ‚˜ 도움이 λ˜κ² μ§€λ§Œ, 책없이 곡뢀할 쀄 μ•„μ‹œλŠ” κ·ΈλΆ„λ“€μ—κ²Œ μ •μž‘ 책이 ν•„μš”ν•˜μ§€ μ•Šμ„ 것도 κ°™κ³ μš”. μ™œ κ·Έλ™μ•ˆ 이것을 곡개적으둜 닀룬 책이 μ”Œμ—¬μ§€μ§€ μ•Šμ•˜μ„ μ§€ 쒀더 λƒ‰μ •ν•œ 고민을 ν•˜μ…¨κΈ°λ₯Ό λ°”λžλ‹ˆλ‹€.

λ‹Ήμ—°νžˆ 그런 고민을 ν•˜μ…¨λ‹€λ©΄, μ–΄λ–»κ²Œ ν•˜λ©΄, μΈν„°νŽ˜μ΄μŠ€ λΉŒλ”μ˜ μž₯점과 ν•˜λ“œμ½”λ”©μ˜ μž₯점을 μœ΅ν•©ν•΄μ„œ μ–‘μͺ½ λͺ¨λ‘κ°€ κ°€μ§„ 탁월함을 같이 μ“Έ 수 μžˆλŠ” 방법도 책에 써주셨을 거라 λ―ΏμŠ΅λ‹ˆλ‹€.

이런 λͺ©μ μœΌλ‘œ λ‘λ§ˆλ¦¬ 토끼λ₯Ό λ‹€ μž‘λŠ”λ° μœ μš©ν•œ λ‚΄μš©μ„ μ“°μ…¨λ‹€λ©΄, 이런 책이 λ‹€λ₯Έ 곳도 μ•„λ‹Œ ν•œκ΅­μ—μ„œ ν•œκΈ€λ‘œ λ¨Όμ € μΆœκ°„λœ 것에 μ—„μ²­λ‚œ μžλΆ€μ‹¬μ„ λŠλΌμ…”λ„ 쒋을 것 κ°™μŠ΅λ‹ˆλ‹€.

My understanding in naming a Class with Prefix

Many source codes, especially those which are written in kinds of C languages, almost always named their classes using prefix.

Intuitively, I adopted to use this way of naming, since many GOOD ones were written in this way. My usual way of learning is by imitating.

As I’ve gained more experience, it became obvious to me why it’s critically helpful for programming.

In my case, I care quite a lot how methods and variables are named. Nicely named ones can help understanding the workflow, minimizing any confusion, thus producing reliable lines of codes.

However, one must careful not to use same syntax for the name of class and instance of it, since it’s difficult to distinguish if one is meant for the instance or the class. It gets worse if the class name and the instance name are as common as something like ‘WebViewController.’

Since naming instances of class happens more often than naming a class, it’s better to name the class with less common way. To make it less common, one of the easiest way is to use a prefix, elongating it to be syntactically different. For example, by using prefixed, ‘FXDWebViewController’ for the class name, one can use ‘webViewController’ as a name for an instance.

Though this instance name is quite common, you can use it as often as possible, without causing the programmer to be confused and even preventing compile time or run-time errors, as long as they are separated by scopes.

It gets even better when one has to use Find and Replace function, since syntactically different words are much easier to be found more quickly.

Also, using the prefix, you can leave it as some kind of signature, claiming your authorship and responsibility on the source codes.

Coding while Commuting

Last week, I’ve been coding while commuting to my office.Β Due to busy schedule for our projects, being required to learn Cocos2d framework, and having own desire to utilize my time to its fullest, I began to train myself to be more comfortable at coding while commuting using bus.

[New York Time] Wi-Fi Turns Rowdy Bus Into Rolling Study Hall
from New York Times
I use long distance bus from my home to subway station, and take a train to the office. It takes about an hour for bus ride and about 20 minutes for subway transit. And almost every time, I’ve been able to take a sit in the bus. In other words, I have an hour at my disposal to do something productive, such as coding.

Typing and building using Xcode works just fine, especially if you are free from needing to use big external display, comfortable desk and chair. When I do occasionally need to use internet, my iPhone 4 can provide personal hotspot. However, coding without internet browsing is not bad at all for me, since it lasts only about an hour.

During this hour of coding, somehow I could be able to focus on my coding more efficiently than while sittingΒ  comfortably in my office. I suspect it’s because of using only Xcode with all other apps being closed, and encouraging myself to find solutions from my own stuff, rather than passively search answers from internet. Also, knowing the bus ride would last only for an hour, I could just focus on finishing miniscule but important matters which could be fixed quickly.

Because of this good experience, I began to have stronger desire to get Macbook Air. This lightweight compact laptop will surely make my coding while commuting more enjoyable, though my current 13″ Macbook Pro is not so bad at all. Guess I need to find about opinions of the developers using Macbook Air with Xcode, and how to deal with disadvantages.

Why having personal projects is critical for a software developer?

I would like to share my reasons, based on what I learned from other developers, to have personal projects outside of professional jobs.

Unless you are a super genius, who can implement newly acquired knowledge flawlessly at once, it’s inevitable to make mistakes in programming based on new ideas. Your choice for solutions will need to be revised repeatedly. It may require number of customizations to accommodate merging these solution with codes from other developers or from older projects, though they are working just fine with no problems by themselves.

At early stage, your professional job will provide this kind of challenges many times, allowing you to grow patience in dealing with errors and testing implementations to find the right solutions. Sooner or later, you may find yourself simply customizing lines of codes for already solved problems. In other words, your job will get easier as your professional experience grows.

Unlike many other professional fields, new technologies are introduced so often, much faster than we can keep up with. But until your project manager or supervising developer decides to use these new technologies, you may only hear about them, if this is the worst case.

Your ability to implement new ideas, that you’ve practiced so hard, will become dull or inefficient. And what makes it more depressing is that this kind of backsliding happens very quickly and drastically. When finally new technologies are required for your projects, it could be embarrassing that your development skill is much like how it were at the early stage of your profession.

Having your personal projects not only mean that you build something, but also that you make own decisions. Because you are in charge, you can test your implementation skill with new technologies without waiting for anything. Whether your attempt to use new ideas is successful or not, you will be prepared to deal with issues later when it’s much needed for real jobs assigned by your employer.

Along with technical decisions, you can also make scheduling one on your own, without any constraints. Of course, once it’s public and used by many others, you may have to listen to their requests and satisfy their demands as soon as possible. However, it’s done proactively, being able to lengthen or even shorten the development time as you like. This sense of controlling time is probably only possible if you have complete ownership of your project, which is by having personal project outside of your job.

Also, no matter how much dedication you’ve put into your works, technically these jobs assigned by your employer are actually not yours. These useful evidences for proving your skills may not be permitted to be used when you are applying for a new job from another company. But with you own personal projects, you can just submit them to be fully analyzed without any guilt but with great confidence. It’s always better to silently show what you are so good at, than just loudly speak about it.

%d bloggers like this: