Help me choose

Posts40

[WK2-W] MDX to generate documentation/stories in Storybook 0 Waking up I slept really late today, and I don't want to say why because it's embarrassing. But I probably had like 3 hours of sleep. Thankfully I didn't fall asleep during work, like how? I'm not that tired at the moment and it's already 4:35pm 1 Write markdown documentation & generate stories in Storybook Using markdown brings a complete shift to how you write stories. The best way to under.. 2021. 12. 1.
[WK2-T] Miscellaneous things 0 Waking up I woke up pretty early today, because I went to bed early yesterday. I had a meetup with someone in a while, and just got very tired when I came back. 1 What I did What I did today was basically continuation of digging into markdown documentation for storybook. I've been writing some stuffs that will be helpful for the devs too. There were lots of digging arounds, so really would lik.. 2021. 11. 30.
[WK2-M] Bamboo CI -> Chromatic -> Slack Webhook, MDX 0 Waking up Welp, I slept late today as well. But whatever, I still managed to wake up before 9 and that's all that matters. Dragging my feets, I took a shower and got back to the monitor. Dual monitor honestly is a requirement these days. 1 Bamboo issues When I tried running Bamboo this morning (through ./bin/start-bamboo.sh), I got an error. Here are the steps I took to reinstall Bamboo: 1. Le.. 2021. 11. 29.
[WK1-F] Bamboo CI + git + chromatic, Meetings 0 Waking up I started not showering & waxing hair in the morning... because I wake up at 8:40 lol. (well I can still take shower but hmmm I'm bit tired then). I usually end up showering after lunch. 1 Bamboo CI + git + chromatic Today, I worked on making my private repository connected to continuous integration system of Bamboo CI. This is important because DFD's build is done on Bamboo. One thi.. 2021. 11. 26.
[WK1-Th] Storybook Documentations 1 Storybook best practice: factory pattern for dynamic argument binding of components & easier documentation In Storybook, multiple stories are written for each component (each story representing a snapshot of certain set of props). Here are two possible stories: export const Primary = () => ( ); export const PrimaryDisabledButton = () => ( ); We notice that there's 1) duplication 2) compile-tim.. 2021. 11. 25.
[WK1-T] Storybook, Chromatic (Storybook deployment), Backlog refinement meeting, Getting to know DFD better Disclaimer: any opinions implicitly or explicitly presented here are my own opinions and experiences, and do not represent those of the company. Let me know if there are any issues with any of these materials. 0 Waking up I woke up at 8. I was waking up without an alarm, and I wasn't that tired even though I slept at 1am ish (and day before I slept at 4am!) My heart was beating so hard in the mo.. 2021. 11. 23.
[WK1-M] Goal setting, Pull repository 0 What product? The current product (DFD) I'm working on is a product created in response to surging covid patients - it's a portal where patients can check their symptoms and deal with lots of other various clinical-related matters. Before this product, the existing portal only allowed existing, registered patients to do so, but now anonymous patients (who probably newly encountered covid and t.. 2021. 11. 22.
Cool, you are in the team. Now what? Disclaimer: All views and opinions are my own, and do not reflect those of the company. So today is the day I started my internship. It's a pretty big company in New Zealand. I chose this company because it has a good reputation for being a good software engineering company. In the last internship, I was part of a company that is focused on delivering a product quickly - important for company gr.. 2021. 11. 22.
Setting an overlay for textfield (on the left) This functionality is actually super easy to implement, if you are familiar with how UITextFieldDelegate works in objective C (an article was written about this 2 articles ago). I had to find a way to do something like this: This is done like this: // // ViewController.m // Tutorial // // Created by Developer on 9/02/21. // Copyright © 2021 Developer. All rights reserved. // #import "ViewControl.. 2021. 2. 12.
Understanding the logic behind credit card format mask filter So if you recall from my previous article, you saw that there was a logic to make sure that each key press results in a text that is in the format xxxx xxxx xxxx xxxx. Here's a kind of refactored version of that code: (all of the code below belongs to the @implementation of viewcontroller.m, that uses protocol UITextFieldDelegate, which is set as a delegate for a textfield) - (BOOL)textField:(UI.. 2021. 2. 12.
Credit card format masking (xxxx xxxx xxxx xxxx) Introduction Recently - actually around a week ago - I was tasked to find a way to do certain format manipulation to a credit card field textfield. It was more of a decorative purpose than anything else, but he just wanted the credit card field to have 16 numbers, with space between each pair of 4 numbers. You know, rather than 4111111111111111, have 4111 1111 1111 1111. It would be used for the.. 2021. 2. 10.
Objective C block syntax (method signature, anonymous block) It's common to define method signature and provide an anonymous call-back block to it. (this is common when you are doing completion handler). The syntax is sort of weird, though it's much better when you get used to it. There are two syntaxes you need to be aware of when dealing with blocks. First is defining interface, and second is implementing that interface with a block. Suppose the interfa.. 2021. 1. 29.
Using OHHTTPStubs to mock response header and body This is essentially combining what we've learnt in the previous two posts, and extending it a little further (only a little further). Let's firstly look at the code. - (void)testExample { [HTTPStubs stubRequestsPassingTest:^BOOL(NSURLRequest *request){ return [request.URL.host isEqualToString:@"dev.windcave.com"]; } withStubResponse:^HTTPStubsResponse*(NSURLRequest *request){ return [HTTPStubsRe.. 2021. 1. 28.
Using cocoapods for using OHHTTPStubs module in Objective-C As it is always the case with adapting to a new technology, you need to research quite a while to be able to construct something substantial within that technology. Cocoapods is an 'easy' way to import libraries in objective-c/swift just like gradle or maven in Java. We just need to pass across some hurdles before getting used to the workflow. Skip the following section if you want to quickly se.. 2021. 1. 28.
[Long post] Create a unit test for asynchronous method (NSURLSessionDataTask) in Objective C You would ideally want to test some methods so you are sure that the functionalities have a robust implementation. Here's how to create unit test, and test a method that makes an asynchronous request using NSURLSessionDataTask. I'll set everything up from scratch, so you or I can follow it in the future. First, set up a new project. This framework just means that you aim to create a .framework f.. 2021. 1. 28.
Simplest code for creating a post request // // main.m // RequestToWindcave2 // // Created by Developer on 18/01/21. // Copyright © 2021 Developer. All rights reserved. // #import int main(int argc, const char * argv[]) { @autoreleasepool { NSMutableDictionary *requestMap = [[NSMutableDictionary alloc] initWithCapacity:32]; requestMap[@"type"] = @"purchase"; requestMap[@"amount"] = @"10.00"; requestMap[@"currency"] = @"NZD"; requestMap[.. 2021. 1. 18.
How to retrieve response code from nsurlrequest When you make completion handler for NSURLSessionDataTask, cast NSURLResponse type to NSHTTPURLResponse type, then use statusCode method to retrieve the status code. Then you can cast it to (long) type, and use %ld for format specifier when reading that long value with NSLog. NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *re.. 2021. 1. 18.
JSON post request on Objective C Yeah, post request; one of the tasks that requires certain level of understanding of what http request requires (header (including auth, content type) and body (json)), but also some expertise of the language. I've managed to make a json post request on objective c, though the asynchronous behaviour was only awaited through while loop (-.-). But asynchronous handling is not the most important pa.. 2021. 1. 15.
How to make a get request with Objective c #import #import "GetRequest.h" @implementation GetRequest - (NSString *)execute:(NSString *)url{ //create url request with url NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:10]; [request setHTTPMethod: @"GET"]; NSError *requestError = nil; NSURLResponse *urlResponse = nil;.. 2021. 1. 14.
Json serialisation on Objective-C // // main.m // NSURLTest // // Created by Developer on 14/01/21. // Copyright © 2021 Developer. All rights reserved. // #import #import "Person.h" #import "GetRequest.h" int main(int argc, const char * argv[]) { @autoreleasepool { // GetRequest *request = [[GetRequest alloc] init]; // NSLog(@"%@",[request execute:@"https://jsonplaceholder.typicode.com/todos/1"]); NSDictionary *dictionary = @{ @.. 2021. 1. 14.