전체 글47 [책 리뷰] 프로그래머의 길, 멘토에게 묻다 프로그래밍 공부를 시작하려는 사람부터 프로그래머로서 일하고 있는 사람들까지 배울 것이 있을 것이다. 프로그래머로서의 생애에서 맞닥뜨릴 수 있는 문제 상황들과, 그 상황을 헤쳐 나갈 수 있도록 도와줄 해결방안을 제시한다. 실질적으로 실천해볼 수 있는 사항들을 제시해주기 때문에 프로그래머로서 살아가는 동안 종종 다시 펼쳐볼 책인 것 같다. 이 책의 원제는 『Apprenticeship Patterns』인데, 견습생(Apprentice)으로서 사용할 수 있는 패턴들이라는 의미이다. 아무래도 이 부분을 한국어로 깔끔하게 해석하기가 어려워 조금은 다르게 한국어 제목을 붙인 것 같다. 하지만 역시 원제가 책을 더 잘 설명하는 것 같다. 개인적으로는 '긴 여정'이라는 챕터가 참 인상깊었다. 나는 애초에 프로그래머가 되.. 2021. 4. 17. [TIL] 20210412 자바스크립트란? 자바 스크립트의 역사 1995년 브렌던 아이크(Brendan Eich)가 개발: 웹페이지의 보조적인 기능을 수행하기 위해 브라우저에서 동작하는 경량 프로그래밍 언어 1999년 Ajax 등장: 서버로부터 필요한 데이터만 전송받아 변경해야 하는 부분만 한정적으로 렌더링 하는 방식이 가능해짐. 웹브라우저에서도 데스크톱 애플리케이션과 유사한 빠른 성능과 부드러운 화면 전환이 가능해짐. V8 엔진 등장: 빠르게 동작하는 자바스크립트 엔진. 과거 웹 서버에서 수행되던 로직들이 대거 클라이언트(브라우저)로 이동함. Node.js 등장: 브라우저의 자바스크립트 엔진에서만 동작하던 자바스크립트를 브라우저 이외의 환경에서도 동작할 수 있도록 자바스크립트 엔진을 브라우저에서 독립시킨 자바스크립트 실행 환경. 2015년 공개.. 2021. 4. 12. [책 리뷰] 1984년 묘하게 불가능할 것 같으면서도 묘하게 가능할 것 같다. 물론 현실적이지 않은 부분들이 있는 것은 사실이지만(소설은 소설이니), 조지 오웰은 현실과 비현실의 중간 쯤에 위치한 디스토피아적 세상을 치밀하게 만들어놨다. 너무나 노골적이고 친절하게 예측 가능한 전개 방식을 가지고 있지만 묘한 세계관에 몰입하게 된다. 21세기의 대한민국을 살아가고 있는 사람으로서, 처음에는 이 소설이 터무니 없다고 생각되었다. 그러나 그 생각은 20세기를 살아보지 못한 순진함에서 기인하는 것일지도 모른다. 냉전시대에는 많은 사람들이 이 소설을 현실적이라고 여겼고, 1984년과 멋진 신세계 중 어떤 디스토피아가 현실이 될지 논쟁하곤 했다. 다행히도 지금의 세계는 전반적으로 독재보다는 민주주의가 승기를 잡은 것으로 보인다. 그러나 .. 2021. 4. 3. [TIL] 20201228 Authentication from "Scratch" Authentication The process of verifying who a particular user is. We typically authenticate with a username/password combo, but we can also use security questions, facial recognition, etc. Authorization Verifying what a specific user has access to. Generally, we authorize after a user has been authenticated. How to (Not) Store Passwords: NEVER Store Passwords As They Are Rather than storing a pa.. 2020. 12. 28. [책 리뷰] 트렌드 코리아 2021 점수 : 9/10 이 책은 내가 느끼고 있었으나 말로 풀어내지 못 했을 법한 부분들을 짚어서 설명해준다. 안타깝게도 이전에 트렌드 코리아를 읽어본 적이 없었는데, 이번에 결심하고 읽게 되어서 다행이다. 유행에 둔감하고 대중적 취향과 조금은 동떨어진 편이라 이런 책을 읽는 것이 더욱 도움이 되는 것 같다. 다만 어떤 부분은 MZ 세대로서 너무나도 당연하게 느껴져서 조금 놀랐다. 이 책을 읽은 다른 세대의 의견도 궁금해진다. 역사를 되짚어보면 팬데믹은 항상 미래를 앞당겼던 전력이 있다. 변화는 이미 서서히 진행되고 있었지만, 사회적 대변혁은 그 진행속도를 가속화시킨다. (...) 흑사병이 중세시대와 르네상스 시대의 분기점이 됐다. 만약 흑사병이 아니었다면 중세가 20세기까지 지속됐을 수도 있기에, 코로나 1.. 2020. 12. 27. [TIL] 20201226 Express Session & Flash Sessions Sessions are a server-side data store that we use to make HTTP stateful. Instead of storing data using cookies, we store the data on the server-side and then send the browser a cookie that can be used to retrieve the data. It's not very practical or secure to store a lot of data client-side using cookies. This is where sessions come in. Express Session install : npm i express-session Ex.. 2020. 12. 26. [TIL] 20201222 Express Router & Cookies Router An isolated instance of middleware and routes. Helps grouping routes into separate files. express.Router() Example //index.js const express = require('express'); const app = express(); const shelterRoutes = require('./shelters'); app.use('/shelters', shelterRoutes); //shelters.js const express = require('express'); const router = express.Router(); router.get('/', (req, res) => { //'/' is .. 2020. 12. 22. [TIL] 20201221 Data Relationships With Mongo Mongo Relationships We usually have a lot of data and they are interconnected to each other. SQL Relationships Overview Have independent tables and they reference each other to have relationships. To keep up with Many to Many relationships, it is common to create another table that only references other tables. One to Few Embed the data directly in the document Example { name : 'Tommy Cash', sav.. 2020. 12. 21. [TIL] 20201219 Handling Errors in Express Apps Express' Built-In Error Handler Responds with default 500 status code HTML response Custom Error Handlers Error-handling functions have four arguments (err, req, res, next) Example app.use(function(err, req, res, next) { console.error(err.stack); res.status(500).send('Something Broke'); //default error doesn't work anymore. } If you pass anything to the next() function, Express regards the curre.. 2020. 12. 19. [TIL] 20201218 Middleware: The Key To Express Express Middleware Functions that run during the request/response lifecycle. request → Middleware → response Each middleware has access to the request and response objects Middleware can end the HTTP request by sending back a response with method like res.send() Or middleware can be chained together, one after another by calling next() Middleware functions can perform the following tasks: Execut.. 2020. 12. 19. [TIL] 20201217 MongoDB / Mongoose Database Why Use DB DB can handle large amounts of data effectively and store it compactly. DB provide tools for easy insertion, querying, and updating of data. DB generally offer security features and control over access to data. DB (generally) scale well. SQL vs. NoSQL Databases SQL NoSQL Structured Query Language Do not use SQL. (Newer, diverse group) Relational DB : Can relate tables, often .. 2020. 12. 17. [TIL] 20201216 Express / Dynamic HTML with Templating / RESTful Routes Express An NPM package which comes with a bunch of methods and optional plugins that we can use to build web applications and APIs Fast, unopinionated, minimalist web framework for Node.js Start up a server to listen for requests Parse income requrests Match those requests to particular routes Craft our http response and associated content Library vs. Framework Library: The user controls the flo.. 2020. 12. 16. 이전 1 2 3 4 다음