vi
stringlengths
846
10.5k
en
stringlengths
799
10.5k
Chuyện ngôn lù,… nhầm, ngôn tình có thật 100% của tác giả sau 1 tháng trời ở Trung Quốc. Độc giả nào không tin có thể chuyển qua đọc những bài khác của series . Chuyện có nhiều cảnh 18+ nên trẻ em có thai và phụ nữ dưới 18 tuổi không nên đọc. Tôi vẫn còn nhớ, ngày đầu tiên tôi biết Tiểu Mễ là vào một ngày cuối hạ đầu thu. Lần đầu gặp mặt, nàng khoác trên người một bộ váy trắng, cao nhã, thoát tục không vướng chút bụi trần, tựa như thiên sứ lạc bước xuống nhân gian. Trông thấy tôi, nàng khẽ cười, lặng im không nói một lời nào, rồi e lệ theo tôi về phòng. Tay tôi ôm chặt thân hình mong manh dễ vỡ của Mễ Mễ, cứ như thể chỉ một cơn gió nhẹ cũng có thể cuốn nàng đi mất. Về đến phòng, tôi vội vàng ôm chầm lấy Tiểu Mễ, nhẹ nhàng cởi bỏ từng lớp áo bên ngoài, như thể sợ nàng đau. Cái cảm giác bóc tem, dần dần cởi bỏ y phục của người con gái mình yêu thật hạnh phúc. Mỗi lần nhớ lại lòng tôi vẫn còn lâng lâng khó tả. Tôi nhẹ nhàng vuốt ve, nâng nui làn da đen bóng láng mịn của nàng. Thế rồi, một cách từ tốn, tôi luồn tay vào người nàng. Cơ thể nàng ôm trọn lấy tôi thật ấm áp thoải mái làm sao, không thể dùng ngôn từ nào diễn tả được. Sau cái lần đầu đáng nhớ ấy, tôi và Tiểu Mễ càng dính chặt với nhau như hình với bóng. Nàng thận trọng đếm từng bước chân tôi bước. Nàng khẽ chau mày khó chịu khi thấy tôi thức khuya hay ngủ không đủ giấc. Nàng dịu dàng nhắc nhở khi thấy tôi ngồi cdoe quá lâu. Những tháng ngày ấm êm hạnh phúc cứ thế trôi qua… Thế rồi một ngày nọ, tôi không nghe được gì từ Tiểu Mễ nữa. Lay mãi nàng không dậy, gọi mãi nàng không trả lời. Tôi lo lắng lắm. Điều gì đã xảy ra với Mễ Mễ bé bỏng thân thương của tôi vậy!! Tôi nhẹ nhàng cởi nàng ra, đút ra rồi lại đút vào, đút vào rồi lại đút ra. Mãi đến khi nghe tiếng rên thân thương, thấy nàng dần dần mở mắt tôi mới an tâm lại. Từ đó về sau, cứ mỗi 20 ngày nàng lại trở bệnh, người ngất đi không ăn uống gì được. Mỗi lần như thế tôi lại phải đút tới đút lui, đút vào thật lâu một hồi thì nàng mới tỉnh lại. Đấy, có người đẹp bên cạnh cũng phải yêu chiều chăm sóc chứ có sung sướng như người đời bảo đâu. Liệu cả hai người có hạnh phúc bên nhau đến đầu bạc răng long, hay sẽ âm dương li biệt khi Tiểu Mễ hết hạn bảo hành? Câu trả lời xin để dành lại cho bạn đọc. Chuyên mục review Xiaomi Band 2 theo phong cách ngôn tình xin kết thúc tại đây. Xiao Mi hán tự là Tiểu Mễ chứ không phải tác giả chém ra nhé. Xiaomi không tài trợ một đồng nào cho chương trình này. Dưới đây là tiết mục review đơn giản ngắn gọn cho các bạn Tên sản phẩm: Xiaomi Band 2 Giá: 150 tệ, khoảng 450k Việt Nam Màn hình trắng đen, nhỏ gọn Đi kèm một vòng đeo tay màu đen, nếu muốn xì tai hơn có thể mua vòng riêng, giá khoảng 10k/vòng Đo đếm bước chân, quãng đường, calories Đo nhịp tim Báo thức Remind khi ngồi một chỗ quá lâu Notify khi có tin nhắn hay cuộc gọi đến Kết nối với di động qua MiFit app, hiển trị history và log Bao bì đẹp, đóng gói sang chảnh như iPhone Phong cách thiết kế tinh giản đúng chất Xiaomi, nhỏ gọn mà đẹp Pin trâu, sạc 2-3 tiếng dùng được 15-20 ngày Chống nước 100%, tắm rửa vô tư Ko đo được bước chân nếu dùng xe đạp Vì tiết kiệm pin nên màn hình luôn tắt, muốn xem đồng hồ phải để tay ra trước mặt, chờ 1s. Lắc tay để switch giao diện (xem giờ, đếm bước chân, đo nhịp tim) lâu lâu không nhạy. Lời tác giả : Trước giờ toàn viết phong cách kiếm hiệp nên lâu lâu đổi style chút. Bà con bạn đọc có ủng hộ thì nhớ share like nhiệt tình để mình có cảm hứng làm tiếp nhé. Rate this: Like this: Related
The author's 100% true,... wrong, love story after 1 month in China. Readers who do not believe can read other articles in the series. The story has many 18+ scenes so pregnant children and women under 18 should not read it. I still remember, the first day I knew Tieu Me was in the late summer and early autumn. The first time we met, she wore a white dress, elegant and free from worldly dust, like an angel descending to earth. Seeing me, she smiled slightly, remained silent without saying a word, then shyly followed me back to the room. My hands hugged Mi Me's fragile body tightly, as if even a light breeze could take her away. Returning to the room, I quickly hugged Tieu Me and gently took off each layer of clothing, as if I was afraid she would get hurt. The feeling of peeling off the stamp and gradually taking off the clothes of the girl you love is so happy. Every time I remember it, my heart still feels indescribably lightheaded. I gently caressed and cherished her smooth, shiny black skin. Then, slowly, I slid my hand into her body. Her body embracing me was so warm and comfortable, words couldn't describe it. After that memorable first time, Tieu Me and I were even more attached to each other like a shadow. She carefully counted each step I took. She frowned slightly and was annoyed when she saw me staying up late or not getting enough sleep. She gently reminded me when she saw me sitting for too long. The warm, happy days passed like that... Then one day, I didn't hear anything from Tieu Me anymore. I kept shaking her but she didn't wake up, I kept calling her but she didn't answer. I'm very worried. What happened to my dear little Mi Mi!! I gently took her off, put her in then put her back in, put her in then put her out again. It wasn't until I heard her loving moans and saw her gradually open her eyes that I felt reassured. From then on, every 20 days she became sick and fainted, unable to eat or drink anything. Every time I had to put her back and forth, I had to put her in for a long time before she woke up. See, having a beautiful person by your side requires love and care, but it's not as happy as people say. Will both of them be happy together until the end of time, or will yin and yang separate when Tieu Me's warranty expires? The answer will be left to the readers. The Xiaomi Band 2 review column in romantic style ends here. The Chinese character Xiao Mi is Tieu Me, not the author's name. Xiaomi does not sponsor a single penny for this program. Below is a simple and brief review for you Product name: Xiaomi Band 2 Price: 150 yuan, about 450k Vietnam Compact, black and white screen Comes with a black bracelet, if you want to wear more, you can buy a separate bracelet, price is about 10k/bracelet Measure steps, distance, calories Measure heartbeat Alarm Remind yourself when sitting in one place for too long Notify when there is an incoming message or call Connect to mobile phone via MiFit app, display history and log Beautiful packaging, luxurious packaging like an iPhone Streamlined design style is true to Xiaomi, compact but beautiful Strong battery, charging for 2-3 hours can be used for 15-20 days 100% waterproof, carefree bathing Steps cannot be measured if using a bicycle To save battery, the screen is always off. If you want to see the clock, you have to put your hand in front of your face and wait 1 second. Shaking your hand to switch the interface (checking time, counting steps, measuring heart rate) is sometimes not sensitive. Author's note: I've always written in the style of swordplay, so I change my style from time to time. Dear readers, if you support me, please remember to share and like enthusiastically so that I can be inspired to continue. Rate this: Like this: Related
Mấy tuần trước, khi đi lang thang trên dạy nhau học , mình có thấy anh Đạt, founder daynhauhoc dành khá nhiều lời khen ngợi cho cuốn sách này. Tò mò nên mình tìm về đọc thử. Quả thật sách không làm mình thất vọng ! Có nhiều đoạn tác giả nói đúng đến mức không thể đúng hơn, hoặc đưa ra những lời dạy bảo vô cùng chí lí. Do vậy, mình viết bài này, vừa review sách , vừa tóm tắt những điều tâm đắc mà mình rút ra được từ cuốn sách. Giới thiệu tổng quan Tác giả cuốn sách là Uncle Bob , một cây đa cây đề trong làng Software Engineering. Ông từng viết một cuốn sách rất hay mang tên Clean Code (Mình từng review ở đây ). Cuốn sách mang tên The Clean Coder, đọc cũng giông giống Clean Code. Tuy nhiên, có một điều thú vị là nội dung hai cuốn sách lại… hoàn toàn trái ngược nhau! Trong khi Clean Code tập trung vào khía cạnh kĩ thuật : hướng dẫn lập trình viên cách tổ chức code và viết code sạch (như mục chuyện coding của blog mình); The Clean Coder lại tập trung vào khía cạnh nghề nghiệp : thái độ với công việc, cách làm việc nhóm , quản lý thời gian (tương tự mục chuyện nghề nghiệp của blog). Trong The Clean Coder, Uncle Bob nói về nhiều khía cạnh: đạo đức nghề lập trình , ứng phó với áp lực công việc, rèn luyện làm mới kĩ năng , làm việc nhóm… Mỗi khía cạnh đều đi kèm với những trải nghiệm quí giá của chính tác giả qua hơn 42 năm tuổi nghề với đủ mọi vị trí từ dev, manager, PM cho tới CEO. Giới thiệu vậy là đủ rồi! Nếu muốn tìm hiểu thêm, các bạn tự tìm sách mà đọc nhé. Những bài học rút ra Sách gồm 14 chương, mỗi chương lại có nhiều bài học khác nhau. Mình chỉ tóm tắt những bài học mình thấy hay và chí lí rút ra từ sách. Là một developer “có tâm”, bạn phải có trách nhiệm . Trách nhiệm ở đây không chỉ là với code mình viết ra, mà còn là trách nhiệm với những thoả thuận với khách hàng. Do vậy, cần biết nói KHÔNG trước những yêu cầu hay deadline vô lý của cấp trên hoặc khách hàng. Hãy sử dụng khả năng của mình để đưa ra cách giải quyết hợp lý cho cả hai bên. Có trách nhiệm với lời hứa của mình, một khi đã hứa thì phải hoàn thành công việc đúng hạn. Đây là vấn đề liên quan đến danh tiếng và thương hiệu của bạn. Đừng quá tập trung vào technical, mà hãy quan tâm đến sản phẩm và giá trị mà nó tạo ra , tầm quan trọng của nó trong công ty. Ăn ngủ điều độ, giữ cho bản thân khoẻ mạnh để code có chất lượng. Hạn chế OT vì OT nhiều sẽ ảnh hưởng sức khoẻ , làm giảm năng suất và chất lượng code. Thường xuyên sử dụng Coding Dojo để mài dũa khả năng code, khả năng tư duy. Tìm học nhiều ngôn ngữ, công nghệ để có cái nhìn thoáng và rộng mở hơn. Phân bố thời gian làm việc hợp lý, hạn chế chat chit và … meeting. Có thể sử dụng phương pháp Pomodoro để hạn chế xao nhãng (Cái này khá hay, mình cũng đang dùng). Bình tĩnh, giữ vững bản thân khi đối mặt với deadline, áp lực. Áp lực càng lớn, ta càng phải tuân thủ qui tắc, code đúng chứ đừng vì … vội quá mà làm ẩu. Lập trình là một con đường dài. Ở giai đoạn đầu, ta cần học hỏi từ người khác. Khi đã có trình độ và kiến thức, chính chúng ta phải dùng kiến thức của mình để giúp đỡ, dạy dỗ những người mới hơn. Tất nhiên, những dòng này không thể truyền tải hết được những điều tác giả muốn nói. Do vậy, mình khuyên các bạn nên trực tiếp đọc cuốn sách . Biết đâu bản thân các bạn sẽ rút ra được nhiều điều “hay ho” không kém cho bản thân mình thì sao! Nhận xét Sách hầu như không có code, chỉ có kể chuyện và chia sẻ, do đó khá dễ đọc. Mình vừa đọc vừa nghiền ngẫm cuốn sách mất khoảng 3-4 ngày. Giọng văn trong sách không màu mè hoa mĩ, mà đơn giản thấm thía như những lời răn dạy của một ông bác già trải bao cay đắng cuộc đời. Mình ấn tượng nhất với một câu chuyện khi Uncle Bob còn trẻ. Khi đó, ông chỉ lo tập trung vào technical mà… quên mất team và công ty. Sáng thứ 2 team có demo với khách hàng nhưng ông không thèm quan tâm. Ông “lỡ” submit code vào chiều thứ 6 làm hệ thống không build được. Sáng thứ 2, ông lại “vô ý” đến muộn. Kết thúc câu chuyện ra sao hẳn các bạn cũng đoán được đôi phần! Mặt khác, đôi chỗ mình thấy đôi lúc tác giả có phần hơi “cực đoan” khi chê việc OT là “không chuyên nghiệp”, đồng thời chỉ trích các hành động “anh hùng”, “thức đêm”, “gánh team” của dev. Theo tác giả, code cần sự chuyên nghiệp. Với coder chuyên nghiệp, tất cả là công việc, nhiệm vụ của coder là hoàn thành đúng chức trách. Trong công việc, không có chỗ cho những sự “anh hùng”, những màn “bốc đồng”. Đánh giá : 8.8/10 Kết luận Nếu bạn là sinh viên mới ra trường , mình khuyên bạn nên đọc cuốn này cùng với cuốn Clean Code . Không hiểu hết cũng không sao! Sau 1,2 năm đi làm, có chút kinh nghiệm, hãy đọc lại hai cuốn này. Chúng sẽ giúp bạn có một mindset và định hướng khá tốt trên bước đường lập trình sau này. Tóm lại, The Clean Coder là một cuốn sách vô cùng đáng đọc. Dù bạn có là sinh viên mới ra trường hay đã đi làm một, hai năm; dù bạn có là dev quèn hay là team leader hay project manager, những kiến thức trong sách đều vô cùng hữu ích với bạn. Nếu đã đọc sách, hãy chia sẻ những cảm nhận của mình trong phần comment nhé! Rate this: Like this: Related
A few weeks ago, while wandering around teaching each other, I saw Mr. Dat, founder of daynhauhoc, giving a lot of praise for this book. I was curious so I went back and read it. The book truly did not disappoint me! There are many passages where the author is so right that it could not be more correct, or gives extremely wise teachings. Therefore, I wrote this article, both reviewing the book and summarizing the interesting things I learned from the book. Overview The author of the book is Uncle Bob, a veteran in the Software Engineering village. He once wrote a very good book called Clean Code (I reviewed it here). The book is called The Clean Coder, which reads similar to Clean Code. However, one interesting thing is that the content of the two books is... completely opposite! While Clean Code focuses on the technical aspect: teaching programmers how to organize code and write clean code (like the coding story section of my blog); The Clean Coder focuses on career aspects: attitude towards work, teamwork, time management (similar to the blog's career section). In The Clean Coder, Uncle Bob talks about many aspects: programming ethics, coping with work pressure, practicing and renewing skills, teamwork... Each aspect comes with valuable experiences. by the author himself over 42 years of career with all positions from dev, manager, PM to CEO. That's enough introduction! If you want to learn more, please find the book and read it yourself. Lessons learned The book consists of 14 chapters, each chapter has many different lessons. I only summarize the lessons I find interesting and reasonable to draw from the book. As a "minded" developer, you must be responsible. The responsibility here is not only for the code you write, but also for the agreements with customers. Therefore, you need to know how to say NO to unreasonable requests or deadlines from superiors or customers. Use your abilities to come up with a reasonable solution for both parties. Be responsible for your promises. Once you make a promise, you must complete the work on time. This is a matter of your reputation and brand. Don't focus too much on technicalities, but pay attention to the product and the value it creates, its importance in the company. Eat and sleep regularly, keep yourself healthy to code with quality. Limit OT because too much OT will affect your health, reduce productivity and code quality. Regularly use Coding Dojo to hone your coding and thinking skills. Learn many languages ​​and technologies to have a more open and open view. Allocate working time reasonably, limit chatting and... meetings. You can use the Pomodoro method to limit distractions (This is quite good, I'm also using it). Stay calm and maintain yourself when facing deadlines and pressure. The greater the pressure, the more we have to follow the rules and code correctly and not do it rashly because... we are too hasty. Programming is a long road. In the early stages, we need to learn from others. Once we have qualifications and knowledge, we must use our knowledge to help and teach newer people. Of course, these lines cannot convey everything the author wants to say. Therefore, I recommend that you read the book directly. Who knows, maybe you yourself will learn many equally "cool" things for yourself! Reviews: The book has almost no code, only storytelling and sharing, so it's quite easy to read. It took me about 3-4 days to read and ponder the book. The tone of the book is not colorful or flowery, but simply and poignant like the teachings of an old uncle who has experienced many bitter things in life. I was most impressed with a story when Uncle Bob was young. At that time, he only focused on technical skills but... forgot about the team and the company. Monday morning the team had a demo with the customer but he didn't care. He "accidentally" submitted the code on Friday afternoon, causing the system to fail to build. On Monday morning, he was "inadvertently" late again. You can probably guess how the story ends! On the other hand, in some places I found the author to be a bit "extreme" when criticizing OT as "unprofessional" and also criticizing "heroic" actions, "staying up all night", and "carrying the team". by dev. According to the author, coding requires professionalism. For a professional coder, everything is work, the coder's duty is to fulfill the responsibilities properly. At work, there is no room for "heroic" or "impulsive" acts. Rating: 8.8/10 Conclusion If you are a new graduate, I recommend you read this book along with Clean Code. It's okay to not understand everything! After 1 or 2 years of working and having some experience, read these two books again. They will help you have a good mindset and direction on your future programming steps. In short, The Clean Coder is a book extremely worth reading. Whether you are a new graduate or have been working for one or two years; Whether you are a lowly developer or a team leader or project manager, the knowledge in the book is extremely useful to you. If you have read the book, please share your thoughts in the comments section! Rate this: Like this: Related
Mình chợt thấy cuốn này khi đang lướt Medium . Như cái tựa “Giao Diện tốt nhất chính là Không Giao Diện”, cuốn sách đã gây khá nhiều tranh cãi khi mới xuất bản. Vì tìm bản ebook không có nên mình đành phải bỏ tiền túi ra mua trên amazon. Nội dung trong sách quả thật không làm mình thất vọng! Giới thiệu Tác giả cuốn sách là Golden Krishna , ông là một designer làm cho bộ phận R&D của Google, Samsung và Zappos. Sách về thiết kế giao diện nhưng lại khuyến khích con người ta từ bỏ giao diện (No Interface). Đọc sách, mình chợt nhớ đến triết lý “Sắc tức thị Không, Không tức thị Sắc” trong Phật Giáo. Triết lý này có thể hiểu như sau. Trong ngành phần mềm cũng thế. Một phần mềm/ứng dụng được làm ra để giải quyết một vấn đề. Vấn đề cần giải quyết đó chính là biển, còn giao diện (UI) chính là sóng. Sắc cũng chính là Không. Giao diện tốt nhất là giao diện giúp người dùng giải quyết vấn đề , chứ không làm mất thời gian của họ. Tóm tắt Với sự phát triển của công nghệ , chúng ta sử dụng app/web để giải quyết mọi vấn đề: Muốn tán gái ư, có app (Zalo, BeeTalk). Muốn đi ăn ư, có app (Foody, Yelp). Muốn nghe nhạc ư, có app. Muốn khóa cửa nhà, đậu xe … có app luôn. Tuy nhiên, những app này lại … làm mất quá nhiều thời gian của người dùng. Tác giả kể về một ứng dụng dùng để khóa/mở khóa cửa. Thay vì đút chìa khóa vào ổ, người dùng chỉ cần bật app lên, chọn unlock là xong, không cần phải lo quên chìa khóa nữa! Nghe có vẻ tiện dụng quá nhỉ? Đây là những bước người dùng cần làm: Phiền phức hơn nhiều so với mở cửa bằng chìa khóa thường nhỉ ??? Lúc này app lại trở thành… vật cản. Tác giả đề nghị cải tiến theo tiêu chí “No Interface”. Lúc này app sẽ sử dụng bluetooth tầm gần. Chỉ cần người dùng tới gần, máy sẽ phát tín hiệu bluetooth để mở khóa. Không cần giao diện màu mè hoa mĩ, chỉ đơn thuần là giải quyết vấn đề một cách dễ hết mức có thể cho người dùng. Vậy là đủ! Tác giả cũng kể một sự thật đắng lòng : Đa phần các ứng dụng đều tìm cách dụ dỗ chúng ta nhìn vào giao diện, dán mắt vào màn hình bằng cách áp dụng một số biện pháp tâm lý. Việc giới trẻ nghiện game, nghiện di động không phải là do họ, mà là do đội ngũ design của các ứng dụng này. Vì muốn thu hút người dùng nhìn vào màn hình, chúng ta tìm cách thiết kế UI cho thật bắt mắt , thật tiện dụng. Chúng ta quá tập trung vào UI mà quên mất UX , hoặc xây dựng UX quá tập trung vào giao diện. Thật ra, thứ chúng ta cần làm ra chính là giải quyết vấn đề cho người dùng một cách nhẹ nhàng nhất có thể. Một cách để đạt được điều này chính là lược bỏ giao diện, với tôn chỉ “Best Interface is No Interface”. Nhận xét và kết luận Sách đẹp từ cái bìa cho đến chất giấy, vô cùng tối giản. Bên trong cuốn sách cũng chỉ toàn là trắng đen để không rối mắt người dùng. Nội dung sách được trình bày rất ngắn gọn, xác đáng, không thừa thãi, đi kèm đó có một số ví dụ khá hay. Theo lời của tác giả, đa phần các ứng dụng tương lại đều sẽ là No Interface, biết người dùng muốn gì dựa trên hệ thống sensor. Với nền tảng IoT ngày càng phát triển như hiện tại, chuyện này hoàn toàn có thể. Sách làm thay đổi cách nghĩ, cách tiếp cận vấn đề của mình. Trước đây, mỗi lầm muốn thiết kế app/web, mình thường bắt đầu bằng việc vẽ giao diện. Bây giờ, mình lại suy nghĩ “flow như thế nào thì người dùng đỡ tốn thời gian nhất, có cần thiết phải có giao diện không, có thể bỏ được step nào không?”. Suy nghĩ này giúp mình nghĩ ra nhiều hướng giải quyết hơn nhiều. Đó cũng là lý do mình đọc sách . Mặc dù chúng ta có thể không nhớ hết những điều đã đọc, chỉ cần hấp thụ một số tư duy mới lạ, để nó dần thay đổi mình là được. Đánh giá : 8.1/10 Mình khuyến khích các bạn designer và front-end developer nên đọc cuốn này nhé. Các bác Product Manager, UX Designer trên Medium cũng dành cho nó nhiều lời khen lắm. Rate this: Like this: Related
I suddenly came across this book while surfing Medium. As the title "The best interface is no interface", the book caused a lot of controversy when it was first published. Because I couldn't find the ebook version, I had to spend my own money to buy it on Amazon. The content in the book really did not disappoint me! Introduction The author of the book is Golden Krishna, he is a designer working for the R&D department of Google, Samsung and Zappos. Books about interface design but encourage people to give up interface (No Interface). Reading the book, I suddenly remembered the philosophy "Form is Emptiness, Emptiness is Form" in Buddhism. This philosophy can be understood as follows. The same is true in the software industry. A software/application is created to solve a problem. The problem to be solved is the sea, and the interface (UI) is the waves. Form is also Emptiness. The best interface is one that helps users solve problems, not waste their time. Summary With the development of technology, we use apps/webs to solve all problems: If you want to flirt with girls, there are apps (Zalo, BeeTalk). If you want to go out to eat, there is an app (Foody, Yelp). Want to listen to music, there is an app. If you want to lock your house door, park your car... there's an app. However, these apps... take up too much of users' time. The author tells about an application used to lock/unlock doors. Instead of inserting the key into the lock, users just need to turn on the app, select unlock and that's it, no need to worry about forgetting the key anymore! Sounds so convenient, right? These are the steps users need to do: Much more troublesome than opening the door with a regular key, right??? At this point, the app becomes... an obstacle. The author suggests improvements according to the "No Interface" criterion. At this time, the app will use close-range Bluetooth. As long as the user comes close, the device will emit a bluetooth signal to unlock. No need for a fancy interface, simply solving the problem as easily as possible for the user. That is enough! The author also tells a bitter truth: Most applications try to lure us into looking at the interface, glued to the screen by applying some psychological measures. The fact that young people are addicted to games and mobile phones is not because of them, but because of the design team of these applications. Because we want to attract users to look at the screen, we find ways to design the UI to be eye-catching and convenient. We focus too much on UI and forget about UX, or building UX focuses too much on the interface. Actually, what we need to do is solve the problem for users as gently as possible. One way to achieve this is to eliminate the interface, with the principle "Best Interface is No Interface". Comments and conclusions The book is beautiful from the cover to the quality of the paper, extremely minimalist. The inside of the book is all black and white so as not to confuse the user. The book's content is presented very concisely, accurately, without redundancy, and comes with some pretty good examples. According to the author, most future applications will be No Interface, knowing what the user wants based on the sensor system. With the current growing IoT platform, this is completely possible. Books change the way I think and approach problems. In the past, every time I wanted to design an app/web, I often started by drawing the interface. Now, I'm thinking "What kind of flow will save users the most time? Is it necessary to have an interface? Can any steps be omitted?". This thinking helps me think of more solutions. That's also the reason I read books. Even though we may not remember everything we read, we just need to absorb some new thinking and let it gradually change us. Rating: 8.1/10 I encourage designers and front-end developers to read this book. The Product Managers and UX Designers on Medium also gave it a lot of compliments. Rate this: Like this: Related
Dạo gần đây mình đi làm thêm , project hiện tại có sử dụng React với cả ES6 – chuẩn Javascript mới. Do mấy bài viết trước mình chê JavaScript sida nhiều thấy cũng tội, hôm nay viết một bài nói tốt cho nó một tí để đổi gió nhé. Phiên bản JavaScript hiện tại chúng ta đang sử dụng dựa trên chuẩn ECMAScript 5 (ES5). Hiện tại, JavaScript được sử dụng ngày càng nhiều, từ front-end cho đến back-end , điều này đòi hỏi sự cải tiến trong JavaScript (Nghĩ cũng đúng, cái ngôn ngữ sida thế mà code mấy hệ thống to to, code phức tạp thì để lâu chả banh chành ra à !!). Đó là lý do chuẩn ECMAScript 6 (ES6) ra đời, cung cấp 1 số tính năng mới cho JavaScript, đồng thời giúp code trở nên tường minh và dễ viết hơn. Trong phạm vi bài viết, mình sẽ giới thiệu một số tính năng mới của ES6 và mổ xẻ so sánh nó với ES5 (Mình chỉ giới thiệu 1 số tính năng hay thôi nhé, các bạn tham khảo nguồn dưới cuối bài để tìm hiểu thêm). Để chạy được ES6 phải ta setup hoặc add thư viện hơi rắc rối, biết các bạn lười mình đã chuẩn bị sẵn 1 link jsfiddle hỗ trợ ES6 cho các bạn, các bạn cứ vào mà nghịch code ES6 thoải mái thôi: . Tính năng nào cảm thấy hay mình sẽ đặt lên đầu tiên nhé. Bắt đầu nào!! 1. Arrow (Lambda Expression) Ở ES6, thay vì khai báo function như kiểu thông thường, ta đã có thể sử dụng => . Cách khai báo này tương tự như Lambda Expression trong C# , giúp cho code tường minh và ngắn gọn hơn rất rất nhiều. Ngoài ra, nhờ có arrow, ta không còn bị tình trạng this bị bind nhầm như trước kia nữa. 2. Default parameter, destructuring, spread operator Default parameter đã có từ lâu trong C#, giờ JavaScript cũng đã có nhưng… Java vẫn chưa có . Nhờ default parameter , ta có thể xác định giá trị mặc định của tham số truyền vào Destructuring cũng là một tính năng khá hay, nó cho phép ta “phân rã” các phần tử trong 1 array hoặc 1 object Một tính năng mới khác mà mình cảm thấy khá thú vị đó là spread operator, tính năng này cho phép chuyển đổi qua lại giữa 1 array và danh sách các params. Nghe hơi khó hiểu nhỉ, nhìn code là hiểu ngay. 3. Cải tiến syntax class và object Lần trước, mình đã chửi thằng JavaScript sida vì nó chẳng có class gì sất, mà phải dùng prototype . Chắc nghe chửi nhiều quá nên các bác cũng sợ, giờ đã phải thêm class vào ES6. Trong ES6, class có hỗ trợ constructor, get/set, việc kế thừa cũng rất dễ thực hiện bằng từ khóa extends. Với cách khai báo object mới, ta có thể viết code một cách ngắn gọn và rõ ràng hơn nhiều. Mình là mình lười code lắm, viết code càng ít mình càng khoái. 4. Iterator Ngày xưa, để duyệt qua từng phần tử trong một mảng, ta phải sử dụng hàm for, chạy index từ 0 tới cuối mảng. Về sau đỡ hơn, ta có thể sử dụng hàm forEach. Tuy nhiên nhiều người lại thấy cú pháp hàm forEach hơi lạ, không được tự nhiên cho lắm. Trong ES6, ta đã có thêm for… of để duyệt từng phần tử trong một mảng (Đừng nhầm với for…in , để duyệt các trường trong 1 object nhé). 5. Template String Chức năng này khá giống chức năng string interpolation trong C# 6.0. Trước đây, JavaScript không có string.format , do đó ta phải cộng chuỗi bằng tay rất cực. Giờ đây, sử dụng template string, ta không cần phải mất công cộng chuỗi nữa, code rõ ràng hơn nhiều. 6. Map và Set Nhắc lại một chút kiến thức cơ bản: Map là cấu trúc dữ liệu cho phép ta lưu dữ liệu dưới dạng Key-Value, Set là một mảng mà trong đó không có phần tử nào trùng nhau (Bạn nào quên thì lật sách Cấu trúc dữ liệu và thuật toán ra xem lại nhé). Giờ ES6 đã bổ sung thêm 2 cấu trúc dữ liệu này, giúp việc code được dễ dàng hơn. 7. Promise Promise là một khái niệm khá hay, giúp cho việc viết code asynchonous (bất đồng bộ) dễ dàng hơn. Promise được sử dụng trong rất nhiều thư viện như jQuery, AngularJS . Lần khác có thời gian mình sẽ viết bài nói rõ hơn về khái niệm này, còn hiện tại các bạn qua blog của bạn mình xem tạm nhé: Tìm hiểu về promise . Có thể thấy, ES6 đã làm JavaScript bớt sida hơn nhiều. Tuy nhiên, ES6 vẫn còn một khuyết điểm, đó là nó chưa được hỗ trợ hầu hết các trình duyệt . IE và Chrome không thể chạy trực tiếp ES6 được, Firefox thì chỉ chạy được 1 số tính năng: (Update 08/02/2017 : Hiện tại phần lớn các tính năng của ES6 đã chạy được trên Microsoft Edge, Firefox, Chrome và Safari phiên bản mới nhất rồi nhé). Dù vậy, hiện tại nhiều công ty đã áp dụng ES6 vào code. Lập trình viên viết code ES6 như thường, sau đó sử dụng babel/traceur để dịch code EcmaScript 6 sang EcmaScript 5 (Project hiện tại của mình cũng vậy, cứ viết code ES6 xong nó tự build ra JavaScript ES5, khá sướng). Trong tương lai vài năm nữa, khi các trình duyệt đã hỗ trợ đầy đủ, ta có thể viết ES6 và chạy thẳng trên trình duyệt luôn. Trong phạm vi bài viết, mình không thể nêu hết toàn bộ các cải tiến của ES6 được. Bạn nào có hứng thú có thể tham khảo thêm ở một số nguồn dưới đây: Rate this: Like this: Related
Recently I've been working part-time, my current project uses React with ES6 - the new Javascript standard. Because in the previous articles I criticized JavaScript sida a lot, I felt guilty, so today I'll write an article to talk about it a little better for a change of pace. The current JavaScript version we are using is based on the ECMAScript 5 (ES5) standard. Currently, JavaScript is used more and more, from front-end to back-end, this requires improvements in JavaScript (Think about it right, the Sida language is such that the code for big systems, complex code If you leave it for a long time, it won't come out!!). That's why the ECMAScript 6 (ES6) standard was born, providing a number of new features for JavaScript, while also making the code clearer and easier to write. Within the scope of the article, I will introduce some new features of ES6 and compare it with ES5 (I only introduce some good features, please refer to the source at the end of the article to learn more). ). To run ES6, you have to setup or add a library which is a bit complicated. I know you guys are lazy so I have prepared a jsfiddle link supporting ES6 for you, you can just go in and play with the ES6 code comfortably: . Whichever feature feels good I will put it first. Start!! 1. Arrow (Lambda Expression) In ES6, instead of declaring functions as usual, we can use => . This declaration is similar to Lambda Expression in C#, making the code much clearer and more concise. In addition, thanks to arrow, we no longer have this situation being mistakenly bound like before. 2. Default parameter, destructuring, spread operator Default parameter has been around for a long time in C#, now JavaScript also has it but... Java still doesn't have it. Thanks to default parameter , we can determine the default value of the input parameter Destructuring is also a pretty cool feature, it allows us to "decompose" elements in an array or an object. Another new feature that I find quite interesting is the spread operator, this feature allows converting back and forth between an array and a list of params. It sounds a bit confusing, but look at the code and you'll understand immediately. 3. Improve class and object syntax Last time, I cursed JavaScript sida because it didn't have any classes, but had to use prototypes. Maybe you guys are scared because you hear so much cursing, now you have to add classes to ES6. In ES6, classes support constructor, get/set, and inheritance is also very easy to do with the extends keyword. With the new way of declaring objects, we can write code much more concisely and clearly. I'm very lazy to code, the less I write the more I enjoy it. 4. Iterator In the past, to go through each element in an array, we had to use the for function, running the index from 0 to the end of the array. Later on, we can use the forEach function. However, many people find the forEach function syntax a bit strange and not very natural. In ES6, we have added for… of to browse each element in an array (Not to be confused with for…in , to browse fields in an object). 5. Template String This function is quite similar to the string interpolation function in C# 6.0. Previously, JavaScript did not have string.format , so we had to add strings by hand which was very difficult. Now, using template string, we don't need to publicize the string anymore, the code is much clearer. 6. Map and Set Recall a bit of basic knowledge: Map is a data structure that allows us to store data in Key-Value form, Set is an array in which no elements overlap (Do you forget? Please read the book Data Structures and Algorithms again. Now ES6 has added these two data structures, making coding easier. 7. Promise Promise is a pretty cool concept that makes writing asynchonous code easier. Promises are used in many libraries such as jQuery, AngularJS. Next time I have time, I will write an article explaining this concept more clearly. For now, please take a look at my friend's blog: Learn about promises. As can be seen, ES6 has made JavaScript much less sida. However, ES6 still has one drawback, which is that it is not supported by most browsers yet. IE and Chrome cannot run ES6 directly, Firefox can only run some features: (Update February 8, 2017: Currently, most of ES6's features can run on Microsoft Edge, Firefox, Chrome and Safari latest version). However, many companies have now applied ES6 to their code. Programmers write ES6 code as usual, then use babel/traceur to translate EcmaScript 6 code into EcmaScript 5 (My current project is the same, after writing ES6 code, it automatically builds ES5 JavaScript, quite happy). In a few years, when browsers have full support, we can write ES6 and run it straight in the browser. Within the scope of this article, I cannot mention all the improvements of ES6. If you are interested, you can refer to some of the sources below: Rate this: Like this: Related
Phóng tác dựa theo tản văn: Bắt đầu từ những con chữ của tác giả Nguyễn Nhật Ánh. Tản văn này của bác nói về nghề văn và về con chữ. Xét thấy nghề này cũng có nhiều nét giông giống nghề code, mình xin mượn dăm câu chữ từ bài viết để viết nên bài này. Hi vọng bác Ánh đọc được sẽ không giận vì “đạo văn”. Người bạn trẻ hỏi tôi: Làm thế nào để trở thành lập trình viên? Nghề lập trình bắt đầu từ đâu? Tôi đáp: Từ sự yêu thích máy tính và phần mềm. Người bạn trẻ bảo: Tôi yêu thích. Tôi lại nói: Thế thì bắt đầu từ năng khiếu và khả năng tư duy. Người bạn trẻ lại bảo: Tôi có năng khiếu. Ồ, nếu cái gì bạn cũng có rồi thì có lẽ nghề lập trình bằng đầu từ… code! 1 Có lẽ không có nghề nào trên đời mà công cụ lao động lại đơn giản như nghề code. Trong khi anh thợ mộc phải sắm cưa, bào, đục, anh thợ may phải sắm máy may, thì anh coder chỉ cần một chiếc laptop đã có thể ung dung hành nghề. Tất nhiên, sang hơn thì dùng Alienware, sang hơn nữa thì xài Macbook, nhưng nếu không có những thứ máy móc xa hoa đó, một con desktop Pentium 4 cùi kể như đã đủ. Cũng như nếu không có xe gắn máy hay ôtô, con người ta vẫn có thể đi lại bằng chiếc xe đạp cà tàng. Xem ra, yêu cầu về công cụ của nghề lập trình còn thấp hơn những nghề lao động bình dân như đánh giày hay sửa xe đạp. Nguyên liệu của nghề code còn đơn giản hơn nữa. Thợ mộc cần gỗ, thợ may cần vải, thợ hồ cần xi măng, còn coder chỉ cần… code. Mà code là thứ nguyên liệu chẳng phải bỏ tiền ra mua. Code lềnh khênh trong các phần mềm, ngổn ngang trên mạng. Code lấp lánh trong các project mã nguồn mở trên github . FlappyBird để giải trí, Thiendia để nghiên cứu, toidicodedao để đọc cũng là nguồn cung cấp nguyên liệu cho code. Vì trong đó, có code. Vậy, nguyên liệu của nghề lập trình ở khắp mọi nơi. Và hoàn toàn miễn phí, chỉ cần rong tuổi một ngày mở một thư viện Open Source ra đọc, hoặc tìm cách reverse engineering một phần mềm nào đó. 2 Lập trình viên ắt nhiên phải… biết code và code đúng. Vì yêu cầu đầu tiên trong thao tác lập trình là code phải chính xác. Giống như đường kim của thợ may hay viên gạch của thợ hồ, đặt lệch một li có khi lại đi hơn một dặm. Ví dụ đơn giản nhất: người code phải biết chọn đúng cấu trúc dữ liệu và thuật toán code cho bài toán; đặt tên biến tên hàm và viết comment dễ đọc dễ hiểu; thiết kế cấu trúc code rành rọt, mạch lạc. Muốn vậy, phải làm nhiều, code nhiều. Code đẹp: đó là lời khen khiến một coder tự hào. 3 Làm sao biết mình có code giỏi hay không? Thiết tưởng, để biết điều này cũng không khó lắm. Làm hàng chục bài tập, học hàng chục ngôn ngữ/framework , thứ gì cũng chơi được, hẳn bạn là người code giỏi. Tất nhiên, có thể bạn sẽ gặp một vài khó khăn khi gặp những thuật toán khó, ngôn ngữ mới, nhưng các bài hướng dẫn trên mạng bổ sung thêm nguyên liệu cho nghề của bạn. Nhưng người biết cách kiếm tiền chưa chắc đã là người biết cách xài tiền. Nghề lập trình cũng vậy, viết ra code thì dễ mà lập trình thật sự mới thiệt là khó. Khó ở chỗ bạn biết chắc bạn có rất nhiều thuật toán, ngôn ngữ, thiết kế trong bộ nhớ nhưng đến khi cần dùng để giải quyết vấn đề thì tìm hoài không ra, không biết nó nằm ở ngóc ngách nào trong đầu bạn. Hệt như khi cần mua đồ mà bỗng nhiên bạn lại không tìm thấy ví tiền trong túi, thiệt là éo le! Kiến thức trong đầu xét cho cùng cũng na ná như quần áo trong rương hay trong tủ. Nếu bạn lười, bạn sẽ chỉ mặc đi mặc lại vài bộ xếp ở trên, treo ở ngoài, trong khi ở dưới đáy rương hay trong góc tủ, nếu bạn chịu khó lục lọi, bạn sẽ thấy có những chiếc quần, chiếc áo đẹp đến mức bạn phải sững sờ. Bạn sẽ trố mắt ngạc nhiên: Chiếc áo đẹp thế này, sao lâu nay ta không lấy ra mặc nhỉ? Khả năng code cũng vậy. Thông thường con người ta có thói quen dùng những thuật toán/thiết kế mà thường ngày mình vẫn dùng. Những chữ quen thuộc có cái tiện là khi bạn cần, chúng hiện ra ngay, thậm chí không cần bạn kêu gọi, thúc giục hay năn nỉ. Trường hợp này, khá phổ biến, đã chỉ ra rằng trong thực tế bạn chỉ dùng 1/10, thậm chí 1/100 hay 1/1000 kiến thức lập trình mà bạn có, hoàn toàn lãng phí. Giống như bạn đang sở hữu một triệu đồng mà khả năng sử dụng trên thực tế chỉ có một ngàn đồng. Trong tư cách một lập trình viên, chính sự lười nghĩ đã niêm phong tài khoản thuật toán/kiến thức của bạn khiến bạn không thể huy động tối đa vốn liếng của mình. 4 Dĩ nhiên sẽ quá khắt khe nếu yêu cầu bạn phải nghĩ ngay ra thuật toán/thiết kế thích hợp hoặc cần thiết phục vụ cho việc giải quyết vấn đề khi lập trình của bạn. Điều đó đòi hỏi một trí nhớ, đặc biệt là một khả năng tư duy mạnh mẽ và phong phú. Bản thân tôi là lập trình viên, đã code cũng nhiều, nhưng không phải lúc nào tôi đưa ra giải pháp đúng, làm ra chương trình như ý muốn. Tôi không biết các lập trình viên khác làm thế nào, riêng tôi, tôi khắc phục cách học thêm, làm thêm và… viết blog . Khi học một ngôn ngữ mới, tôi dùng nó để làm một thứ gì nhỏ nhỏ (web, app). Khi học một thuật toán mới, tôi lại tìm cách áp dụng nó vào bài toán nào đó. Thấy thứ gì hay ho, tôi lại biến nó thành bài viết trên blog. Thỉnh thoảng, tôi cũng hay đọc sách về ngành lập trình , dù nó không trực tiếp giúp tôi code giỏi hơn. Gấp cuốn sách lại, giống như các bà nội trợ đi ra khỏi siêu thị, bạn sẽ thu hoạch được nhiều thứ. Bạn sẽ biết lập trình viên giỏi không chỉ biết code, những mưu mẹo sống sót và làm vừa lòng PM, cách trở thành một coder có tâm, … và dĩ nhiên là bạn sẽ nghĩ ra áp dụng những thứ đó, mặc dù có thể không phải ngay hôm nay hay ngày mai. Các bà nội trợ cũng thế thôi, họ ngắm nghía hàng giờ trong siêu thị rồi đi ra tay không, nhưng những món hàng hấp dẫn, thậm chí cả giá cả lẫn vị trí của chúng, đã khắc sâu trong tâm trí họ. Một lúc nào đó, cần tới, họ sẽ tìm ngay được cái họ cần. Nói tóm lại, đó là một cách rèn luyện trí óc, một kiểu thể dục tinh thần, và theo tôi là vô cùng quan trọng với những ai có ý định hành nghề bằng code. 5 Xét cho cùng, code chỉ là code, nếu nó không được chạy. Một đoạn code chỉ là những dòng chữ vô nghĩa, không làm được gì có ích cho đời. Code không nên chỉ nằm trên giấy, nó được tồn tại là để chạy. Chúng ta vẫn nghe nói chạy thử code đó thôi. Thứ thật sự mà code tạo ra không phải là … code, mà là sản phẩm, là phần mềm (như một ứng dụng, một trang web chẳng hạn). Nói khác đi, code chả là gì khi đứng riêng mình nó. Sản phẩm tạo ra mới làm code trở nên có nghĩa. Nhưng bàn về những sản phẩm tạo nên từ code, không phải là mục đích của bài viết này. Rate this: Like this: Related
Adaptation based on a text: Starting from the words of author Nguyen Nhat Anh. This essay of yours talks about the literary profession and the word. Considering that this profession has many similarities to the coding profession, I would like to borrow a few words from the article to write this article. I hope Mr. Anh will not be angry when he reads it because of "plagiarism". A young friend asked me: How to become a programmer? Where did programming begin? I answered: From my love of computers and software. The young friend said: I love it. I say again: Then it starts with aptitude and thinking ability. The young friend said: I have talent. Oh, if you already have everything, perhaps programming starts with the word... code! 1 Perhaps there is no profession in the world where the working tools are as simple as coding. While the carpenter has to buy saws, planes, and chisels, and the tailor has to buy a sewing machine, the coder only needs a laptop to be able to practice leisurely. Of course, if you're more luxurious, use Alienware, if you're more luxurious, use a Macbook, but if you don't have those luxurious machines, a Pentium 4 desktop is enough. Just like if there were no motorbike or car, people could still travel by bicycle. It seems that the tool requirements of the programming profession are lower than those of common labor occupations such as shoe shining or bicycle repair. The ingredients of coding are even simpler. Carpenters need wood, tailors need fabric, bricklayers need cement, and coders just need... code. But code is a material that you don't have to spend money to buy. Code is scattered in software and scattered on the internet. Code sparkles in open source projects on github. FlappyBird for entertainment, Thiendia for research, toidicodedao for reading are also sources of raw materials for code. Because in there, there is code. So, the raw materials for programming are everywhere. And it's completely free, just need a day or so to open an Open Source library to read, or find a way to reverse engineer some software. 2 Programmers must of course... know how to code and code correctly. Because the first requirement in programming is that the code must be accurate. Like a tailor's needle or a bricklayer's brick, if placed just an inch off, it can take more than a mile. The simplest example: the coder must know how to choose the right data structure and code algorithm for the problem; Name variables and function names and write comments that are easy to read and understand; Design a clear and coherent code structure. To do that, you have to do a lot and code a lot. Beautiful code: that's a compliment that makes a coder proud. 3 How do you know if you are good at coding? I think it's not that difficult to know this. Do dozens of exercises, learn dozens of languages/frameworks, play everything, you must be a good coder. Of course, you may encounter some difficulties when encountering difficult algorithms and new languages, but online tutorials add more material to your craft. But people who know how to make money are not necessarily people who know how to spend money. Programming is the same, writing code is easy but actually programming is really difficult. The difficulty is that you know you have a lot of algorithms, languages, and designs in memory, but when you need to use them to solve a problem, you can't find them, and don't know where they are in your mind. Just like when you need to buy something but suddenly you can't find your wallet in your pocket, it's really unfortunate! Knowledge in the head is, after all, similar to the clothes in a chest or closet. If you're lazy, you'll just wear a few sets of clothes over and over again, stacked on top or hanging outside, while at the bottom of the trunk or in the corner of the closet, if you look hard enough, you'll find beautiful pants and shirts. to the point where you are stunned. You will be surprised: This shirt is so beautiful, why haven't I worn it for a long time? The same goes for coding ability. Usually people have the habit of using algorithms/designs that they usually use every day. Familiar words have the advantage that when you need them, they appear immediately, even without you calling, urging or begging. This case, quite common, has shown that in reality you only use 1/10, even 1/100 or 1/1000 of the programming knowledge you have, which is a complete waste. It's like you own a million dong but the actual ability to use it is only a thousand dong. As a programmer, it is the laziness of thinking that seals your algorithm/knowledge account, making you unable to maximize your capital. 4 Of course it would be too strict to ask you to immediately think of an appropriate or necessary algorithm/design to help solve your programming problem. That requires a memory, especially a strong and rich thinking ability. I myself am a programmer and have coded a lot, but I don't always come up with the right solution and create the program as I want. I don't know how other programmers do it, but for me, I have to learn more, do more work and... write a blog. When I learn a new language, I use it to make something small (web, app). When I learn a new algorithm, I look for ways to apply it to some problem. When I see something interesting, I turn it into a blog post. Occasionally, I also read books about programming, even though it doesn't directly help me code better. Close the book, like housewives going out of the supermarket, you will harvest many things. You will know that good programmers not only know how to code, tips on how to survive and please PMs, how to become a conscientious coder, ... and of course you will think of how to apply those things, even though it is possible Not today or tomorrow. Housewives are the same, they browse for hours in the supermarket and then come up empty-handed, but the attractive items, even their prices and locations, are engraved in their minds. At some point, when they need it, they will immediately find what they need. In short, it is a way to train the mind, a type of mental gymnastics, and in my opinion is extremely important for those who intend to practice coding. 5 After all, code is just code, if it isn't run. A piece of code is just meaningless lines of text that cannot do anything useful in life. Code shouldn't just stay on paper, it exists to run. We still hear about testing that code. The real thing that code creates is not... code, but a product, software (like an application, a website, for example). In other words, code is nothing on its own. New products make code meaningful. But discussing products created from code is not the purpose of this article. Rate this: Like this: Related
Sau một khoảng thời gian vật vã thì mình cũng hoàn thành bài đầu tiên trong series Bảo Mật Nhập Môn . Bài viết này sẽ bàn về sự “ bảo mật ” của giao thức HTTP. Website của Lazada và Ngân hàng ACB sẽ bị lôi ra làm ví dụ. Vì bài viết khá dài nên các bạn cứ từ từ đọc nhé. Ôn lại về HTTP HTTP là một giao thức dùng để truyền nhận dữ liệu (Xem thêm ở đây ). Hiện tại, phần lớn dữ liệu trên Internet đều được truyền thông qua giao thức HTTP. Các ứng dụng Web hoặc Mobile cũng gọi Restful API thông qua giao thức HTTP. Tuy nhiên, nhược điểm của HTTP là dữ liệu được truyền dưới dạng plain text, không hề được mã hoá hay bảo mật . Điều này dẫn đến việc hacker có thể dễ dàng nghe lén, chôm chỉa và chỉnh sửa dữ liệu. Người ta gọi kiểu tấn công này là Man-in-the-middle attack, viết tắt là MITM. Sơ lược về Man-in-the-middle attack Hãy tưởng tượng bạn đang tán tỉnh một em gái dễ thương mặt cute ngực to dánh khủng tên Linh. Để tăng tính lãng mạn, bạn không nhắn tin mà trực tiếp viết thư gửi cho nàng. Lúc này, bạn là client, bé Linh là server, việc gửi thư là giao thức HTTP. Đương nhiên, hoa đẹp thì lắm ruồi bu. Có một thằng hacker xấu xa bỉ ổi tìm cách phá rối bạn, ta tạm gọi thằng này là Hoàng cờ hó. Thằng Hoàng cờ hó có thể phá rối bạn bằng những cách sau: 1. Sniff packet để đọc lén dữ liệu Bạn hí hửng bỏ thư vào hòm thư, chờ bức thư bay đến chỗ Linh. Thư đang trên đường tới, thằng Hoàng bắt được, mở bức thư ra xem, biết được hết những lời tâm tình ủ ê mà bạn dốc cạn tấm lòng ra viết. Trong thực tế, khi bạn gửi username, password qua HTTP, hacker có thể dễ dàng chôm username, password này bằng cách đọc lén các packet trong mạng. (Bạn gửi clip 18+ thì nó cũng chôm được nốt). 2. Sửa đổi packet Không chỉ đọc trộm, thằng Hoàng cờ hó kia còn có thể sửa thư của bạn. Bạn khen Linh đẹp như Maria Ozawa thì nó sửa thành Happy Polla. Linh reply lại, hẹn bạn đi nhà nghỉ lúc 5h thì nó sửa thành 5h15. Bạn vẫn không hay biết thư đã bị tráo gì cả. Đến lúc đọc xong, 5h15 ra nhà nghỉ thì đã thấy thằng cờ hó và Linh tay trong tay dắt nhau ra. (Thằng H yếu sinh lý nên 15p là xong, các bạn nên thông cảm cho nó). Trong thực tế, hacker có thể thay đổi nội dung bạn nhận được từ server, làm thay đổi thông tin hiển thị trên máy bạn. Cả 2 trường hợp này đều khá nguy hiểm vì bạn không hề biết mình bị tấn công. Kiến thức này thuộc dạng vô cùng cơ bản, nhiều người đã nói rồi nên mình sẽ không giải thích kĩ về khía cạnh kĩ thuật. Các bạn có thể tự tìm hiểu thêm về MITM Attack ở đây: VNPro forum Cách phòng chống Các giải pháp chống MITM trong mạng LAN thường do SysAdmin hoặc các bạn chuyên bảo mật lo , thông qua việc cài đặt thiết lập hệ thống. Là developer, cách phòng chống cơ bản nhất chúng ta có thể làm là sử dụng giao thức HTTPS cho ứng dụng , bằng cách thêm SSL Certificate. Dữ liệu giao tiếp qua HTTPS đã được mã hoá nên người ngoài không thể đọc trộm hay chỉnh sửa được. Cách này tương tự như việc bạn và Linh viết mail cho nhau bằng teencode, thằng Hoàng cờ hó kia có đọc trộm mail cũng không hiểu hay sửa thư được. Tuy độ bảo mật của HTTPS vẫn chưa phải là tuyệt đối, nó vẫn cao hơn nhiều so với chỉ dùng HTTP thuần. Trong phạm vi bài viết, mình không tìm hiểu thêm về những lỗi bảo mật của HTTPS, mong các pro vào góp ý. Ngoài ra, nếu trang web của bạn chưa thể tích hợp bạn có thể tích hợp chức năng đăng nhập thông qua Facebook, Google . Tuy hacker vẫn có thể chôm cookie của người dùng, nhưng ít ra họ không bị lộ username và password. Lưu ý Hiện tại nhiều trang web vẫn sử dụng giả cầy” – chỉ sử dụng ở những trang log-in và những trang có dữ liệu nhạy cảm. Cách làm này vẫn tồn tại khá nhiều nguy hiểm. Cảnh báo trước: Hiện tại, mình sử dụng Fiddler để demo ở local. Tuy nhiên, hacker có thể làm các trò này khi dùng chung LAN/WLAN với bạn . Do đó, cần hết sức cẩn thận khi dùng wifi chùa/wifi công cộng nhé. Phần đăng nhập của trang này dùng do vậy mình không thể sniff được username, password. Tuy nhiên, các trang khác của lazada vẫn dùng . Khi người dùng vào các trang này mình có thể chôm được cookie, sử dụng cookie này để đăng nhập như thường. Ngày xưa, khi Facebook chưa dùng tụi mình cũng dùng cách này để sniff và đăng nhập account facebook của người khác. 2. Lần này mình sẽ lấy trang web của Ngân hàng ACB ra làm ví dụ. Trang này có sử dụng HTTPS cho trang giao dịch, nhưng trang chủ vẫn là HTTP. Mình có thể sửa packet để dẫn người dùng tới trang lừa đảo. Một số trường hợp khác, trang web dùng HTTPS nhưng vẫn tải hình ảnh, javascript , css qua Hacker vẫn có thể dễ dàng sửa nội dung javascript, trộm cookie như thường. Do đó, Google khuyến cáo sử dụng cho toàn bộ các trang và các link chứ đừng để kiểu giả cầy như thế này nhé. Kết Hiện tại Chrome cũng đang có kế hoạch thị các trang HTTP là không an toàn để cảnh báo cho người dùng. Ở những phiên bản sau, bạn sẽ thấy chữ “Not secure” trên thanh địa chỉ nếu trang web chỉ sử dụng HTTP. Hai điều quan trọng nhất về HTTP rút ra từ bài viết: HTTP không an toàn hay bảo mật. Tuyệt đối không bao giờ submit thông tin quan trọng (mật khẩu, số thẻ ngân hàng) qua HTTP! Sử dụng dể duyệt web cũng giống như nện gái mà không cần BCS. Nhiều khi dính bệnh chết lúc nào chẳng biết đấy! Rate this: Like this: Related
After a period of struggling, I also completed the first lesson in the Introduction to Security series. This article will discuss the "security" of the HTTP protocol. The websites of Lazada and ACB Bank will be cited as examples. Because the article is quite long, please read slowly. Review of HTTP HTTP is a protocol used to transmit and receive data (See more here). Currently, most data on the Internet is transmitted via the HTTP protocol. Web or Mobile applications also call Restful API via HTTP protocol. However, the disadvantage of HTTP is that data is transmitted in plain text, without encryption or security. This leads to hackers being able to easily eavesdrop, steal and edit data. People call this type of attack Man-in-the-middle attack, abbreviated as MITM. Summary of Man-in-the-middle attack Imagine you are flirting with a cute girl with a cute face and big breasts named Linh. To increase the romance, you don't text her but directly write a letter to her. At this point, you are the client, Linh is the server, sending mail is via HTTP protocol. Of course, beautiful flowers are full of flies. There is an evil and despicable hacker trying to disrupt you. Let's call this guy Hoang Che Ho. The Hoang Hoang can disrupt you in the following ways: 1. Sniff packets to secretly read data. You happily put the letter in the mailbox, waiting for the letter to fly to Linh. The letter was on its way, Hoang caught it, opened it and saw all the sad feelings that you poured your heart into writing. In fact, when you send username and password via HTTP, hackers can easily steal this username and password by secretly reading packets on the network. (If you send an 18+ clip, it will still steal it). 2. Modify the packet Not only can it be read, that bad guy can also edit your message. You compliment Linh as beautiful as Maria Ozawa, then it changes to Happy Polla. Linh replied back, asking her to go to the motel at 5:00, but it changed to 5:15. You still don't know if anything has been swapped. By the time I finished reading, at 5:15 a.m. when I went to the motel, I saw the chess guy and Linh walking out hand in hand. (H is physically weak so it took 15 minutes to finish, you should sympathize with him). In fact, hackers can change the content you receive from the server, changing the information displayed on your computer. Both of these cases are quite dangerous because you don't know you're being attacked. This knowledge is extremely basic, many people have already said it, so I will not explain in detail the technical aspect. You can learn more about MITM Attack here: VNPro forum How to prevent Anti-MITM solutions in LAN networks are usually taken care of by SysAdmin or security experts, through system settings. As developers, the most basic prevention we can do is to use HTTPS protocol for applications, by adding SSL Certificate. Data communicated via HTTPS is encrypted so outsiders cannot read or edit it. This method is similar to when you and Linh write emails to each other using teencode. Even if that bad guy Hoang reads the email, he won't be able to understand or edit it. Although the security of HTTPS is not absolute, it is still much higher than just using plain HTTP. Within the scope of this article, I will not learn more about the security errors of HTTPS. I hope the pros can comment. In addition, if your website cannot be integrated yet, you can integrate the login function through Facebook or Google. Although hackers can still steal users' cookies, at least they will not reveal their usernames and passwords. Note: Currently, many websites still use "civet" - only used on log-in pages and pages with sensitive data. This method still has many dangers. Warning: Currently, I use Fiddler for local demos. However, hackers can do these tricks when sharing the same LAN/WLAN with you. Therefore, you need to be very careful when using temple wifi/public wifi. The login part of this page is used so I cannot sniff the username and password. However, other Lazada sites still use . When users visit these pages, they can steal cookies and use them to log in as usual. In the past, when Facebook was not yet used, we used this method to sniff and log into other people's Facebook accounts. 2. This time I will take ACB Bank's website as an example. This site uses HTTPS for the transaction page, but the home page is still HTTP. I can edit the packet to lead users to a phishing page. In some other cases, the website uses HTTPS but still downloads images, javascript, and css via Hackers can still easily edit the javascript content and steal cookies as usual. Therefore, Google recommends using it for all pages and links, not fake styles like this. Conclusion Currently, Chrome is also planning to display HTTP pages as unsafe to warn users. In later versions, you will see “Not secure” in the address bar if the website only uses HTTP. The two most important takeaways about HTTP from the article: HTTP is not safe or secure. Absolutely never submit important information (passwords, bank card numbers) via HTTP! Using it to browse the web is like hitting on a girl without a condom. Many times, people get sick and die without knowing it! Rate this: Like this: Related
Trong bài viết hôm nay, mình sẽ giới thiệu một phương pháp bảo mật vô cùng đơn giản, hiệu quả nhưng lại được ít người biết và áp dụng. Đó là phương pháp: Giấu thông tin hệ thống. Thông tin hệ thống là gì? Có thể tạm hiểu thông tin hệ thống là những thông tin về cấu tạo và hoạt động của hệ thống đó. Lấy lottecinema ra làm ví dụ. Thông tin về hoạt động là file log, error page hiển thị khi bị lỗi. Thông tin về cấu tạo của trang này như sau (Lí do làm sao mình biết được thì các bạn theo dõi phần sau): Trang chính sử dụng KenticoCMS. Phiên bản sử dụng là ASP.NET WebForm 2.0 Theo dự đoán thì do dùng ASP.NET nên database sẽ là MS SQL Server Trang web có sử dụng jQuery và jQueryUI Trang web được deploy trên Server ISS7 Chắc bạn đang tự hỏi: Ủa, nếu hệ thống của mình không làm gì mờ ám thì sao phải giấu? Ừ nhỉ! Hãy tưởng tượng nhà bạn là tiệm vàng có rất nhiều tiền và vàng bạc. Liệu bạn có treo biển “Góc dưới hàng rào có lỗ hổng, két sắt nhà tao để ở lầu 3, két hiệu Việt Tiến, mật khẩu 4 chữ số” không? Dĩ nhiên, bạn không bao giờ để thông tin nhà cửa hớ hênh cho ăn trộm biết. Điều này giống như mời trộm vào nhà vậy. Tuy nhiên, đa phần chúng ta lại để “hớ hênh” thông tin hệ thống cho hacker thấy. Thế có khác gì mời hacker tấn công không cơ chứ!! Chúng ta để thông tin hệ thống “hớ hênh” như thế nào? Chúng ta thường để lộ thông tin hệ thống một cách rất “hớ hênh”, không thua gì cách em Linh Miu khoe thân trong mấy bộ đồ thiếu vải (Điển hình là vụ lộ vếu nổi đình nổi đám gần đây). Dưới đây là một số kiểu lộ thông tin thường thấy: Tất cả những thông tin này đều có thể dễ dàng truy ra bằng buildwith . Trang này hoạt động trên nguyên lý đọc các header trả về từ server, xem HTML include các thư viện nào. Những hậu quả của việc “lộ hàng” Những thông tin “vô hại” này cũng vô tình “giúp đỡ” hacker tấn công hệ thống của bạn dễ dàng hơn bằng những cách sau: Biết được phiên bản thư viện/framework sử dụng, phiên bản server, phiên bản database,… hacker có thể tìm ra lỗ hổng bảo mật (CVE) của hệ thống. Việc tra cứu rất dễ dàng, chỉ cần vào nvd.nist.gov . Dựa theo phiên bản framework/server/database, hacker có thể thấy được những lỗ hổng bảo mật của các phiên bản này. Từ các lỗ hổng này, hacker có thể tìm cách tấn công hệ thống . Ví dụ như trong bài viết này , bạn Juno_okyo đã hack vietdesigner và kenhsinhvien vì 2 trang này đã lộ thông tin, cho hacker biết được plugin chúng đang sử dụng. Juno_okyo tiếp tục đọc code (open source) để tìm ra lỗ hổng của plug-in và tấn công 2 trang này. Ngoài ra, khi biết được framework đang sử dụng, hacker có thể mò ra đường dẫn tới trang admin (Với wordpress là /wp-admin , với joomla là /administrator , với phpmyadmin là /phpmyadmin ). Tiếp theo, hacker có thể thử nhập username/password admin mặc định để đăng nhập vào hệ thống. Đáng sợ chưa?? Với mobile app hoặc phần mềm, hacker có thể decompile để chôm API hoặc security key . Chẳng giấu gì các bạn, mình cũng từng decompile file API của Simsimi để lấy Key và API miễn phí gắn vào chat bot facebook ấy… “Giấu hàng” như thế nào cho đúng? Cảnh giới cao nhất của việc giấu hàng là hacker không thể biết được hệ thống của bạn được viết ngôn ngữ /framework gì, dùng database gì, deploy ở đâu. Điều này làm công việc của hacker trở nên khó khăn hơn rất nhiều. Thật ra, việc giấu thông tin hệ thống cũng không quá khó khăn hay mất thời gian . Chỉ cần bạn để ý và cẩn trọng là được. Một số phương pháp “giấu thông tin” hay dùng: Config server hoặc viết code để loại bỏ những HTTP header dư thừa. Khi deploy, ta obfustace hoặc uglify code để code trở nên khó đọc. Để tránh việc hacker biết các thư viện JS sử dụng thì ta có thể bundle toàn bộ thư viện và code thành 1 file luôn. Khi hệ thống bị thống, hiển thị custom Error Page. Lỗi trong trang này nên giải thích rõ ràng cho người dùng hiểu. Nhưng tuyệt đối không hiển thị trực tiếp error/exception để tránh hacker tấn công. Thường xuyên cập nhật/nâng cấp framework lên phiên bản mới nhất để vá các lỗ hỗng, tránh việc hacker lợi dụng những lỗ hổng đã phát hiện ở phiên bản cũ. Bạn nào có kinh nghiệm giấu thông tin hệ thống, hoặc từng tấn công hệ thống dựa theo thông tin của nó, hãy comment chia sẻ vào bài viết nhé :D. Rate this: Like this: Related
In today's article, I will introduce a security method that is extremely simple and effective but is known and applied by few people. That's the method: Hide system information. What is system information? System information can be temporarily understood as information about the structure and operation of that system. Take lottecinema as an example. Operational information is the log file, error page displayed when there is an error. Information about the structure of this page is as follows (For how I know, you can follow the following section): Main page uses KenticoCMS. The version used is ASP.NET WebForm 2.0 According to predictions, due to using ASP.NET, the database will be MS SQL Server The site uses jQuery and jQueryUI The website is deployed on Server ISS7 You're probably wondering: Well, if my system doesn't do anything shady, why hide it? Yes! Imagine your home is a jewelry store with a lot of money and gold. Would you hang a sign "There is a hole in the corner under the fence, my safe is on the 3rd floor, Viet Tien safe, 4-digit password"? Of course, you should never leave your house information out to thieves. This is like inviting a thief into your house. However, most of us "disclose" system information for hackers to see. Is that any different from inviting hackers to attack!! How do we let system information "disappear"? We often reveal system information in a very "indiscreet" way, not unlike the way Linh Miu shows off her body in skimpy clothes (A typical example is the recent famous breast exposure incident). Here are some common types of information disclosure: All of this information can be easily traced using buildwith . This page operates on the principle of reading the headers returned from the server, seeing which libraries the HTML includes. Consequences of "revealing" This "harmless" information also unintentionally "helps" hackers attack your system more easily in the following ways: Knowing the library/framework version used, server version, database version, etc. hackers can find security holes (CVEs) in the system. Looking up is easy, just go to nvd.nist.gov . Based on the framework/server/database version, hackers can see the security vulnerabilities of these versions. From these vulnerabilities, hackers can find ways to attack the system. For example, in this article, Juno_okyo hacked vietdesigner and kenhsinhvien because these two sites revealed information, letting hackers know the plugin they were using. Juno_okyo continues to read the code (open source) to find plug-in vulnerabilities and attack these two sites. In addition, when knowing the framework being used, hackers can find the path to the admin page (For wordpress it is /wp-admin, for Joomla it is /administrator, for phpmyadmin it is /phpmyadmin). Next, the hacker can try to enter the default admin username/password to log into the system. Scary yet?? With mobile app or software, hackers can decompile to steal API or security key. I'm not hiding anything from you guys, I also decompiled Simsimi's API file to get the free Key and API to attach to the Facebook chat bot... How to "hide goods" properly? The highest level of hiding goods is that hackers cannot know what language/framework your system is written in, what database it uses, and where it is deployed. This makes the hacker's job much more difficult. Actually, hiding system information is not too difficult or time-consuming. You just need to pay attention and be careful. Some commonly used methods of "hiding information": Config server or write code to remove redundant HTTP headers. When deploying, we obfustace or uglify the code to make the code difficult to read. To avoid hackers knowing the JS libraries used, we can bundle the entire library and code into 1 file. When the system crashes, display a custom Error Page. Errors on this page should be clearly explained to users. But absolutely do not display error/exception directly to avoid hacker attacks. Regularly update/upgrade the framework to the latest version to patch vulnerabilities, avoiding hackers from taking advantage of vulnerabilities discovered in old versions. If you have experience hiding system information, or have ever attacked the system based on its information, please comment and share on the article :D. Rate this: Like this: Related
Đầu tháng 10 này, theo chương trình học, mình phải qua Quảng Châu 6 tháng để thực tập trước khi về lại UK để kết thúc học phần. Qua bên này, tiếp xúc với một nền văn hoá mới, mình gặp được nhiều bạn bè mới và thấy nhiều thứ khá mới lạ. Đó là mục đích khiến mình viết series “Chuyện bên Khựa” này. Series này sẽ nói về cuộc sống ăn chơi đàn đúm, … nhầm, học tập của mình ở bên này, đồng thời chia sẻ những điều hay ho ở Tàu với các bạn. Quảng Châu nằm ở đẩu ở đâu? Sẵn giới thiệu chút về thành phố mình đang ở luôn. Quảng Châu là thành phố lớn thứ 3 bên Khựa (Sau Bắc Kinh và Thượng Hải), nằm trong địa phận tỉnh Quảng Đông. Đặc trưng của thành phố này là ăn chơi đập đá, … nhầm, ăn uống . Do đó dân Khựa có câu là “Ăn mặc thì đến Thượng Hải, ăn nhậu thì đến Quảng Châu”. Địa điểm nổi tiếng nhất Quảng Châu là Canton Tower. Nghe nói nó là tháp truyền hình cao thứ hai thế giới , chỉ đứng sau SkyTree của các bạn Nhật Bổn. Cấu tạo của tháp gồm các thanh thép uốn lượn ưỡn ẹo từ trên xuống dưới đúng như tính cách của các bạn Tàu Khựa. Chuyện ăn uống Nền ẩm thực Tung Của nói chung và Quảng Châu nói riêng vô cùng phong phú nên nói cả buổi chắc cũng chả hết, do vậy mình tóm tắt lại thôi vậy. Thức ăn chính bên này là cơm và mì nên cũng khá dễ ăn. Giá cả cũng tương đối rẻ , trong các quán bình dân từ 25-45k/phần, các quán sang chảnh thì 50-100k, cũng không mắc hơn là mấy so với Việt Nam. Đồ ăn đường phố thì đa dạng hơn nhiều: Cá viên, mực nướng (1 xâu khoảng 10k, mực tươi roi rói giòn sần sật), cánh gà nướng, thịt nướng, móng heo nướng, dim sum, bánh ngọt, … món nào cũng rẻ. Cầm khoảng 70k là đủ để bạn sẽ ăn thoả thuê ngập mõm. Nói chuyện ăn xong thì phải nói đến chuyện uống. Trung Quốc thì nổi tiếng là trà ngon. Cơ mà cái thứ trà đắng đắng đấy cứ để cho các cụ uống đi vậy, mình chỉ thích trà sữa thôi! Bên này thì số tiệm trà sữa còn nhiều hơn Việt Nam. Người người uống trà sữa, nhà nhà bán trà sữa! Theo quan sát của mình thì ở Quảng Châu có vẻ Gongcha nổi tiếng nhất, đi đâu cũng thấy. Chuyện sinh hoạt Trường mình liên kết với South China University of Technology nên mình đăng kí ở tạm kí túc xá trường luôn, đỡ tốn công tìm nhà bên ngoài. Kí túc xá không có phòng đơn nên mình ở chung với một anh người Ý tên Happy Polla, nhầm, Paolo. Anh giai này 30 tuổi rồi nhưng vẫn chưa có vợ. Chẳng hiểu duyên số thế nào mới qua đây được hai tuần, gặp được một bé TQ trong thư viện rồi tán phát đổ luôn ! Tính anh cũng khá vui, lại quảng giao nhiều nên mình cũng được hưởng ké, làm quen với nhiều bạn mới. Tiếng Khựa mình học mới khoảng một năm, chưa được thông thạo như tiếng Anh. Dân TQ lại ít dùng tiếng Anh nên mình qua đây cũng hơi khó sống :'(. Khổ một nổi, mặt mũi ngoại hình cũng mình là dân châu Á nên mỗi lần đi mua sắm, các bạn Khựa toàn xổ một tràng tiếng Khựa . Mỗi lần như vậy, mình toàn phải nói “Quỗ tưa Hàn Yũ bù hảo a” (Tiếng Khựa của ngộ hổng có hảo a), thật đắng lòng! Google cũng bị chặn nên không thể dùng Google được, đành phải dùng Baidu Translate. Cái app này khá hay, ngoài việc dịch tiếng Trung sang Anh còn có thể nhận diện giọng nói, dịch cả hình ảnh . Để tránh lệ thuộc vào app, mình chỉ dùng để dịch từ Anh sang Trung, sau đó tập nói tiếng Trung với dân bản địa cho quen. Còn một chuyện nữa mình cứ thắc mắc mãi. Khu mình ở là tập hợp khoảng 6-9 trường ĐH, còn gọi là làng Đại Học. Không hiểu tại sao trong này kí túc xá đầy ra mà bọn nó còn mở lắm nhà trọ thế nhỉ , có ai vào ở đâu? Thế mà trước giờ cứ tưởng bọn Tung Của giỏi làm ăn buôn bán lắm cơ!! Chuyện đi lại Mình vốn là đứa … mù đường, lúc trước ở UK mỗi lần đi đâu mình toàn phải dùng Google Maps để tìm đường trước. Đi xe buýt mà không có Google Maps là lạc đường chắc. Bên này Google bị chặn, nên mình phải dùng Baidu Maps thay thế. Ngẫm lại các bạn Baidu của Tung Của giỏi thật, mấy chức năng phức tạp của Google cũng nhái được cả . Ở Việt Nam chỉ có Cốc Cốc, chưa có Cốc Cốc Translate hay Cốc Cốc Maps, tiếc thật. Quảng Châu cũng khá hiện đại, mạng lưới giao thông công cộng rất OK . Cả thành phố có chính chuyến tàu điện ngầm. Giá vé dao động từ 10k-20ktheo khoảng cách, vừa nhanh vừa rẻ. Xe buýt thì vé rẻ như cho, chỉ 3k-10k. Ngoài ra, còn có một phương tiện khác là… xe đạp công cộng. Mỗi chiếc xe có một mã số khoá. Chỉ cần đăng nhập vào app, nhập biến số xe, bạn sẽ nhận được tin nhắn chứa mã khoá, sau đó mở khoá và đạp thôi. Mình nghe nói mấy chiếc xe này là do ý tưởng của một công ty startup. Giá rẻ gần như cho (Mỗi cây số khoảng 500 VNĐ) và miễn phí cho sinh viên. Chẳng hiểu thu nhập nó lấy đâu ra nữa, có khi không đủ tiền bảo trì xe ấy chứ. Kết Ở bên này còn khá nhiều điều thú vị nữa nhưng do bài viết cũng khá dài rồi nên mình tạm kết thúc ở đây nhé. Ở những bài sau mình sẽ kể thêm về giới trẻ Khựa và những điều mắt thấy tai nghe ở đây. Rate this: Like this: Related
In early October, according to the study program, I had to go to Guangzhou for 6 months to practice before returning to the UK to finish the course. Coming here, coming into contact with a new culture, I met many new friends and saw many quite new things. That is the purpose that led me to write this series "Stories from Khea". This series will talk about my life of playing around,... mistakes, and studying here, and at the same time share interesting things in China with you. Where is Guangzhou located? Let me introduce a little bit about the city I'm in. Guangzhou is the third largest city in China (After Beijing and Shanghai), located in Guangdong province. The characteristics of this city are partying, smashing rocks,... making mistakes, eating and drinking. Therefore, the Khoa people have a saying: "If you dress, you go to Shanghai, when you eat and drink, you go to Guangzhou." The most famous landmark in Guangzhou is Canton Tower. It is said that it is the second tallest television tower in the world, second only to Japan's SkyTree. The structure of the tower consists of steel bars winding from top to bottom, just like the personality of the Chinese people. Food and drink The cuisine of Tung Cua in general and Guangzhou in particular is extremely rich, so talking about it all day wouldn't be enough, so I'll just summarize it. The main food here is rice and noodles so it's quite easy to eat. The price is also relatively cheap, in popular restaurants from 25-45k/portion, in luxury restaurants it is 50-100k, not much more expensive than in Vietnam. Street food is much more diverse: fish balls, grilled squid (1 string costs about 10k, fresh squid is crispy and crunchy), grilled chicken wings, grilled meat, grilled pork claws, dim sum, cakes,... any dish. also cheap. Holding about 70k is enough for you to eat until your mouth is full. After talking about eating, we have to talk about drinking. China is famous for its delicious tea. But let the old people drink that bitter tea, I only like milk tea! Here, there are more milk tea shops than in Vietnam. Everyone drinks milk tea, everyone sells milk tea! According to my observations, Gongcha seems to be the most famous in Guangzhou, you can see it everywhere you go. Life story My school is affiliated with South China University of Technology, so I signed up to temporarily live in the school's dormitory, saving me the trouble of finding housing outside. The dorm didn't have a single room, so I shared it with an Italian guy named Happy Polla, wrongly, Paolo. This guy is 30 years old but still has no wife. I don't understand how fate was that I came here two weeks ago, met a Chinese girl in the library and then fell for it! He also has a very happy personality and is very sociable, so I also enjoy it and make many new friends. I've only been learning Chinese for about a year, but I'm not as fluent as English. Chinese people rarely use English, so it's a bit difficult for me to live here :'(. Unfortunately, I'm Asian in appearance and appearance, so every time I go shopping, Chinese people always speak a bunch of Chinese. Every time that happens, I have to say "Qu tua Han Yu buu ho ho ah" (My Chinese is not good ah), it's so sad! Google is also blocked so I can't use Google, so I have to use Baidu Translate. This app is quite good, in addition to translating Chinese to English, it can also recognize voices and translate images. To avoid depending on the app, I only use it to translate from English to Chinese, then practice speaking Chinese with it There's one more thing I keep wondering about. The area where I live is a group of about 6-9 universities, also known as University Village. I don't understand why there are so many dormitories here There are still so many motels open, where does anyone go? But I always thought that Tung Cua was good at doing business!! About traveling I'm a... blind person, I used to go to the UK every time I always have to use Google Maps to find my way first. Taking the bus without Google Maps is sure to get lost. Google is blocked here, so I have to use Baidu Maps instead. Thinking back, Tung Cua's Baidu friends are really good, even Google's complex functions can be imitated. In Vietnam there is only Coc Coc, there is no Coc Coc Translate or Coc Coc Maps, unfortunately. Guangzhou is also quite modern, the public transportation network is very good. The whole city has its own subway. Ticket prices range from 10k-20k according to distance, both fast and cheap. Bus tickets are cheap, only 3k-10k. In addition, there is another means of transport... public bicycles. Each car has a key code. Just log in to the app, enter the vehicle's variable number, you will receive a message containing the key code, then unlock and ride. I heard that these cars are the idea of ​​a startup company. The price is almost cheap (Each kilometer is about 500 VND) and free for students. I don't know where he gets his income from, maybe he doesn't have enough money to maintain the car. Conclusion There are many more interesting things here, but because the article is quite long, I will end here for now. In the following articles, I will tell more about Khoa youth and what I have seen and heard here. Rate this: Like this: Related
Giới thiệu về XSS XSS (Cross Site Scripting) là một lỗi bảo mật cho phép hacker nhúng mã độc (javascript) vào một trang web khác . Hacker có thể lợi dụng mã độc này để deface trang web, cài keylog, chiếm quyền điều khiển của người dùng, dụ dỗ người dùng tải virus về máy. Các bạn có thể xem thêm demo trong vụ hack Lotte Cinema trước đây. Đây là một trong những lỗi bảo mật thường gặp nhất trên các trang Web. Các hệ thống từ lớn đến nhỏ như Facebook, Twitter, một số forum Việt Nam , … đều từng dính phải lỗi này. Do mức độ phổ biến và độ nguy hiểm của nó, XSS luôn được vinh dự được nằm trong top 10 lỗi bảo mật nghiêm trọng nhất trên OWASP ( Open Web Application Security Project ). Để tóm tắt, xin trích dẫn vài câu của thánh bảo mật Juno_okyo, người vừa hack 3 triệu tài khoản của server X nào đó. Những dạng XSS Trước đây, XSS thường nhắm vào code render HTML từ phía Server, ta gọi là Server XSS. Hai dạng Server XSS thường gặp là Persistent XSS và Reflected XSS. Ở đây, mình sẽ lấy một thanh niên tên Khoa ra làm ví dụ. Khoa là một sinh viên ĐH FPT , là fan của toidicodedao, thích lên thiendia để tìm địa điểm mátxa. 1. Persistent XSS Trên forum thiendia, khi bạn post một comment vào topic, server sẽ lưu comment bạn post và hiển thị dưới dạng HTML. Khi Khoa post “Em muốn tìm JAV”, server sẽ lưu lại và hiển thị như sau: Tuy nhiên, Khoa lại không hiền lành như thế. Do mới học về XSS, Khoa không nhập text mà nhập nguyên đoạn script alert(‘XXX’) vào khung comment. Lúc này, HTML của trang web sẽ trở thành: Trình duyệt sẽ chạy đoạn script này, hiển thị cửa sổ alert lên. Khoa đã chèn được mã độc vào thiendia, thực hiện tấn công XSS thành công. (Lưu ý: Mình chỉ ví dụ thôi, thiendia không bị lỗi XSS đâu nhé, các bạn không nên thử). Trong kiểu tấn công này, mã độc đựợc lưu trong database trên server , hiển thị ra với toàn bộ người dùng, do đó ta gọi nó là Persistance XSS. Bất kì ai thấy comment của Khoa đều bị dính mã độc này, do đó kiểu tấn công này có tầm ảnh hưởng lớ, khá nguy hiểm. 2. Reflected XSS Với cách tấn công này, hacker chèn mã độc vào URL dưới dạng query string. Khi người dùng ngáo ngơ nhấp vào URL này, trang web sẽ đọc query string, render mã độc vào HTML và người dùng “dính bẫy”. Quay lại với Khoa. Do xin địa chỉ mát xa hoài nhưng không được share, Khoa cay cứ, quyết định trả thù các đàn anh. Khoa bèn gửi đường một đường link giả JAV vào mail các đàn anh. Nội dung đường link: ;</scrit> . Khi các đàn anh click link này, họ sẽ vào trang thiendia. Sau đó server sẽ render gọi hàm deleteAccount trong JavaScript để xoá account của họ . Tầm ảnh hưởng của ReflectedXSS không rộng bằng Persistance XSS, nhưng mức độ nguy hiểm là tương đương . Hacker thường gửi link có mã độc qua email, tin nhắn, … và dụ dỗ người dùng click vào. Do đó các bạn đừng vì ham JAV mà click link bậy bạ nhé, (Vì wordpress tự động lọc tag script nên mình phải để thành scrit . Các bạn đọc về “Chống XSS” ở phần dưới). 3. Client XSS Gần đây, khi JavaScript dần được sử dụng nhiều hơn, các lỗi Client XSS cũng bị lợi dụng nhiều hơn. Do JavaScript được sử dụng để xử lý DOM, mã độc được chèn thẳng vào trong JavaScript. Các lỗ hỗng dạng này khó tìm và phát hiện hơn Server XSS nhiều (Xem ví dụ: ). Cách phòng tránh Tôn chỉ của series “Bảo mật nhập môn” là : Hack để học, chứ đừng học để hack. Mục tiêu của mình không phải là hướng dẫn các bạn đi hack và quậy phá các site khác, mà là dạy bạn biết và phòng chống những đòn tấn công này. Vì XSS là một dạng tấn công hay gặp, dễ gây hậu quả cao nên hầu như các Web Framework nổi tiếng (Spring, Django, ASP.NET MVC) đều tích hợp sẵn cách phòng chống. Dù bạn là dân ngoại đạo, không biết gì về XSS, chỉ cần sử dụng framework bản mới nhất là đã đề phòng được kha khá lỗi rồi. Lỗi XSS này cũng khá dễ fix, quan trọng là lỗi này thường gặp ở nhiều trang, dễ sót, do đó sau khi fix ta phải verify cần thận. Có 3 phương pháp thường dùng fix lỗi này: 1. Encoding Không được tin tưởng bất kì thứ gì người dùng nhập vào!! Hãy sử dụng hàm encode có sẵn trong ngôn ngữ /framework để chuyển các kí tự < > thành &lt; %gt;. 2. Validation/Sanitize Một cách chống XSS khác là validation: loại bỏ hoàn toàn các kí tự khả nghi trong input của người dùng, hoặc thông báo lỗi nếu trong input có các kí tự này. Ngoài ra, nếu muốn cho phép người dùng nhập vào HTML, hãy sử dụng các thư viện sanitize. Các thư viện này sẽ lọc các thẻ HTML, CSS, JS nguy hiểm để chống XSS. Người dùng vẫn có thể sử dụng các thẻ <p>, <span>, <ul> để trình bày văn bản. Làm ơn, xin nhắc lại, làm ơn dùng các thư viện sẵn có chứ đừng “hổ báo” viết lại để thể hiện trình độ. Đã có rất nhiều trường hợp dính lỗi XSS vì developer tự tin và tự viết code để loại bỏ kí tự đặc biệt và… để sót. 3. CSP (Content Security Policy) Hiện tại, ta có thể dùng chuẩn CSP để chống XSS. Với CSP, trình duyệt chỉ chạy JavaScript từ những domain được chỉ định. Giả sử có sử dụng CSP, chỉ chạy JavaScript có nguồn gốc . Vì Khoa để mã độc trên nên đoạn JavaScipt sau sẽ không được thực thi. Để sử dụng CSP, server chỉ cần thêm header Content-Security-Policy vào mỗi response. Nội dung header chứa những domain mà ta tin tưởng. Lời kết Nói hơi chủ quan tí (do mình ko ưa PHP), số lượng trang web xây dựng bằng PHP bị lỗi XSS là nhiều nhất. Lí do thứ nhất là do số lượng web viết bằng PHP cực nhiều . Lí do thứ hai là mặc định PHP không encode các kí tự lạ . Các CMS của PHP như WordPress, Joomla rất mạnh với vô số plug-in. Tuy nhiên nhiều plug-in viết ẩu là nguyên nhân dẫn đến lỗi bảo mật này. Hiện tại, số lượng website bị lỗi XSS là khá nhiều, các bạn chỉ cần lang thang trên mạng là sẽ gặp. Vì lý do đạo đức, mong các bạn noi gương anh juno_okyo, khi phát hiện thì thông báo cho admin để người ta sửa chứ đừng chơi trò hack “trẻ trâu” như mình nhé. Như mình đã nói, XSS là một lỗi rất cơ bản , hầu như hacker nào cũng biết. Trang web bị lỗi này rất dễ thành mồi ngon cho hacker. Do vậy, các bạn developer nhớ cẩn thận, đừng để web của mình bị dính lỗi này. Ai code xong rồi thì về check xem mình có dính không , ai đang code thì vừa code vừa check lại . Nhớ like và share bài viết này với nhiều developer để mọi người cùng phòng tránh nhé. Một số link tham khảo: Rate this: Like this: Related
Introduction to XSS XSS (Cross Site Scripting) is a security error that allows hackers to embed malicious code (javascript) into another website. Hackers can take advantage of this malicious code to deface websites, install keylogs, take control of users, and lure users to download viruses to their computers. You can see more demos in the previous Lotte Cinema hack. This is one of the most common security errors on Web sites. Systems from large to small such as Facebook, Twitter, some Vietnamese forums, ... have all encountered this error. Due to its popularity and danger, XSS is always honored to be in the top 10 most serious security errors on OWASP (Open Web Application Security Project). To summarize, let me quote a few sentences from security saint Juno_okyo, who just hacked 3 million accounts of a certain server X. Types of XSS Previously, XSS often targeted HTML rendering code from the Server side, which we called Server XSS. Two common forms of Server XSS are Persistent XSS and Reflected XSS. Here, I will take a young man named Khoa as an example. Khoa is a student at FPT University, a fan of toidicodedao, and likes to go to thiendia to find massage places. 1. Persistent XSS On thiendia forum, when you post a comment to a topic, the server will save the comment you post and display it in HTML. When Khoa posts "I want to find JAV", the server will save and display the following: However, Khoa is not that gentle. Because he was new to XSS, Khoa did not enter text but entered the entire script alert('XXX') into the comment box. At this point, the HTML of the website will become: The browser will run this script, displaying an alert window. Khoa inserted malicious code into thiendia and successfully performed an XSS attack. (Note: I'm just an example, thiendia does not have XSS errors, you should not try it). In this type of attack, malicious code is stored in the database on the server, visible to all users, so we call it Persistance XSS. Anyone who sees Khoa's comment will be infected with this malicious code, so this type of attack has a large impact and is quite dangerous. 2. Reflected XSS With this attack, hackers insert malicious code into the URL in the form of a query string. When a bewildered user clicks on this URL, the website will read the query string, render malicious code into the HTML, and the user will "fall into the trap". Back to Khoa. Because he kept asking for massage addresses but couldn't share them, Khoa became angry and decided to take revenge on his seniors. Khoa then sent a fake JAV link to his seniors' email. Link content: ;</scrit> . When the seniors click this link, they will go to the thiendia page. The server will then render and call the deleteAccount function in JavaScript to delete their account. The influence of ReflectedXSS is not as wide as Persistent XSS, but the level of danger is equivalent. Hackers often send links with malicious code via email, text message, etc. and entice users to click on them. Therefore, don't click on useless links because of JAV greed (Because wordpress automatically filters script tags, so I have to leave them as scripts. Read about "Anti-XSS" below). 3. Client XSS Recently, as JavaScript is gradually being used more, Client XSS errors are also being exploited more. Since JavaScript is used to process the DOM, malicious code is injected directly into the JavaScript. Vulnerabilities of this type are much more difficult to find and detect than Server XSS (See example:). How to avoid the principle of the "Introductory Security" series is: Hack to learn, not learn to hack. My goal is not to guide you to hack and disrupt other sites, but to teach you to know and prevent these attacks. Because XSS is a common form of attack that can easily cause high consequences, most famous Web Frameworks (Spring, Django, ASP.NET MVC) have built-in prevention methods. Even if you are an outsider and don't know anything about XSS, just use the latest version of the framework to prevent quite a few errors. This XSS error is also quite easy to fix. The important thing is that this error is common on many pages and is easy to miss, so after fixing it we must verify carefully. There are 3 commonly used methods to fix this error: 1. Encoding Do not trust anything the user enters!! Use the encode function available in the /framework language to convert the characters < > to < %gt;. 2. Validation/Sanitize Another way to prevent XSS is validation: completely remove suspicious characters from the user's input, or report an error if these characters are present in the input. Additionally, if you want to allow users to input HTML, use the sanitize libraries. These libraries will filter dangerous HTML, CSS, JS tags to prevent XSS. Users can still use <p>, <span>, <ul> tags to present text. Please, I repeat, please use existing libraries and don't "aggressively" rewrite them to show your proficiency. There have been many cases of XSS errors because developers were confident and wrote their own code to remove special characters and... left them out. 3. CSP (Content Security Policy) Currently, we can use the CSP standard to prevent XSS. With CSP, the browser only runs JavaScript from specified domains. Assuming CSP is used, only run native JavaScript. Because Khoa left the above malicious code, the following JavaScipt will not be executed. To use CSP, the server simply adds the Content-Security-Policy header to each response. The header content contains domains that we trust. Conclusion It's a bit subjective (because I don't like PHP), the number of websites built with PHP that have XSS errors is the largest. The first reason is because the number of websites written in PHP is extremely large. The second reason is that by default PHP does not encode strange characters. PHP CMSs like WordPress and Joomla are very powerful with countless plug-ins. However, many poorly written plug-ins are the cause of this security error. Currently, the number of websites with XSS errors is quite large, you just need to wander online to see them. For ethical reasons, I hope you follow juno_okyo's example, when you find out, notify the admin so they can fix it, don't play "young" hacking games like me. As I said, XSS is a very basic error that almost every hacker knows. This faulty website is easy prey for hackers. Therefore, developers remember to be careful, don't let your website get this error. Whoever has finished coding should go back and check to see if they are stuck. Whoever is coding should code and check again. Remember to like and share this article with many developers so everyone can avoid it. Some reference links: Rate this: Like this: Related
Cookie là một khái niệm hết sức cơ bản mà ta được học khi mới lập trình web. Tuy nhiên, nếu sử dụng không đúng cách, nó sẽ thành “mồi ngon” cho vô số hacker. Bài viết này sẽ đề cập đến những cách hacker mà có thể lợi dụng cookie để chiếm quyền người dùng, tấn công hệ thống, cùng với phương pháp sử dụng cookie đúng cách để ngăn chặn những lỗ hổng này nhé. Cookie – Chiếc “bánh qui” vô hại? Server và client giao tiếp với nhau thông qua giao thức HTTP . Đặc điểm của giao thức này là stateless. Server không thể biết được 2 request có tới từ cùng 1 client hay không. Vì đặt điểm này, cookie ra đời. Về bản chất, cookie là một file text nhỏ được server gửi về client, sau đó browser lưu vào máy người dùng. Khi client gửi request tới server, nó sẽ gửi kèm cookie . Server dựa vào cookie này để nhận ra người dùng. Cookie thường có name, value, domain và expiration: Name, đi kèm với value: Tên cookie và giá trị của cookie đó Domain: Domain mà cookie được gửi lên. Như ở hình dưới, cookies chỉ được gửi khi client truy cập Expiration: Thời gian cookie tồn tại ở máy client. Quá thời gian này, cookie sẽ bị xoá. Bánh qui nho nhỏ, đầy những lỗ to to Sau khi tìm hiểu cơ bản về cookie, ta sẽ tìm hiểu những lỗi bảo mật mà cookie có thể gây ra nhé. Như mình đã nói, cookie được gửi kèm theo mỗi request lên server. Server dựa theo cookie để nhận dạng người dùng. Do đó, nếu có thể “chôm cookie” của người khác, ta có thể mạo danh người đó. Cookie có thể bị chôm theo các con đường sau: Sniff cookie qua mạng: Sử dụng 1 số tool đơn giản để sniff như Fiddler, Wireshark, ta có thể chôm cookie của người dùng ở cùng mạng. Sau đó, sử dụng EditThisCookie để dump cookie này vào trình duyệt để mạo danh người dùng. (Xem demo bài HTTP ). Chôm cookie (Cookie thief) bằng XSS: Với lỗ hỗng XSS, hacker có thể chạy mã độc (JavaScript) ở phía người dùng. JS có thể đọc giá trị từ cookie với hàm document.cookie . Hacker có thể gửi cookie này tới server của mình. Cookie này sẽ được dùng để mạo danh người dùng. Thực hiện tấn công kiểu CSRF (Cross-site request forgery). Hacker có thể post một link ảnh như sau: Trình duyệt sẽ tự động load link trong ảnh, dĩ nhiên là có kèm theo cookie . Đường link trong ảnh sẽ đọc cookie từ request, xác nhận người dùng, rút sạch tiền mà người dùng không hề hay biết. Cách tấn công này có rất nhiều biến thể, mình sẽ nói rõ ở bài viết sau. Cách phòng chống Xin nhắc lại lần thứ n, các bạn học cách tấn công Website để biết mà phòng chống chứ không nên dùng để đi hack phá làng phá xóm nhé. Nếu gặp lỗ hổng bảo mật ở trang web nào khác, vui lòng gửi mail thông báo cho admin để họ sửa chữa chứ đừng hack rồi khoe Facebook nhé. Phần này của bài viết sẽ hướng dẫn các bạn cách sử dụng cookie đúng cách để tránh những lỗi bảo mật không đáng có. Nhớ set Expired và Max-Age : Để giảm thiểu thiệt hại khi cookie bị trộm, ta không nên để cookie sống quá lâu. Nên set thời gian sống của cookie trong khoảng 1 ngày tới 3 tháng, tuỳ theo yêu cầu của application. Sử dụng Flag HTTP Only : Cookie có flag này sẽ không thể truy cập thông qua hàm document.cookie . Do đó, dù web có bị lỗi XSS thì hacker không thể đánh cắp được nó. Sử dụng Flag Secure : Cookie có flag này chỉ được gửi qua giao thức HTTPS , hacker sẽ không thể sniff được. Vì cookie dễ bị tấn công, tuyệt đối không chứa những thông tin quan trọng trong cookie (Mật khẩu, số tài khoản, …). Nếu bắt buộc phải lưu thì cần mã hoá cẩn thận. Note thêm: Nếu website của bạn sử dụng RESTful API, đừng sử dụng cookie để authorize người dùng mà hãy dùng OAuth hoặc WebToken . Token này được vào Header của mỗi request nên sẽ không bị dính lỗi CRSF nhé. Các bạn có thể tìm hiểu thêm về cookie và các lỗi bảo mật liên quan ở đây: Rate this: Like this: Related
Cookies are a very basic concept that we learn when we first start web programming. However, if used incorrectly, it will become "easy bait" for countless hackers. This article will cover ways hackers can take advantage of cookies to gain user rights and attack the system, along with methods to properly use cookies to prevent these vulnerabilities. Cookie – A harmless “cookie”? Server and client communicate with each other via HTTP protocol. The characteristic of this protocol is stateless. The server cannot know whether two requests come from the same client or not. Because of this point, cookies were born. In essence, a cookie is a small text file sent by the server to the client, then the browser saves it to the user's computer. When the client sends a request to the server, it sends a cookie. The server relies on this cookie to recognize the user. Cookies usually have a name, value, domain and expiration: Name, accompanied by value: Cookie name and value of that cookie Domain: Domain to which the cookie is sent. As shown in the image below, cookies are only sent when the client accesses Expiration: The time the cookie exists on the client computer. After this time, the cookie will be deleted. Small cookies, full of big holes After learning the basics about cookies, we will learn about the security errors that cookies can cause. As I said, cookies are sent with each request to the server. The server relies on cookies to identify users. Therefore, if we can "steal cookies" from someone else, we can impersonate that person. Cookies can be stolen in the following ways: Sniff cookies over the network: Using some simple sniffing tools such as Fiddler, Wireshark, we can steal cookies from users on the same network. Then use EditThisCookie to dump this cookie into the browser to impersonate the user. (See HTTP demo article). Stealing cookies (Cookie thief) using XSS: With XSS vulnerabilities, hackers can run malicious code (JavaScript) on the user's side. JS can read values ​​from cookies with the document.cookie function. Hackers can send this cookie to their server. This cookie will be used to impersonate the user. Perform a CSRF (Cross-site request forgery) attack. Hackers can post an image link as follows: The browser will automatically load the link in the image, of course with cookies included. The link in the image will read the cookie from the request, authenticate the user, and withdraw money without the user knowing. This attack has many variations, I will explain clearly in the next article. How to prevent Let me repeat for the nth time, you learn how to attack websites so you know how to prevent them, and should not be used to hack and destroy villages. If you encounter a security hole on any other website, please send an email to notify the admin so they can fix it, don't hack it and show it off to Facebook. This part of the article will guide you how to use cookies properly to avoid unnecessary security errors. Remember to set Expired and Max-Age: To minimize damage when cookies are stolen, we should not let cookies live too long. You should set the cookie's lifespan from 1 day to 3 months, depending on the application's requirements. Use the HTTP Only Flag: Cookies with this flag will not be accessible through the document.cookie function. Therefore, even if the website has an XSS error, hackers cannot steal it. Use Flag Secure: Cookies with this flag are only sent via HTTPS protocol, hackers will not be able to sniff them. Because cookies are easily attacked, they absolutely do not contain important information in cookies (Passwords, account numbers, etc.). If it must be saved, it needs to be carefully encrypted. Additional note: If your website uses RESTful API, do not use cookies to authorize users but use OAuth or WebToken . This token is included in the Header of each request so it will not get CRSF errors. You can learn more about cookies and related security errors here: Rate this: Like this: Related
Một số bạn sinh viên hay hỏi mình về việc nên cập nhật kiến thức ở đâu, nên tham gia các cộng đồng lập trình nào. Trước đây mình đã có một bài viết giới thiệu về Medium , Top 5 blog IT đáng đọc , … Tuy nhiên, các trang này viết bằng tiếng Anh nên các bạn tiếng Anh không tốt sẽ khá khó tiếp cận. Do vậy, hôm nay mình sẽ giới thiệu 2 công đồng lập trình khá thú vị ở Việt Nam: kipalog và daynhauhoc . Hi vọng chúng sẽ có ích cho các bạn. Daynhauhoc (Dậy – Nhậu – Học) Cộng đồng daynhauhoc (dạy nhau học) được thành lập vào khoảng 2014-2015. Founder là anh Lê Trần Đạt . Anh cũng có khá nhiều clip dạy học và khoá học trên youtube . Daynhauhoc là một forum mở. Ở đây, các bạn có thể thoải mái lập topic bàn luận, hỏi đáp thắc mắc. Các bạn có thể hỏi về đủ vấn đề từ kĩ thuật, bảo mật , ngôn ngữ lập trình cho tới hướng nghiệp, học tập. Forum sử dụng mã nguồn mở Discourse nên UI/UX rất là ok . Không chỉ vậy, daynhauhoc còn có các thành viên rất năng nổ, nhiệt tình , sẵn sàng tận tình trả lời mọi câu hỏi của bạn. Lưu ý là mọi người ở đây không phải dân giải bài tập hộ , do đó các bạn đừng mang bài tập về nhà lên hỏi nhé. Daynhauhoc cũng có một số khoá học free/event rất hay . Điển hình là event mỗi tháng một hoá đơn sách: Tài khoản nào được nhiều like nhất trong 1 tháng sẽ được tặng 1 hoá đơn sách trị giá 170k. À, các bạn đừng hiểu lầm nhe, không phải do tháng trước mình vừa được tặng 170k tiền sách nên hôm nay viết bài PR cho daynhauhoc đâu nha =))). Kipalog (Keep A Log) Khác với daynhauhoc, kipalog là một nền tảng chia sẻ kiến thức cho lập trình viên. Kipalog tập trung vào chất lượng của bài viết. Mỗi bài viết của lập trình viên sẽ được cộng đồng đánh giá, những bài viết hay sẽ được lên top (Như haivl ngày xưa ấy). Điểm mạnh của kipalog là cộng đồng tác giả ở đây rất giỏi và trâu bò : Huy Trần , huydx , thánh bựa quocnguyen với series nodeepshit , thánh bảo mật juno_oyko vừa hack 3 triệu tài khoản server X, thánh chém gió Huy Hoàng Phạm chủ blog toidicodedao , thánh FA Hoàng Nguyễn codeaholicguy,… Các bài viết của kipalog rất chất lượng, đủ các thể loại từ code tới deploy, từ front-end tới back-end, từ technical tới soft skill. Nếu muốn thử sức với việc viết blog , các bạn có thể bắt đầu bằng cách đăng một vài bài viết đơn giản trên này trước. Trình soạn thảo markdown của kipalog Kipalog hỗ trợ trình soạn thảo markdown, giúp bạn viết và đăng bài vô cùng dễ dàng và nhanh chóng. Cộng đồng kipalog cũng khá đông, bài viết của bạn sẽ được nhiều người đọc hơn so với tự làm blog cá nhân. Ngoài ra, sẽ có nhiều người vào bình luận và góp ý cho bạn. Các bạn nhớ follow tài khoản kipalog của mình ở đây nhé: Kết luận Nếu có thời gian rảnh, hãy ghé và tham gia 2 công đồng lập trình này thường xuyên. Không chỉ học được nhiều điều hay ho hấp dẫn, bạn còn có thể làm quen được nhiều lập trình viên pro, đồng thời tạo dựng danh tiếng cho bản thân nữa đấy! Ngoài ra, nếu các bạn biết cộng đồng nào nữa thì cứ share trong phần comment nhé! Rate this: Like this: Related
Some students often ask me about where to update my knowledge and which programming communities to join. Previously, I had an article introducing Medium, Top 5 IT blogs worth reading,... However, these pages are written in English so those who are not good at English will find it quite difficult to access. Therefore, today I will introduce two quite interesting programming communities in Vietnam: kipalog and daynhauhoc. Hope they will be useful to you. Daynhauhoc (Wake up – Drink – Study) The daynhauhoc (teach each other to learn) community was established around 2014-2015. Founder is Mr. Le Tran Dat. He also has many teaching clips and courses on YouTube. Daynhauhoc is an open forum. Here, you can freely create discussion topics and ask and answer questions. You can ask about all kinds of issues from technology, security, programming languages ​​to career guidance and study. The forum uses open source Discourse so the UI/UX is very ok. Not only that, daynhauhoc also has very energetic, enthusiastic members, ready to wholeheartedly answer all your questions. Note that everyone here is not a problem solver, so don't bring your homework to ask. Daynhauhoc also has some great free courses/events. A typical event is a book receipt every month: The account with the most likes in a month will be given a book receipt worth 170k. Oh, don't misunderstand, it's not because I was given 170k for books last month that I'm writing a PR article for daynhauhoc today =))). Kipalog (Keep A Log) Different from daynhauhoc, kipalog is a knowledge sharing platform for programmers. Kipalog focuses on the quality of the writing. Each programmer's article will be evaluated by the community, good articles will be at the top (Like haivl in the old days). The strong point of kipalog is that the author community here is very good and strong: Huy Tran, Huydx, saint quocnguyen with the nodeepshit series, security saint juno_oyko who just hacked 3 million X server accounts, saint of gossip Huy Hoang Pham, blog owner. toidicodedao, saint FA Hoang Nguyen codeaholicguy,... kipalog's articles are very high quality, with all genres from code to deployment, from front-end to back-end, from technical to soft skills. If you want to try blogging, you can start by posting a few simple articles here first. kipalog's markdown editor Kipalog supports a markdown editor, helping you write and post extremely easily and quickly. The kipalog community is also quite large, your articles will be read by more people than if you create your own personal blog. In addition, many people will comment and give you suggestions. Remember to follow my kipalog account here: Conclusion If you have free time, please visit and join these two programming communities regularly. Not only will you learn many interesting and interesting things, you can also get to know many pro programmers and build a reputation for yourself! In addition, if you know of any other communities, please share in the comments! Rate this: Like this: Related
Dạo gần đây mình bận học hành ở UK, về tới Việt Nam thì bận ăn chơi nhảy múa du lịch nên cũng không để ý đến chỉ số của blog cho lắm. Đến lúc nhìn lại thì thấy cũng đã được một của view và 6k like trên fanpage rồi :o. Theo thông lệ, mỗi lần blog đạt được một cột mốc nào đó, mình đều viết một bài ăn mừng kiêm cảm ơn độc giả kiêm bộc bạch kể lể tâm sự. Nội dung bài viết này cũng tương tự thế nhé. Lời cảm ơn từ Tôi Đi Code Dạo Blog được thành lập từ đầu tháng 1 năm 2015, cho đến bây giờ đã được gần 2 năm. Tính ra, đây cũng là lần thứ n Hoàng cảm ơn các bạn độc giả rồi. Ban đầu mình cũng định copy lại lời cảm ơn từ mấy bài trước bỏ vào nhưng thấy làm vậy là coi thường độc giả nên thôi, ngồi tự viết cái mới vậy. Hoàng xin gửi lời cảm ơn chân thành tới toàn bộ các bạn độc giả của Tôi đi code dạo. Dù các bạn là bạn đọc lâu năm của blog hay là khách ghé thăm, là sinh viên Đại Học hay đã đi làm , là fan Sơn Tùng hay fan Tôi đi code dạo, sự quan tâm của các bạn đã giúp blog và fanpage có được ngày hôm nay. Mỗi khi lười không muốn viết blog , nghĩ tới mọi người mong chờ bài mới mỗi tuần, Hoàng lại tiếp tục viết. Mỗi khi bị antifan gạch đá tơi tả đến mức muốn dẹp blog, nghĩ tới những lời động viên an ủi của các bạn, Hoàng lại tiếp tục viết. Mỗi khi gấu giận vì mải viết blog mà không dắt gấu đi chơi, nghĩ tới các bạn mong bài hàng ngày trên Facebook, Hoàng … không viết nữa, mà qua chở gấu đi chơi. Các bạn hãy biết rằng, các bạn mãi mãi là Sky, là bầu trời của Hoàng (Câu này đạo của Tùng Núi đấy, Sky có ý kiến gì ko! ). Kể lể tâm sự Mình nhận được khá nhiều lời mời kết bạn trên Facebook từ bạn đọc. Lý do mình không accept không phải do mình chảnh cún chảnh mều hay ghét bỏ gì các bạn đâu :(. Chỉ là mình chỉ add FB người quen hoặc người mình biết thôi. Tuy vậy, nếu có thắc mắc các bạn cứ thoải mái PM Facebook mình hoặc fanpage nhé, mình sẽ trả lời trong khoảng thời gian sớm nhất có thể. Ngoài ra, mong các bạn tiếp tục share và like bài viết nhiều hơn. Nếu chưa like thì like fanpage luôn nhe: Fanpage . Không phải mình sống ảo hay câu like câu view gì đâu. Share nhiều like nhiều mình cũng không được thêm đồng nào cả, nhưng nó sẽ giúp bài viết của mình đến được với nhiều người hơn, giúp nhiều bạn sinh viên sẽ tiếp cận được kiến thức hơn. Gần đây blog có vẻ cũng khá nổi tiếng, được nhiều người biết đến. May mắn gặp trực tiếp một số độc giả ngoài đời thật thì mình mới biết được cũng có khá nhiều bạn sinh viên đọc và hâm mộ blog. Cảm giác bài do mình viết ra có người đọc, có ích cho người khác làm mình thấy rất vui. Định hướng phát triển blog Nhiều bạn hỏi là dạo này sao mình đặt tên bài có vẻ câu view thế. Thật ra không phải mình bắt chước báo lá cải hay gì đâu. Khoa học đã chứng minh là đặt title hấp dẫn sẽ khuyến khích nhiều người xem bài viết hơn. Mình đặt tựa như vậy để khuyến khích các bạn vào xem bài viết. Thay vì đọc báo lá cải, các bạn đọc blog sẽ thu được nhiều lợi ích hơn nhiều. Bạn thấy đấy, tất cả những điều mình làm là vì bạn đọc thân thương còn gì! Đầu tháng 10, theo chương trình học, mình sẽ qua Trung Quốc khoảng 6 tháng. Bọn Trung Quốc chặn Google, chặn Facebook nhưng không chặn WordPress nên hi vọng blog vẫn sẽ đăng bài đều đặn , các bạn đừng lo nhé. Tiến độ đăng bài vẫn là 2 bài/tuần vào thứ 3 và thứ 5. Để cân bằng giữa technical và nghề nghiệp , thứ 3 sẽ là bài viết về kĩ thuật, thứ 5 sẽ là bài viết về nghề nghiệp / phát triển bản thân . Sắp tới, mình sẽ tìm hiểu thêm về bảo mật và UI/UX nên các bài viết phần technical có thể sẽ tập trung vào vấn đề này. Nếu có câu hỏi cần giải đáp, công nghệ muốn tìm hiểu, các bạn cứ thoải mái gửi mail đến địa chỉ nhé. Mình sẽ tổng hợp những câu hỏi giống nhau và viết blog trả lời nhé. Lời kết Để những lời cảm ơn không chỉ là nói suông, blog sẽ tăng cường việc tiếp nhận góp ý để phát triển. Các bạn hãy đánh giá, góp ý cho blog qua link sau: Góp ý . Mình sẽ xem xét toàn bộ những góp ý này để nâng cao chất lượng bài viết, giúp các bạn có những bài viết hay hơn để đọc và chia sẻ với bạn bè nhé. Rate this: Like this: Related
Lately, I've been busy studying in the UK. When I returned to Vietnam, I was busy eating, dancing, and traveling, so I didn't pay much attention to the blog's index. When I look back, I see that I already have 1 view and 6k likes on the fanpage :o. As usual, every time the blog reaches a certain milestone, I write a post to celebrate, thank readers, and confide in my feelings. The content of this article is similar. Thank you from Toi Do Code Blog was established in early January 2015, it has been nearly 2 years now. Actually, this is also the nth time Hoang has thanked readers. At first, I intended to copy the thank you notes from the previous articles and put them in, but I felt that doing so would be disrespectful to the readers, so I decided to sit down and write a new one myself. Hoang would like to send my sincere thanks to all the readers of I Go for a Code Walk. Whether you are a long-time reader of the blog or a visitor, a university student or a working professional, a fan of Son Tung or a fan of me going about coding, your interest has helped the blog and fanpage get better. today. Whenever I'm lazy and don't want to blog, thinking about everyone looking forward to new posts every week, Hoang continues to write. Every time he was criticized by antifans to the point that he wanted to shut down his blog, and thinking of his friends' words of encouragement, Hoang continued to write. Every time the bear gets angry because he's busy writing a blog and doesn't take him out to play, thinking about those of you who look forward to posting daily on Facebook, Hoang... doesn't write anymore, but instead takes him out to play. Please know that you are forever Sky, Hoang's sky (This sentence is Tung Nui's teachings, does Sky have any opinions? ). Telling my story I received quite a few friend requests on Facebook from readers. The reason I don't accept is not because I'm arrogant or hate you guys :(. It's just that I only add acquaintances or people I know on FB. However, if you have any questions, please feel free to PM Facebook or fanpage, I will reply as soon as possible. In addition, I hope you continue to share and like the article more. If you haven't liked it yet, please like the fanpage: Fanpage is not my life It's not like it's fake or fishing for views. If you share a lot of likes, you won't get any extra money, but it will help your article reach more people, helping more students access more knowledge. Recently, the blog seems to be quite popular and known by many people. Luckily, I met some readers in real life and found out that there are quite a few students who read and admire the blog If I write something that will be read, it will be useful to others, which makes me feel very happy. Orientation for blog development. Many of you have asked me why my post titles seem to attract views like that these days. Actually, it's not like I'm imitating the tabloids or anything. Science has proven that placing an attractive title will encourage more people to view your article. I named it like that to encourage you to read the article. Instead of reading tabloids, reading blogs will benefit much more. You see, everything I do is for my dear readers! In early October, according to the study program, I will go to China for about 6 months. The Chinese block Google, Facebook but not WordPress, so hopefully the blog will still post regularly, don't worry. The posting schedule is still 2 articles/week on Tuesday and Thursday. To balance technical and career, Tuesday will be technical articles, Thursday will be career/personal development articles. . In the near future, I will learn more about security and UI/UX, so technical articles may focus on this issue. If you have questions that need answering or technology you want to learn about, please feel free to send an email to this address. I will compile similar questions and blog the answers. Conclusion To make thank you words more than just words, the blog will increase the reception of comments for development. Please rate and comment on the blog via the following link: Comments. I will consider all of these suggestions to improve the quality of the article, helping you have better articles to read and share with friends. Rate this: Like this: Related
Mình thường nghe các bạn sinh viên hỏi về tầm quan trọng của việc học thuật toán. Ý kiến của các bạn được chia làm hai luồng trái chiều như sau: Thần thánh hoá thuật toán : Muốn lập trình giỏi phải giỏi thuật toán. Các công ty lập trình lớn toàn phỏng vấn về thuật toán còn gì. Coi thường thuật toán : Thuật toán là cái thứ vô dụng, mấy anh đi làm nói là có dùng bao giờ đâu. Bài viết này sẽ giúp các bạn trả lời câu hỏi “Học thuật toán để làm cái vẹo gì?”, cũng như có cái nhìn khách quan hơn về thuật toán. Học thuật toán để… trả lời phỏng vấn Những người bênh vực thuật toán thường bảo rằng: Các công ty lớn như Google, Amazon, Facebook rất quan tâm tới thuật toán khi phỏng vấn. Điều này là hoàn toàn có thật nhé! Bạn sẽ phải viết code lên bảng, giải thích code và thuật toán khi PV ở các công ty này. Mình từng đọc qua 2 cuốn sách Cracking the Coding Interview và Elements of Programming Interview . Hai cuốn này có đề cập tới quá trình phỏng vấn của các công ty này, cũng như toàn bộ các câu hỏi/lời giải về thuật toán mà lập trình viên nên chuẩn bị. Tuy vậy, không phải công ty lập trình nào cũng như Google, Amazon, Facebook. Theo kinh nghiệm của mình và bạn bè, các công ty Việt Nam chỉ hỏi một số thuật toán cơ bản khi tuyển dụng (Bạn mình PV Ansadara bị hỏi thuật toán dầu loang và DFS). Các công ty này cũng cần tuyển người làm việc được ngay, biết cách sử dụng công nghệ . Do vậy, đừng quá chăm chăm vào thuật toán, mà còn phải bỏ thời gian học hỏi và sử dụng công nghệ nữa nhé. Cũng đừng quá tự tin là g iỏi thuật toán thì học công nghệ nhanh thôi . Cần trải qua một thời gian làm việc lâu dài thì mới nắm hết được được điểm mạnh yếu, kĩ thuật và kinh nghiệm khi dùng ngôn ngữ/công nghệ nhé. Học thuật toán để giải quyết vấn đề, nâng cao tư duy Thuật toán ở khắp nơi quanh ta. Bản thân Google mạnh mẽ như vậy là nhờ thuật toán tìm kiếm của nó. Chức năng recommendation của Amazon có được cũng nhờ thuật toán. Đến cả những tin tức hiện hằng ngày trong New Feed trên Facebook của bạn cũng do thuật toán định đoạt. Một số lĩnh vực trong lập trình cần sử dụng rất nhiều thuật toán như: render đồ hoạ, mã hoá dữ liệu, driver, machine learning, data mining… Mỗi lĩnh vực sẽ cần những thuật toán riêng. Phải nắm vững các thuật toán này thì bạn mới có thể làm việc trong lĩnh vực đó. Việc giỏi thuật toán cũng giúp bạn tìm ra hướng giải quyết vấn đề nhanh hơn, viết code mạch lạc hơn. Nắm vững thuật toán, cấu trúc dữ liệu, bạn sẽ ước tính được độ phức tạp của code, đánh giá code chạy nhanh hay chậm , có scalable hay không. Đây đều là những kĩ năng vô cùng cần thiết. Để thành một lập trình viên giỏi, bạn cần phải rành rẽ thuật toán (Cơ bản là được, không cần cao siêu đâu). Đừng quá thần thánh hoá thuật toán! Ở Việt Nam, do các kì thi tin học đều chú trọng vào phần thuật toán, giải toán nên chúng ta có xu hướng “thần thánh hoá thuật toán”. Điều này dẫn đến tình trạng Việt Nam được giải tin học này nọ nhưng chẳng có phần mềm nào nổi bật cả. Để lập trình giỏi, ta cần rành thuật toán. Tuy nhiên, giỏi thuật toán không có nghĩa là bạn sẽ thành lập trình viên giỏi. Trong một số lĩnh vực khác như phần mềm doanh nghiệp, mobile, phần lớn các chức năng chỉ là “thêm bớt xoá sửa”. Requirement của các phần mềm này thường hay thay đổi, dẫn đến việc thay đổi code. Lúc này, thuật toán hay, code chạy nhanh không quan trọng bằng việc hiểu đúng requirement, tổ chức dữ liệu, thiết kế cấu trúc code, viết code sao cho dễ đọc, dễ bảo trì . Ngoài ra, bản chất của ngành lập trình là kế thừa để phát triển. Mình từng bảo rằng “ Đôi khi cắm đầu vào code là cách ngu nhất để giải quyết vấn đề “. Thay vì implement các thuật toán từ đầu, các bạn có thể sử dụng thư viện có sẵn , hoặc lấy code đã viết và chỉnh sửa lại cho phù hợp. Ví dụ: Thay vì tự viết Tree, Stack, Linked List, các ngôn ngữ lập trình đều đã implement sẵn, ta chỉ việc sử dụng. Đến cả những thuật toán phức tạp như nhận diện khuôn mặt, nhận diện ngôn ngữ cũng có API cả rồi. Những thư viện /API này đã được sử dụng nhiều, test nhiều, optimize nhiều nên sẽ nhanh và an toàn hơn code bạn tự viết. Kết Mới xem qua, thuật toán có vẻ khá khó nhằn và phức tạp. Tuy vậy, những kiến thức cơ bản về thuật toán cũng không nhiều. Quanh đi quẩn lại cũng chỉ có: Cấu trúc dữ liệu Stack, Queue, Binary Tree, Linked List, … và một số thuật toán như: Dynamic Programming, Backtrack, DFS, … Bạn hoàn toàn có thể tự học và dần nắm vững chúng. Nếu bạn không rành thuật toán, không giải được các câu hỏi hóc búa, bạn vẫn có thể là lập trình viên tốt. Lớp mình ngày xưa có hai đứa vừa học làm freelance, làm web PHP kiêm luôn SEO, thu nhập mỗi tháng cũng khoảng 20-40 triệu. Code đơn giản, giải quyết yêu cầu kiếm tiền cho người dùng, chẳng cần gì thuật toán. Vì vậy, đừng e ngại thuật toán, nhưng cũng đừng thần thánh hoá nó . Cứ xem nó là một skill, học nhiều luyện nhiều sẽ giỏi thôi. Để luyện tập, các bạn có thể đú 2 cuốn sách Cracking the Coding Interview và Elements of Programming Interview để vừa học vừa ôn, sau đó lên hackerrank để thử sức thôi! Nếu năm sau rảnh, mình sẽ bỏ thời gian luyện thêm thuật toán, lúc đấy mình sẽ chia sẻ lại với các bạn nhé. Rate this: Like this: Related
I often hear students ask about the importance of learning algorithms. Your opinions are divided into two opposing streams as follows: Deification of algorithms: If you want to be a good programmer, you must be good at algorithms. Big programming companies only interview about algorithms. Look down on algorithms: Algorithms are useless things, people at work say they never use them. This article will help you answer the question "What is the point of learning algorithms?", as well as have a more objective view of algorithms. Learn algorithms to... answer interviews People who defend algorithms often say that: Big companies like Google, Amazon, Facebook are very interested in algorithms when interviewing. This is completely true! You will have to write code on the board, explain code and algorithms when PV at these companies. I have read two books: Cracking the Coding Interview and Elements of Programming Interview. These two books cover the interview process of these companies, as well as all the questions/solutions about algorithms that programmers should prepare. However, not all programming companies are like Google, Amazon, Facebook. According to my experience and that of my friends, Vietnamese companies only ask for some basic algorithms when recruiting (My friend PV Ansadara was asked about oil spill and DFS algorithms). These companies also need to recruit people who can work immediately and know how to use technology. Therefore, don't focus too much on algorithms, but also spend time learning and using technology. Don't be too confident that if you're good at algorithms, you'll learn technology quickly. You need to spend a long time working to fully grasp the strengths and weaknesses, techniques and experience when using language/technology. Learn algorithms to solve problems, improve thinking Algorithms are everywhere around us. Google itself is so powerful thanks to its search algorithm. Amazon's recommendation function is also achieved thanks to the algorithm. Even the news that appears every day in your Facebook News Feed is determined by the algorithm. Some fields in programming need to use many algorithms such as: graphic rendering, data encryption, drivers, machine learning, data mining... Each field will need its own algorithms. You must master these algorithms before you can work in that field. Being good at algorithms also helps you find ways to solve problems faster and write more coherent code. Mastering algorithms and data structures, you will be able to estimate the complexity of the code, evaluate how fast or slow the code runs, and whether it is scalable or not. These are all extremely necessary skills. To be a good programmer, you need to be familiar with algorithms (Basic is fine, no need to be advanced). Don't idolize the algorithm too much! In Vietnam, because computer science exams focus on algorithms and problem solving, we tend to "deify algorithms". This leads to a situation where Vietnam is awarded this and that information technology but there is no outstanding software. To be good at programming, we need to be familiar with algorithms. However, being good at algorithms does not mean you will become a good programmer. In some other fields such as enterprise and mobile software, most functions are just "add, remove, edit". Requirements of these software often change, leading to code changes. At this time, good algorithms and fast code are not as important as correctly understanding requirements, organizing data, designing code structure, and writing code that is easy to read and maintain. In addition, the nature of the programming industry is inheritance for development. I once said that "Sometimes sticking your head into code is the stupidest way to solve a problem". Instead of implementing algorithms from scratch, you can use existing libraries, or take the already written code and edit accordingly. For example: Instead of writing Tree, Stack, Linked List yourself, programming languages ​​have already implemented it, we just need to use it. Even complex algorithms such as face recognition and language recognition have APIs. These libraries/APIs have been used a lot, tested a lot, and optimized a lot, so they will be faster and safer than the code you write yourself. Conclusion At first glance, the algorithm seems quite difficult and complicated. However, the basic knowledge of algorithms is not much. Around and around, there are only: Stack, Queue, Binary Tree, Linked List data structures, ... and some algorithms such as: Dynamic Programming, Backtrack, DFS, ... You can completely self-study and gradually master them. . If you don't know algorithms or can't solve difficult questions, you can still be a good programmer. In my class, there were two kids who had just learned to freelance, make PHP websites and SEO, and earned about 20-40 million per month. The code is simple, solves the user's need to make money, no need for algorithms. So don't be afraid of the algorithm, but don't deify it either. Just think of it as a skill, learn it more and practice more and you'll get better at it. To practice, you can read two books: Cracking the Coding Interview and Elements of Programming Interview to study and review, then go up to hackerrank to try! If I have free time next year, I will spend more time practicing the algorithm, then I will share it with you guys. Rate this: Like this: Related
Từ chuyện ngày xưa Ngày xửa ngày xưa, à thật ra cũng không xưa lắm, khoảng những năm 75-90, có một số lão lập trình viên rảnh hơi, thực hiện một số nghiên cứu rảnh hơi để … đo năng suất làm việc của developer. Kết quả thu được thật đáng ngạc nhiên! Chênh lệch về năng suất làm việc của 2 developer là rất lớn. Một developer giỏi có thế có năng suất gấp 10 lần một developer khác. Người đời gọi những developer giỏi này là rockstar developer, 10x developer. Huyền thoại về các developer “siêu nhân”, “thần thánh” cũng ra đời từ đó. Đến chuyện ngày nay Thuở đi làm , mình cũng từng gặp 2 dạng coder “siêu nhân”: Dạng thứ nhất thường gặp ở các bác senior . Họ thường là những người giàu kinh nghiệm , trầm mặc, ít khoe khoang, nhưng là người chịu trách nhiệm cho kiến trúc hệ thống, vấn đề technical phức tạp, các module chính. Họ debug nhẹ nhàng như chuồn chuồn giỡn nước, code trong sáng như nước hồ thu, ngồi pair programming với họ một buổi mà như được truyền thụ mấy năm công lực của các bậc thánh nhân . Dạng thứ hai là các thanh niên mới ra trường hoặc mới đi làm 1,2 năm. Họ cũng khá có tài, rất tự tin về tốc độ và khả năng code của mình. Dạng coder này thoắt ẩn thoắt hiện, đi như mây bay, đến như gió thoảng. Họ luôn ôm nhiều việc, hoàn thành công việc trước thời hạn nên rất được lòng các developer. Dạng thứ nhất chính là dạng developer mà chúng ta nên học hỏi. Tuy nhiên, cần cố gắng tránh trở thành dạng thứ hai . Vì sao vậy? Hãy đọc đoạn bên dưới. Các cấp độ của developer Trong cuốn Mastery , tác giả có nhắc đến các cấp độ cần đạt đến để thực sự “master” một cái gì đó, mình thấy cũng khá đúng với ngành lập trình : Cấp độ một : Đây là giai đoạn nhập môn học hỏi . Lúc này, do chưa có kinh nghiệm, không biết cách giải quyết vấn đề nên tốc độ code của bạn khá chậm. Cấp độ hai : Sau một thời gian sẽ chuyển qua cấp độ này. Do đã có kinh nghiệm. dần nắm được cách giải quyết vấn đề nên tốc độ code của bạn tăng lên. Tuy nhiên, bạn sẽ gặp khó khăn khi gặp vấn đề mới. Cấp độ ba : Sau khi tích luỹ được nhiều kinh nghiệm thì bạn sẽ code … chậm lại . Tại sao? Lúc này với một vấn đề, bạn sẽ nghĩ nhiều hơn trước khi code. nhìn ra nhiều điều cần lưu ý hơn, có nhiều hướng giải quyết hơn. Lúc đó bạn sẽ phân vân giữa các hướng giải quyết để chọn cách tối ưu và tốt cho tương lai. Cấp độ bốn : Bạn sẽ mất khá lâu để đạt tới cấp độ này. Lúc này, bạn có thể nhanh chóng tìm ra giải pháp tối ưu nhờ kinh nghiệm nhiều. Bạn sẽ có cái nhìn tổng quát về solution, về hệ thống chứ không chỉ là module nữa. Nếu đi làm được một thời gian, thấy mình bắt đầu code chậm lại so với lúc trước, không phải là do bạn … già đâu ;)), đây chỉ là quá trình lột xác từ cấp độ hai lên cấp độ ba đấy. Vậy mấy thằng “coder thần thánh” đạt cấp nào??? Mấy bác senior ở cấp độ bốn, code vừa nhanh và hiệu quả thì không cần nói rồi! Tuy nhiên, đa phần các “thánh code” mình gặp thường là những người ở cuối cấp độ hai . Thật vậy, ngày xưa mình cũng từng tưởng mình giỏi, mình là “thánh”. Ta thường hay lầm tưởng là code nhanh, hoàn thành task nhanh là coder giỏi. Thế nhưng, tốc độ code không phải là tất cả . Đôi khi các “thánh” design ẩu. code ẩu cho xong module mà không chịu test, hoặc không cover đủ các case. Lối code nhanh mà ẩu sẽ làm tăng thêm technical debt cho team, để các thành viên khác phải hốt shit ( refactor code ). Tệ hơn, do hoàn thành task nhanh, những coder dạng này thường tự phong mình là “siêu nhân”, là “thánh” và tiếp tục coi khinh những thằng chậm hơn. Chịu khó đọc bạn sẽ thấy thể loại này được manager thương, nhưng đôi khi lại bị developer ghét vì làm chậm tiến độ dự án và mất thời gian người khác. Đừng để mình trở thành một người như vậy nhé! Để hạn chế tác hại các “thánh code” kiểu này, các team phải có qui trình rõ ràng , có unit test , có code review. Tuy nhiên, không phải công ty nào cũng có qui trình bài bản. Do đó, nếu đôi khi bạn phải hốt shit của “coder thần thánh” nào đó thì cũng đành cắn răng chịu đựng thôi nhé. Vài lời khuyên Thuở mới ra trường, thích chứng tỏ bản thân , mình thường cố gắng code nhanh để “thể hiện trình độ”. Lớn lên mới biết, chất lượng code quan trọng hơn “tốc độ code” rất nhiều. Hãy tập cho mình thói quen code chậm lại một chút , suy nghĩ kĩ hơn một chút, bạn sẽ nhận ra nhiều cách để giải quyết vấn đề hơn. (Mình nhận được lời khuyên này từ một ông senior bên ASWIG Solution ). Bạn cũng không nên ăn thua về hiệu suất làm việc làm gì. Nếu muốn gây ấn tượng trong mắt team leader , PM và đồng đội, hãy giúp đỡ các thành viên khác chứ đừng thể hiện sự “thần thánh” của mình ra nhé! Một số nguồn tham khảo: Rate this: Like this: Related
From a story from the past Once upon a time, well actually not so long ago, around the years 75-90, there were some old programmers who had free time and did some free research to... measure their productivity. developer. The results are surprising! The difference in productivity of the two developers is huge. A good developer can be 10 times more productive than another developer. People call these good developers rockstar developers, 10x developers. The myth of "superhuman" and "divine" developers was also born from there. Coming to today's story, when I was working, I also met two types of "superhuman" coders: The first type is common in senior doctors. They are often experienced people, quiet, not boastful, but are responsible for system architecture, complex technical issues, and main modules. They debug as gently as dragonflies playing with water, the code is as clear as autumn lake water. Sitting in pair programming with them for a session feels like being taught years of the power of saints. The second type is young people who have just graduated from school or have only worked for 1 or 2 years. They are also quite talented, very confident in their coding speed and ability. This type of coder suddenly appears, goes like a flying cloud, comes like a breeze. They always have a lot of work to do and complete their work ahead of schedule, so they are very popular with developers. The first type is the type of developer that we should learn from. However, efforts should be made to avoid becoming the latter. Why? Read the paragraph below. Developer levels In the book Mastery, the author mentions the levels that need to be reached to truly "master" something. I find it quite true for the programming industry: Level one: This is the introductory stage of learning. At this time, due to lack of experience and not knowing how to solve the problem, your code speed is quite slow. Level two: After a while, you will move to this level. Due to experience. Gradually grasp how to solve problems so your coding speed increases. However, you will encounter difficulties when you encounter new problems. Level three: After accumulating a lot of experience, you will code... slower. Why? Now with a problem, you will think more before coding. Seeing more things to pay attention to, there are more solutions. At that time, you will wonder between solutions to choose the optimal and good way for the future. Level four : It will take you quite a while to reach this level. At this point, you can quickly find the optimal solution thanks to much experience. You will have an overview of the solution, the system, not just the module. If you've been working for a while and find yourself starting to code slower than before, it's not because you're... old ;)), this is just the process of transforming from level two to level three. So what level do these "divine coders" reach??? Seniors at level four, code is both fast and effective, no need to say it! However, most of the "code saints" I meet are usually people at the end of level two. Indeed, in the past, I also thought I was good, that I was a "saint". We often mistakenly think that coding quickly and completing tasks quickly means being a good coder. However, code speed is not everything. Sometimes the "saints" design carelessly. Carelessly coding the module without testing it, or not covering enough cases. Fast and careless coding will increase technical debt for the team, causing other members to have to pick up the slack (refactor code). Worse, because they complete tasks quickly, these coders often style themselves as "supermen" and "saints" and continue to despise those who are slower. If you read carefully, you will see that this genre is loved by managers, but sometimes hated by developers because it slows down project progress and wastes other people's time. Don't let yourself become such a person! To limit the harmful effects of "code saints" of this type, teams must have clear processes, unit tests, and code reviews. However, not all companies have a systematic process. Therefore, if sometimes you have to take the shit of some "divine coder", then you just have to grit your teeth and endure it. Some advice When I first graduated, I liked to prove myself, so I often tried to code quickly to "show off my qualifications". Growing up, I realized that code quality is much more important than "code speed". Get yourself into the habit of slowing down your coding a bit, thinking a bit more carefully, you will realize more ways to solve problems. (I received this advice from a senior man at ASWIG Solution). You also shouldn't lose out on work performance. If you want to impress the team leader, PM and teammates, help other members, don't show off your "divineness"! Some reference sources: Rate this: Like this: Related
Đa số các bạn newbie thường phạm phải một sai lầm cơ bản: Quá mức quan tâm về tốc độ thực thi của code, của ngôn ngữ lập trình. Đây là một thói quen nên bỏ! Trong bài viết hôm nay, mình sẽ giải thích về việc tối ưu code: Optimize code một cách pro nhất! Khi nào cần optimize, khi nào không nên optimize code? Optimize code là gì? Optimize code (Tối ưu code) là việc chỉnh sửa/viết lại code nhằm giảm dung lượng, hạn chế input/output, tăng tốc độ thực thi, giảm lượng phần cứng cần sử dụng. Thuở đi học, ta được học về Big O Notation , thuật toán được tối ưu sẽ chạy nhanh hơn, hoặc ít tốn bộ nhớ hơn. Đa phần các trường đại học dạy C, C++, làm việc trực tiếp với bộ nhớ, các thầy lúc nào cũng tâm niệm: Code viết ra phải càng tối ưu càng tốt. Đi thi tin học, code viết ra chạy nhanh hơn, ít tốn bộ nhớ hơn thì sẽ được điểm cao hơn. Phỏng vấn của một số công ty lớn cũng đòi hỏi code viết ra phải tối ưu hơn. Điều này dẫn đến nhiều bạn có suy nghĩ: Phải ưu tiên tối đa việc optimize code ! Trong ngành phần mềm , điều này không hề đúng ! Tại sao vậy? Hãy đọc phần dưới nhé. Khi nào không nên optimize code? Ở bài trước về danh ngôn trong ngành phần mềm , mình có trích dẫn một câu danh ngôn của Donald Knuth về optimize code. Nguyên văn câu này như sau: Trong môi trường làm việc, performance chỉ là một khía cạnh của code. Như mình đã nói nhiều lần, code của bạn sẽ được đọc, được nâng cấp và bảo trì bởi nhiều người khác. Do đó, code cần phải rõ ràng, dễ đọc dễ hiểu rồi mới tính đến performance. Theo kinh nghiệm , nếu quá chú tâm vào tối ưu code, code của bạn có thể trở nên vòng vèo khó đọc . Ngoài ra, trong đa phần các trường hợp, ta sẽ không biết những chức năng nào cần optimize, đoạn code nào cần optimize. Nếu không xác định được việc này, optimize code một cách mù quáng sẽ giống như “thầy bói xem voi”, tốn thời gian mà chả được gì cả. Mình từng gặp một case như sau. Có bạn hỏi mình “Dapper performance nhanh hơn Entity Framework, web chạy chậm em có nên thay bằng EF bằng Dapper ko?”. Mình đề nghị họ dùng tool để đo performance trước. Thời gian đọc dữ liệu từ DB chỉ là 50ms, có nhanh hơn gấp đôi cũng chỉ tiết kiệm được 25ms. Hóa ra web chậm là do gọi nhiều Ajax, load CSS/JS và hình ảnh lâu. Chỉ cần thêm cache, minify và bundle lại CSS/JS, chỉnh chất lượng ảnh là tốc độ đã tăng 2/3 lần mà ko cần sửa đụng chạm nhiều đến code. Một số qui tắc cần nhớ khi optimize code Như đã nói trong câu danh ngôn, chúng ta không nên optimize code sớm , chứ không phải là không nên optimize code . Trước khi quyết định optimize code, hãy thử áp dụng các qui tắc sau nhé. Khi quyết định optimize, làm theo những bước sau: Một lời khuyên khác của các chuyên gia về việc optimize: Một điều quan trọng nữa cần nhớ là: Hãy tự hỏi có thật sự cần optimize hay không ? Lấy ví dụ, trang web bán hàng nọ có chức năng xuất report. Chức năng này chạy mất 1 tiếng đồng hồ. Chậm quá nhỉ, có lẽ bạn phải optimize? Khoan, hãy xem xét các trường hợp sau. Giả sử bạn mất 10 tiếng để optimize chức năng này, thời gian chạy xuống còn khoảng 30 phút. Nếu chức năng này được admin sử dụng mỗi ngày, sau 1 tháng họ sẽ tiết kiệm được 15 tiếng. Việc bỏ công sức ra optimize là chính xác. Tuy nhiên, nếu như chức năng cả tháng hoặc nửa năm mới chạy một lần, thì phải mất vài năm thì công sức bạn bỏ ra optimize mới … hoàn vốn. Thay vì optimize nó, bạn nên bỏ thời gian đó để optimize các chức năng khác có ích hơn, được dùng nhiều hơn. Ngoại lệ Như mình đã nói, trong 97% các trường hợp các bạn không cần quan tâm đến việc optimize code. Tuy nhiên, vẫn có một số ngoại lệ (3% còn lại) mà việc optimize code khá quan trọng: Code các hệ thống nhúng, bộ nhớ ít, vi xử lý nhỏ. Lúc này code cần được optimize để phù hợp với hệ thống. Code phần cứng, driver, OS,… performance ở đây cực kì quan trọng. Code các hệ thống real-time, cần sự chuẩn xác và nhanh tới từng millisecond. Code một số thư viện /framework được nhiều người sử dụng (nén file, mapper, parser, …). Do code được sử dụng nhiều nên nếu code chạy nhanh sẽ tiết kiệm được rất nhiều thời gian của chương trình. Code implement thuật toán, tham gia các kì thi. Code các hệ thống rất lớn cho rất nhiều người dùng (Google, Amazon, StackOverflow , …), lúc này chỉ cần code chạy nhanh hơn 10-20% cũng đã tiết kiệm được vô số thời gian của người dùng. Điều mình muốn nhắn nhủ sau bài viết là: Một số nguồn tham khảo Rate this: Like this: Related
Most newbies often make a basic mistake: Paying too much attention to the execution speed of code and programming language. This is a habit that should be broken! In today's article, I will explain about code optimization: Optimize code in the most professional way! When should you optimize and when should you not optimize your code? What is Optimize code? Optimize code is editing/rewriting code to reduce capacity, limit input/output, increase execution speed, and reduce the amount of hardware needed. When we were in school, we learned about Big O Notation, optimized algorithms will run faster, or consume less memory. Most universities teach C, C++, working directly with memory, teachers always keep in mind: The code written must be as optimal as possible. When taking a computer science exam, the faster the code is written and the less memory it consumes, the higher the score will be. Interviews for some large companies also require the written code to be more optimized. This leads many of you to think: You must give maximum priority to optimizing code! In the software industry, this is not true! Why so? Please read below. When should you not optimize code? In the previous article about quotations in the software industry, I quoted a quotation from Donald Knuth about optimizing code. The full text of this sentence is as follows: In the working environment, performance is just one aspect of code. As I have said many times, your code will be read, upgraded and maintained by many others. Therefore, the code needs to be clear, easy to read and understand before considering performance. According to experience, if you focus too much on code optimization, your code can become circular and difficult to read. In addition, in most cases, we will not know which functions need to be optimized and which code sections need to be optimized. If this cannot be determined, blindly optimizing code will be like "a fortune teller looking at an elephant", wasting time and getting nothing. I once encountered a case like the following. Someone asked me "Dapper performance is faster than Entity Framework, but the website is slow, should I replace EF with Dapper?". I suggest they use a tool to measure performance first. The time to read data from the DB is only 50ms, even if it is twice as fast, it will only save 25ms. It turns out the website is slow due to lots of Ajax calls, taking too long to load CSS/JS and images. Just add cache, minify and bundle CSS/JS, adjust image quality and the speed will increase by 2/3 times without needing to edit much of the code. Some rules to remember when optimizing code As said in the quote, we should not optimize code early, not that we should not optimize code. Before deciding to optimize code, try applying the following rules. When deciding to optimize, follow these steps: Another advice from experts about optimizing: Another important thing to remember is: Ask yourself whether you really need to optimize or not? For example, a certain sales website has a report export function. This function takes 1 hour to run. It's too slow, maybe you should optimize? Wait, consider the following cases. Assuming it takes you 10 hours to optimize this function, the running time is down to about 30 minutes. If this function is used by admins every day, after 1 month they will save 15 hours. Putting effort into optimization is correct. However, if the function only runs once every month or half a year, it will take several years for the effort you put into optimizing to... payback. Instead of optimizing it, you should spend that time optimizing other functions that are more useful and used more. Exceptions As I said, in 97% of cases you do not need to care about optimizing code. However, there are still some exceptions (the remaining 3%) where optimizing code is quite important: Code for embedded systems, low memory, small processor. At this point the code needs to be optimized to suit the system. Hardware code, drivers, OS,... performance here is extremely important. Coding real-time systems requires precision and speed down to the millisecond. Code some libraries/frameworks used by many people (file compression, mapper, parser, ...). Because code is used a lot, if the code runs quickly, it will save a lot of program time. Code implement algorithms, participate in exams. Code for very large systems for many users (Google, Amazon, StackOverflow, ...), now just needing the code to run 10-20% faster will save countless users' time. What I want to say after the article is: Some reference sources Rate this: Like this: Related
Giới thiệu Mấy hôm trước, khi mình lên stackoverflow hỏi một số câu liên quan tới SQL thì nghe nhắc tới khái niệm SQL Antipattern. Khác với design pattern , anti pattern là những cách thiết kế để giải quyết vấn đề, nhưng sử dụng nó lại… gây ra nhiều vấn đề hơn. Một antipattern được nhiều người biết đó là hút thuốc lào thay cho thuốc lá , cách này cai được thuốc lá nhưng sẽ gây ra nhiều vấn đề vệ sinh và môi trường hơn. Tìm hiểu sâu hơn, mình tìm thấy cuốn sách “SQL Antipattern” này. Cuốn này được đánh giá rất cao trên amazon, nói về những sai lầm dễ mắc phải khi thiết kế và sử dụng SQL Database. Nội dung rất hữu dụng với các bạn database administator hoặc back-end developer nhé. Tóm tắt Nội dung sách bao gồm 4 phần nhỏ: Phần 1 : Antipattern trong thiết kế CSDL (Cấp Logical) Phần 2 : Antipattern trong thiết kế CSDL (Cấp Physical) Phần 3 : Antipattern khi viết Query Phần 4 : Antipattern khi làm việc với code Bố cục sách khá rõ ràng, mỗi phần được chia ra làm nhiều chương, mỗi chương đề cập tới một design pattern . Cấu trúc của mỗi chương rất dễ hiểu, gồm 5 phần: Vấn đề ta cần giải quyết Sai lầm hay gặp, sử dụng Antipattern để giải quyết Làm sao nhận ra Antipattern Ưu nhược điểm của antipattern đó Cách giải quyết đúng Tác giả giải thích rất ngắn gọn và dễ hiểu những ưu/khuyết điểm mà các anti-pattern này mang đến. Thay vì giải thích dông dài, tác giả còn chịu khó kèm theo diagram và câu lệnh SQL, giúp ta dễ dàng hình dung vấn đề và cách giải quyết. Phần 1 tới phần 3 khá hay, kiến thức trong những phần này rất bổ ích và có thể áp dụng được ngay. Phần cuối thì hơi thiên về ngôn ngữ lập trình, những bạn nào dùng PHP chắc sẽ thấy có ích, bản thân mình thì thấy nó hơi dư thừa. Nhận xét Cảm giác của mình sau khi đọc xong cuốn sách này là “từ ấy trong tôi bừng nắng hạ”, cảm thấy mình ngộ ra được nhiều điều mà trước giờ còn vướng mắc. Giọng văn trong sách khá đơn giản dễ hiểu, lại kèm theo nhiều diagram và SQL nên rất dễ hấp thu. Tuy nhiên, để có thể đọc hiểu cuốn sách này, bạn nên có chút ít kiến thức cơ bản về SQL (Table, row, column, index, v…v), cũng nên có một chút kinh nghiệm về thiết kế CSDL. Chắc một số bạn sẽ hỏi: Ơ, thiết kế DB là việc của bọn Database Admin, mình chỉ việc dùng thôi mà, vậy thì đọc có lời ích gì ko? Cứ dọcdid nhé, vì sách cũng nhắc tới kha khá sai lầm khi ta viết query v…v đấy. Ngoài ra, nắm rõ về DB và thiết kế DB là chuyện gần như bắt buộc nếu bạn muốn làm full-stack developer. Một số bạn sẽ thắc mắc: Ơ, bây giờ toàn dùng Hibernate, Entity Framework, v…v thì còn cần biết SQL làm gì? Về bản chất, những framework này vẫn tạo ra SQL thuần nhé. Để code chạy nhanh, bạn phải tìm hiểu về bản chất, biết cách index bảng v…v, do đó kiến thức trong sách là không thừa đâu. Như mình đã nhắc đến ở đầu bài, các bạn back-end developer và database admin rất nên đọc cuốn sách này, các bạn sinh viên cũng thế. Khuyến khích các bạn mới học xong môn CSDL Nâng Cao đọc sơ sách một lần, sau khi đi làm được một thời gian, tiếp xúc với CSDL thì đọc lại một lần nữa cho thấm. Đánh giá : 8.5/10 Bonus : Có một bác nào đó tốt bụng đã làm slide tóm gọn những điểm chính yếu của sách tại đây, bạn nào ngại đọc có thể vào xem ;). Rate this: Like this: Related
Introduction A few days ago, when I was on stackoverflow asking some questions related to SQL, I heard the concept of SQL Antipattern mentioned. Different from design patterns, anti patterns are design ways to solve problems, but using them... causes more problems. An antipattern that many people know is smoking waterpipes instead of cigarettes. This method can help you quit smoking but will cause more hygiene and environmental problems. Digging deeper, I found this book "SQL Antipattern". This book is highly rated on Amazon and talks about common mistakes when designing and using SQL Database. The content is very useful for database administrators or back-end developers. Summary The book's content includes 4 small parts: Part 1: Antipatterns in database design (Logical Level) Part 2: Antipatterns in database design (Physical Level) Part 3: Antipattern when writing Query Part 4: Antipattern when working with code The book's layout is quite clear, each part is divided into many chapters, each chapter covers a design pattern. The structure of each chapter is very easy to understand, including 5 parts: The problem we need to solve Common mistakes, use Antipattern to solve How to recognize Antipattern Advantages and disadvantages of that antipattern Correct solution The author very briefly and easily explains the advantages/disadvantages that these anti-patterns bring. Instead of giving a lengthy explanation, the author also took the trouble to include diagrams and SQL commands, helping us easily visualize the problem and how to solve it. Parts 1 to 3 are quite good, the knowledge in these parts is very useful and can be applied immediately. The last part is a bit more about programming languages. Those who use PHP will probably find it useful, but I personally find it a bit redundant. Comments My feeling after reading this book is "from then on, the summer sun shines inside me", I feel like I have realized many things that were still confusing before. The tone of the book is quite simple and easy to understand, and comes with many diagrams and SQL so it is easy to absorb. However, to be able to read and understand this book, you should have some basic knowledge of SQL (Table, row, column, index, etc.), and should also have some experience in database design. Maybe some of you will ask: Oh, designing a DB is the job of Database Admins, I just need to use it, so is there any benefit in reading it? Just read along, because the book also mentions quite a few mistakes when we write queries etc. In addition, understanding DB and DB design is almost mandatory if you want to be a full-stack developer. Some of you will wonder: Oh, now we only use Hibernate, Entity Framework, etc., so why do we still need to know SQL? In essence, these frameworks still generate pure SQL. In order for the code to run quickly, you must learn about its nature, know how to index tables, etc., so the knowledge in the book is not redundant. As I mentioned at the beginning of the article, back-end developers and database administrators should read this book, as should students. Encourage those who have just finished studying Advanced Database to read the book once, and after working for a while and coming into contact with the database, read it again to absorb it. Rating: 8.5/10 Bonus: Someone kindly made a slide summarizing the main points of the book here. If you're afraid to read, you can take a look ;). Rate this: Like this: Related
Dạo gần đây mình hay gặp một số topic kiểu “Cảm thấy mất định hướng khi học Đại học”, “Liệu em có nên bỏ Đại Học hay không?”, “Kiến thức Đại học toàn thứ vô bổ!”. Các topic này cho thấy nhiều bạn sinh viên đang cảm thấy hoang mang về giá trị của việc học đại học . Do vậy, mình viết bài này để phân tích những cái lợi của việc học Đại Học, giúp các bạn trẻ vững tin hơn trên con đường đã chọn. Nguyên nhân gây hoang mang Đa phần nguyên nhân làm các bạn sinh viên cảm thấy mất phương hướng khi học ĐH là: Chương trình học có khá nhiều môn vô bổ như Toán Lý Hóa Đại Cương, Tư tưởng Mác-Lê-Minh, … Chương trình học thì khá cũ và nặng lý thuyết , các môn lập trình thì quanh đi quẩn lại chỉ có C, C++ , làm việc với console. Trong khi đó, những kiến thức thực tế, cần thiết để đi làm thì lại ít được dạy (Các bạn có thể xem thêm ở series Những điều đại học không dạy bạn ). Nhiều bạn cảm thấy mình tốn phí khá nhiều thời gian học mà chỉ được học được những điều vô bổ !! Mặt khác, báo chí lúc nào cũng rất khoái lăng xê các tấm gương “Bỏ ĐH mở công ty thu nhập trăm triệu” để làm lung lay tinh thần các em sinh viên. Lẽ ra báo chí nên đưa một số vụ việc như “Nghỉ đại học, lái xe ôm, làm thợ hồ. Tốt nghiệp Đại Học, công việc ổn định lương chục triệu” thì mọi người sẽ có cái nhìn khách quan hơn. Ngoài ra, các bạn cũng đừng nghe các thánh phán: “Bill Gates và Mark Zuckerberg bỏ ĐH vẫn thành công đấy thôi!”. Người ta bỏ ĐH Harvard nhé, các bạn có thể ráng vào Harvard rồi bỏ để thử vận may xem sao. Giá trị của bốn năm ĐH Thật ra, bốn năm ĐH của bạn cũng không đến nổi vô bổ như bạn tưởng tượng đâu, chúng sẽ cho bạn những điều sau: Khả năng tư duy : Các môn Toán, Lý, Hóa Đại Cương khó khăn, thoạt nhìn có vẻ vô bổ. Thật ra là chúng … vô bổ thật, vì ta cũng ít áp dụng khi làm việc. Tuy vậy, việc tập trung giải quyết những bài toán này sẽ rèn cho chúng ta khả năng tu duy, khả năng tiếp cận vấn đề. Chúng rất hữu ích trên con đường nghề nghiệp sau này. Khả năng đọc-viết : Học ĐH, bạn sẽ phải đọc vô sô tài liệu phức tạp, viết mấy bài luận. Những kỉ năng đọc viết này sẽ đi theo bạn tới tận sau này. Khả năng tự học : Đây là một trong các kĩ năng quan trọng nhất trong ngành phần mềm . Ở Đai Học, các thầy cô sẽ không chỉ dẫn tận tay như cấp 3, đòi hỏi bạn phải cố gắng nhiều hơn. Kiến thức nền tảng : Chương trình học ở Đai Học khá bài bản và có cấu trúc. Hầu như ĐH nào cũng dạy các kiến thức về: Hệ điều hành, Quy trình phần mềm, CSDL, Cấu trúc dữ liệu và Giải thuật, … Những kiến thức nền tảng này khá quan trọng. Đa phần các bạn tự học thường hay thiếu những kiến thức nền như thế này. Bạn bè và quan hệ : Học ĐH, bạn sẽ được làm quen và làm việc chung với rất nhiều bạn bè. Điều này rèn luyện khả năng làm việc nhóm (cũng như khả năng chịu đựng) của bạn. Sau khi ra trường , các mối quan hệ với giáo viên, bạn bè rất quan trọng. Tranh thủ kiếm gấu giai đoạn này luôn nhé, ra trường khó tìm lắm. Cơ hội việc làm : Bạn có thể tìm được một công việc với mức lương cao, môi trường tốt nhờ sợ giới thiệu của thầy giáo, bạn bè. Ngoài ra, các trường Đại Học cũng có liên kết với một số công ty, giúp bạn dễ dàng tìm cơ hội thực tập và xin việc . Ngoài ra, hoàn thành 4 năm học sẽ giúp bạn có một tấm bằng Đại Học trong tay. Mảnh bằng này có giá trị gì không? Hãy xem phía dưới nhé. Giá trị của tấm bằng ĐH Hiện tại, đa phần các công ty phần mềm đều đỏi hỏi một tấm bằng ĐH, Cao Đẳng ngành CNTT . Không cần biết khả năng của bạn thế nào, tấm bằng ĐH là tấm giấy thông hành để được bạn vượt qua được vòng loại của bên Nhân Sự, vào vòng phỏng vấn để chứng tỏ khả năng của mình. Nhiều bạn cũng hỏi mình: “Sao em thấy báo đăng nhiều đứa tốt nghiệp ĐH vẫn thất nghiệp đấy thôi, học làm vẹo gì?”. Tất nhiên, nếu bạn không có khả năng thì mảnh bằng Đại học cũng chỉ là tờ giấy lộn mà thôi . Nó chỉ giúp bạn vào được vòng Phỏng vấn, còn có tìm được việc làm hay không là tùy kinh nghiệm/khả năng của bạn. Một lời khuyên khác cho các bạn: Ngoài Đại Học ra, các bạn có thể lựa chọn học Cao Đẳng FPT, Aptech. Chương trình học của các cơ sở này sát với thực tế hơn, có thể đi làm được ngay. Họ cũng hỗ trợ giới thiệu cơ hội thực tập và việc làm cho sinh viên. Bạn bè, đồng nghiệp mình cũng có nhiều người tốt nghiệp Cao Đẳng và vẫn đi làm thoải mái. Một số nguồn khác tham khảo: Rate this: Like this: Related
Recently, I often encounter topics like "Feeling directionless when studying at University", "Should I drop out of University?", "University knowledge is all useless!". These topics show that many students are confused about the value of studying at university. Therefore, I wrote this article to analyze the benefits of studying at University, helping young people be more confident on their chosen path. Causes of confusion Most of the reasons why students feel disoriented when studying at university are: The curriculum has many useless subjects such as General Mathematics, Physics, Chemistry, Marxist-Leninist Thought,... Chapter The curriculum is quite old and heavy on theory, programming subjects are mostly C, C++, and working with consoles. Meanwhile, the practical knowledge necessary to get a job is rarely taught (You can see more in the series Things College Doesn't Teach You). Many people feel like they waste a lot of time studying and only learn useless things!! On the other hand, the press always loves to promote examples of "Drop out of college to open a company with hundreds of millions in income" to shake the spirit of students. The press should have reported some incidents such as "Dropped out of college, drove a motorbike taxi, worked as a bricklayer. After graduating from university, having a stable job with a salary of tens of millions, people will have a more objective view. In addition, don't listen to the saints saying: "Bill Gates and Mark Zuckerberg dropped out of college and still succeeded!". People drop out of Harvard University, you can try to get into Harvard and then drop out to try your luck. The value of four years of university Actually, your four years of university are not as useless as you imagine, they will give you the following: Thinking ability: Math, Physics, and General Chemistry are difficult and seem useless at first glance. Actually, they are... useless, because we rarely apply them when working. However, focusing on solving these problems will train us to think and approach problems. They are very useful on your future career path. Reading and writing ability: At university, you will have to read countless complex documents and write several essays. These reading and writing skills will stay with you forever. Ability to self-study: This is one of the most important skills in the software industry. At University, the teachers will not give direct instructions like in high school, requiring you to try harder. Basic knowledge: The curriculum at University is quite methodical and structured. Almost every university teaches knowledge about: Operating Systems, Software Processes, Databases, Data Structures and Algorithms, etc. These foundational knowledge are quite important. Most self-study students often lack background knowledge like this. Friends and relationships: At university, you will get to know and work with many friends. This trains your teamwork (as well as your endurance). After graduating, relationships with teachers and friends are very important. Take advantage of this period to find bears, it's very difficult to find them after graduating from school. Job opportunities: You can find a job with high salary and good environment thanks to referrals from teachers and friends. In addition, Universities also have links with a number of companies, making it easier for you to find internship opportunities and apply for jobs. In addition, completing 4 years of study will help you have a University degree in hand. Is this piece of diploma worth anything? Take a look below. The value of a university degree Currently, most software companies require a university or college degree in IT. No matter your abilities, a university degree is your passport to pass the Human Resources qualifying round and enter the interview round to prove your abilities. Many people also ask me: "Why do I see in the newspaper that many university graduates are still unemployed? What's the point of studying?". Of course, if you don't have the ability, a University degree is just a piece of paper. It only helps you get to the Interview round, whether you find a job or not depends on your experience/abilities. Another advice for you: Besides University, you can choose to study at FPT College or Aptech. The study programs of these establishments are closer to reality, allowing you to go to work immediately. They also assist in introducing internship and job opportunities to students. Many of my friends and colleagues also graduated from college and still work comfortably. Some other sources for reference: Rate this: Like this: Related
Danh ngôn là những câu nói đơn giản, ngắn gọn nhưng chất chứa bên trong cả một bầu trời chân lý. Danh ngôn dễ nhớ, dễ thuộc, đọc ít hiểu nhiều. Vì lẽ đó, hôm nay mình sẽ giới thiệu và phân tích một số câu danh ngôn … để đời của ngành lập trình. Các bạn có thể thoải mái share mấy câu danh ngôn này để thể hiện mình “so deep”, hoặc ghi nhớ để lòe mấy đứa cùng lớp/cùng team khi nói chuyện nhé. Phần bình luận là ý kiến cá nhân theo cách hiểu của tác giả, các bạn có thể bình luận chia sẻ cách hiểu của các bạn, hoặc góp thêm danh ngôn cho vui. Danh ngôn và bình luận Bất kì ngôn ngữ lập trình nào cũng có những điểm mạnh, điểm yếu riêng. Do đó, ngôn ngữ được sử dụng càng nhiều thì càng bị nhiều người ném đá (Điển hình là PHP , cơ mà nó ngu thật). Có những ngôn ngữ rất hay ho thần thánh như Haskell nhưng vì nhiều lý do lại không ai sử dụng. Câu này cũng tương tự như câu “nguyên nhân dẫn đến 100% vụ ly hôn chính là kết hôn” vậy. Tuy đây là câu nói của một lập trình viên nhưng các bạn tester có thể học thuộc câu này để quăng vào mặt các bạn dev mỗi khi chương trình có bug . Bản thân tác giả là một người đặt nền móng cho ngành Computer Science thông qua bộ sách The Art of Programming (Đây là bộ sách được Bill Gates khuyên đọc ). Đôi khi, chúng ta mải mê optiomize code, làm code chạy nhanh hơn mà quên mất một điều là code phải chạy đúng, dễ hiểu dễ đọc trước đã. Việc optimize code sớm thường không đem lại hiệu quả cao, nhưng lại gây mất thời gian của dev, làm code khó đọc hơn. Đây là một vấn đề khá phức tạp, mình sẽ bàn sâu hơn ở một bài Phản Phác Quy Chân về optimize code. Anh em code lâu năm hẳn cũng biết nỗi khổ ra sao khi phải đặt tên biến, tên hàm, tên class và hầm bà lằng thứ tên rồi nhỉ, nó thật sự là một trong hai thứ khó nhất đấy. Việc invalidate code cũng vậy, vô cùng phức tạp. Nếu làm quá thường xuyên thì không có tác dụng mấy, nếu chờ quá lâu thì dữ liệu sẽ bị mất đồng bộ. Méo thể nào chính xác hơn! Sử dụng phần mềm mà gặp lỗi thì chỉ bực mình một ngày. Làm nghề lập trình , lúc nào cũng gặp bug nên bực mình cả đời. Trong ngành lập trình , không phải cứ nhiều người là dự án sẽ hoàn thành nhanh hơn. Bạn nên học thuộc câu này để nói với Project Manager khi họ cố đưa thêm người vào dự án. Viết code có lương tâm, dễ đọc dễ hiểu, nhớ comment đầy đủ. Hãy thương người maintain code của bạn (Đôi khi chính bạn phải maintain code của mình đấy, phải tự thương mình thôi). Làm tình mà không cẩn thận, để con người ta có bầu thì bạn phải chịu trách nhiệm suốt đời. Lập trình cũng thế, đôi khi do code ẩu, thiết kế ẩu , lòi nhiều bug, bạn sẽ phải chịu trách nhiệm với đống code đó suốt đời (cho đến khi chuyển team hoặc chuyển công ty). Một số danh ngôn khác Quá dễ hiểu nên mình không bình luận gì thêm Kết luận Tuy những câu danh ngôn này rất hay, nhưng chúng không phải lúc nào cũng hoàn toàn đúng. Là lập trình viên, chúng ta phải tự thân suy nghĩ, tự tìm cách giải quyết vấn đề chứ đừng quá dựa dẫm vào các nguyên lý hay danh ngôn. Nhớ comment bạn thích câu danh ngôn nào nhất nhé! Một số nguồn để tham khảo More Good Programming Quotes Rate this: Like this: Related
Quotes are simple, short sayings but contain a whole sky of truth. Quotes are easy to remember, easy to memorize, read less and understand more. For that reason, today I will introduce and analyze some life-changing quotes... from the programming industry. You can freely share these quotes to show that you are "so deep", or remember them to show off to your classmates/team when talking. The comments section is a personal opinion according to the author's understanding. You can comment to share your understanding, or add quotes for fun. Quotes and comments Any programming language has its own strengths and weaknesses. Therefore, the more a language is used, the more people will criticize it (Typically PHP, but it's really stupid). There are very beautiful languages ​​like Haskell but for many reasons no one uses them. This sentence is similar to the sentence "the cause of 100% of divorces is marriage". Although this is a programmer's saying, testers can memorize this sentence to throw at the developers every time the program has a bug. The author himself is the one who laid the foundation for Computer Science through the book series The Art of Programming (This is a book series recommended by Bill Gates). Sometimes, we are so engrossed in optimizing code, making it run faster that we forget one thing: the code must run correctly, be easy to understand and read first. Optimizing code early is often not very effective, but it wastes dev time and makes the code harder to read. This is a quite complicated issue, I will discuss it in more depth in a Counterpart Quy Chan article about optimizing code. Those of you who have been coding for a long time probably know how painful it is to have to name variables, functions, classes, and multiple names, it's really one of the two most difficult things. The same goes for invalidating code, which is extremely complicated. If you do it too often, it won't have much effect. If you wait too long, the data will be out of sync. Couldn't be more accurate! Using the software and encountering errors is only frustrating for a day. As a programmer, I always encounter bugs, so I'm frustrated all my life. In the programming industry, it's not true that having more people means the project will be completed faster. You should memorize this sentence to say to the Project Manager when they try to bring more people into the project. Write conscientious code, easy to read and understand, remember to comment fully. Love the person who maintains your code (Sometimes you have to maintain your code, you just have to love yourself). If you have sex without being careful, if you get pregnant, you will be responsible for your entire life. Programming is the same, sometimes due to careless code, careless design, and many bugs, you will be responsible for that code for the rest of your life (until you change teams or companies). Some other quotations are too easy to understand so I won't comment further. Conclusion Although these quotations are very good, they are not always completely true. As programmers, we must think for ourselves, find ways to solve problems, and not rely too much on principles or quotations. Remember to comment which quote you like the most! Some sources for reference More Good Programming Quotes Rate this: Like this: Related
Đầu tháng 9 này, mình sẽ tạm kết thúc năm đầu tiên của chương trình học Master , về Việt Nam vi vu đú đởn khoảng 1 tháng. Đầu tháng 10 mình lại phải qua Trung Quốc bán thận,… nhầm, bán thân khoảng 6 tháng trước khi quay lại UK kết thúc chương trình học. Vì lẽ đó, mình phải ngậm ngùi nói lời chia tay với team hiện tại. Lần này, mình viết một bài review nho nhỏ về những trải nghiệm bản thân trong thời gian gần đây. Môi trường làm việc lý tưởng Có thể nói, làm việc trong phòng IT của trường Lancaster là một trải nghiệm khá sung sướng với mình (Mình từng chia sẻ một số câu chuyện về phỏng vấn và ngày đầu làm việc ở đây, khá thú vị so với Việt Nam). Ban đầu, công việc chính của mình là front-end: thiết kế và code giao diện và flow cho một số ứng dụng nhỏ trong ứng dụng iLancaster. Team có một team nhỏ riêng chuyên lo về back-end. Tuy nhiên, do có kinh nghiệm viết C# nên đôi khi cần mình cùng nhảy qua team back-end viết RestAPI luôn. Từ UI developer nhảy lên full-stack developer mà không được tăng lương, cũng hơi buồn. Do code cũng khá nên mình hoàn thành công việc khá nhanh và đúng deadline, cũng tạo được chút tiếng tăm nho nhỏ trong team. Mỗi khi có gì thắc mắc về UI là mấy bạn intern lại hỏi mình, anh Liam lead team front-end mỗi khi fix bug khó cũng … rủ mình fix chung cho nhanh :)). Công ty cũng khá thoải mái, mình tranh thủ mượn được con Macbook về nhà để code và nghịch ngợm. Từ Win chuyển sang Mac quả là từ địa ngục lên thiên đường. Máy mỏng, touchpad nhẹ êm, pin trâu mỗi lần xài được 7 tiếng. Đã thế lại chẳng cần tắt mở, đóng máy mở ra làm việc ngay, sướng như tiên ấy! Trước mình toàn chê Macbook, giờ mới biết bọn chê Macbook chắc chưa dùng Macbook bao giờ cả. … từ thiên đường xuống địa ngục Theo chương trình học, mình phải tham gia một công ty được trường chỉ định để hoàn thành một project. Chả hiểu may rủi thế nào, mình rơi vào dự án phần mềm của một công ty hóa chất tên The REACH Centre. Dự án này sử dụng PHP, cái thứ ngôn ngữ rẻ tiền mà mình ghét cay ghét đắng. Đúng là ghét của nào trời trao của đó! Mọi chuyện chưa đừng ở đó! Càng trò chuyện với anh Team Leader mình càng đổ mồ hôi hột: Nói chung cảm giác của mình không khác gì từ thiên đường rơi cmn xuống địa ngục. Lại thêm khóa luận lơ lửng trên đầu làm mình buộc phải chạy như con thoi suốt cả tuần liền, cả tuần chẳng có ngày nào yên ổn: Thứ 2 : Đi làm bên ISS từ 9h tới 5h chiều. Tối viết khóa luận từ 9h tới 1h sáng. Thứ 3-5 : Đi làm bên The Reach Centre từ 9h tới 5h chiều. Tối về học tiếng TQ, viết khóa luận tới 1-2h sáng. Thứ 6 : Tương tự thứ 2. Cuối tuần : Tiếp tục đọc sách, viết khóa luận Đến giờ ngẫm lại, chả hiểu sao mình vẫn còn sống sốt được, may mắn thật!! Những điều học được Dù hơi cực khổ, nhưng trải nghiệm làm 2 công ty một lúc này đã giúp mình học được khá nhiều điều. Ở team Lancaster ISS, mình học được khá nhiều điều về phong thái cần có của một manager thông qua bác Brian: Biết cách giao đúng việc cho đúng người; Khi đã giao thì tin tưởng thành viên, nhưng thỉnh thoảng vẫn check “How’s it going?” để nắm tiến độ, đưa ra giúp đỡ khi cần thiết. Mình cũng học được vài điều khác khi làm việc với mấy anh dev bên The Reach Center. Có thể kĩ năng technical họ không giỏi (Kiến trúc code khá rối, thiếu qui trình ) nhưng code rất có tâm và có trách nhiệm . Code của họ có comment đầy đủ, validate đầy đủ, họ cũng rất nhiệt tình trả lời các câu hỏi của mình. Mình chợt ngẫm ra được một điều: Đừng vội đánh giá một developer qua trình độ technical, mà hãy nhìn thái độ code, thái độ làm việc của họ , Nói lời tạm biệt Chia tay thì dĩ nhiên là không vui. Mình và bác Brian Product Manager cũng có một cuộc trò truyện nho nhỏ với nhau. Bác có feedback tốt về khả năng lập trình và tinh thần làm việc của mình. Ngoài ra, bác còn sẵn sàng cho mình recommendation nữa (Có thể cho thông tin liên lạc của bác vào CV để khi xin việc họ có thể hỏi bác về mình), đúng là người tốt thật ahihi. Bác Brian cũng sẵn sàng cho mình một chỗ trống khi mình quay lại vào năm sau, đúng là ở hiền gặp lành mà. Số mình cũng hên, nên lần nào nghỉ việc cũng được tặng quà chia tay cả. Về Việt Nam, hẳn mình sẽ nhớ những bữa ăn nhậu hoặc daily meeting bên này. Cảm ơn mọi người vì đã giúp đỡ mình trong thời gian qua. Lancaster, hẹn gặp lại! Rate this: Like this: Related
In early September, I will temporarily finish the first year of the Master's program and return to Vietnam to travel for about 1 month. In early October, I had to go to China to sell my kidney,... mistakenly, I sold my body for about 6 months before returning to the UK to finish my studies. For that reason, I had to sadly say goodbye to my current team. This time, I write a small review about my recent experiences. Ideal working environment It can be said that working in Lancaster's IT department is a quite happy experience for me (I have shared some stories about interviews and my first day working here, quite interesting. compared to Vietnam). Initially, my main job was front-end: designing and coding the interface and flow for a number of small applications in the iLancaster application. The team has a separate small team specializing in back-end. However, because I have experience writing C#, sometimes I need to join the back-end team to write RestAPI. Jumping from UI developer to full-stack developer without getting a raise is a bit sad. Because the code was good, I completed the work quite quickly and on time, and also created a little reputation in the team. Every time I have any questions about the UI, the interns ask me. Liam, who leads the front-end team, whenever it's difficult to fix a bug, invites me to fix it together quickly :)). The company is also quite comfortable, I took advantage of the opportunity to borrow a Macbook to take home to code and play around. Switching from Windows to Mac is truly going from hell to heaven. The device is thin, the touchpad is light and smooth, and the battery lasts for 7 hours at a time. Plus, there's no need to turn it on or off or close the device and start working right away, it's as happy as a fairy! Before, I always criticized Macbooks, but now I know that those who criticize Macbooks have probably never used a Macbook. ... from heaven to hell According to the curriculum, I must join a company designated by the school to complete a project. Without knowing how lucky I was, I fell into a software project of a chemical company called The REACH Center. This project uses PHP, a cheap language that I hate. It's true that you hate what God gives you! Everything is not there yet! The more I talked to the Team Leader, the more I sweated: In general, my feeling was like falling from heaven to hell. Another thesis hanging over my head forced me to run like a shuttle for a whole week, without a single peaceful day throughout the week: Monday: Go to work at ISS from 9am to 5pm. Write your thesis from 9am to 1am in the evening. Tuesday-Thursday: Go to work at The Reach Center from 9am to 5pm. At night, I study Chinese and write my thesis until 1-2am. Friday: Similar to Monday. Weekend: Continue reading books and writing thesis Looking back now, I don't understand why I'm still alive, I'm so lucky!! Things learned Although it was a bit difficult, this experience of working for 2 companies at the same time has helped me learn quite a few things. At the Lancaster ISS team, I learned a lot about the necessary demeanor of a manager through Brian: Knowing how to assign the right job to the right person; Once delivered, trust the member, but still occasionally check "How's it going?" to monitor progress and provide help when needed. I also learned a few other things while working with the developers at The Reach Center. Maybe their technical skills are not good (code architecture is quite confusing, lack of process) but the code is very conscientious and responsible. Their code has full comments, full validation, and they are also very enthusiastic in answering my questions. I suddenly thought of something: Don't rush to judge a developer based on their technical level, but look at their coding attitude, their working attitude. Saying goodbye Of course, saying goodbye is not fun. Mr. Brian Product Manager and I also had a small chat together. He has good feedback about his programming ability and working spirit. In addition, you are also willing to give me a recommendation (You can put your contact information on your CV so that when applying for a job they can ask about you), what a good person ahihi. Uncle Brian is also willing to give me an empty spot when I come back next year. It's true that good things come from good times. I'm also lucky, so every time I quit my job I get a farewell gift. When I return to Vietnam, I will definitely miss the meals and daily meetings here. Thank you everyone for helping me in the past. Lancaster, see you soon! Rate this: Like this: Related
Gần đây mình nhận được một số câu hỏi về chuyện “Nên tập trung vào 1 ngôn ngữ hay là học nhiều ngôn ngữ”. Đây là một vấn đề gây khá nhiều tranh cãi trong cộng đồng lập trình viên. Thật ra, không có câu trả lời đúng cho câu hỏi này! Trong nội dung bài viết, mình sẽ phân tích những điểm lợi/hại của mỗi lựa chọn. Tuy nhiên, lựa chọn cuối cùng vẫn là do bản thân các bạn nhé. Thật ra, ngay từ đầu các bạn đã đặt sai câu hỏi! Thay vì hỏi “nên học một hay nhiều ngôn ngữ”, các bạn nên hỏi là “nên phát triển bản thân theo chiều rộng (generalist) hay chiều sâu (specialist)?”. Thế nào là biết rộng? Biết rộng thì được gì? Nhiều bạn lầm tưởng rằng chỉ biết sử dụng nhiều ngôn ngữ/ công nghệ , mình sẽ thành người biết rộng. Điều này chỉ đúng một phần thôi. Học rộng có nghĩa là: ngoài việc biết sử dụng nhiều ngôn ngữ/công nghệ, bạn còn phải biết một số thứ ngoài lề khác (lấy requirement, thiết kế giao diện , cài đặt server). Nói cho oách là siêu nhân ôm đủ việc, nói mỉa mai tức thì là ku-li gì cũng làm. Các cụ có câu “một nghề cho chín còn hơn chín nghề”, nhưng câu này có vẻ không đúng lắm với ngành IT. Khi xây dựng một hệ thống phần mềm, nếu có kiến thức rộng, ta sẽ dễ nắm được cách toàn bộ hệ thống vận hành, giú dễ bảo trì, sửa chữa khi có lỗi xảy ra hơn. Ngoài ra, nếu biết rộng, bạn sẽ có nhiều cơ hội việc làm hơn. Hiện tại, biết rộng đang dần trở thành xu hướng. Bên cạnh Front-end developer, Back-end developer, nay ta có thêm Full-stack developer. Trước kia Dev (phát triển phần mềm) và Operation (vận hành, bảo trì sản phẩm) được tách riêng ra. Gần đây thì lại gộp luôn là DevOps, developer ngoàiviệc code còn phải biết thêm về setup hệ thống. Thế nào là biết sâu? Biết sâu thì được gì? Nhiều bạn biết sâu tức là tập trung thời gian vào 1 ngôn ngữ, không học những thứ khác. Thật ra, biết sâu yêu cầu cao hơn nhiều! Biết sâu tức là biết tường tận tường tận mọi ngóc ngách của ngôn ngữ/công nghệ/lĩnh vực nào đó. Lấy ví dụ JavaScript, biết rộng tức là bạn có thể sử dụng nhiều framework như AngularJS, VueJS, React, … Biết sâu thì đòi hỏi cao hơn. Ngoài việc học/sử dụng framework, bạn còn phải biết về các khái niệm execution stack , lexical scope , closure,… trong Javascript , cách tổ chức code cho 1 project JS lớn, cách optimize khi code chạy chậm. Nếu thật sự chuyên sâu một ngôn ngữ/công nghệ nào thì bạn sẽ được nhiều công ty săn đón, với lương khá cao. Cứ hỏi mấy bác senior C++ 5-10 năm trở lên xem lương bao nhiêu là biết. Tại sao lại vậy? Hãy tưởng tượng bạn đang thèm ăn bò bít tết, bạn sẽ chọn nhà hàng A “Phục vụ đầy đủ các món Á Âu”, hay nhà hàng B “Chỉ chuyên bò bít tết”. Dĩ nhiên là nhà hàng B phải không. Nếu cần tuyển chuyên gia cho 1 mảng nào đó, các công ty sẽ ưu tiên người biết sâu hơn. Tất nhiên bạn cũng sẽ có gặp một số rủi ro. Do chỉ chuyên sâu một ít ngôn ngữ nên có thể bạn sẽ khó tìm được công việc như ý hơn. Ngoài ra, nếu ngôn ngữ/công nghệ của bạn… tử ẹo thì bạn phải bỏ thời gian ra học và chuyên sâu thứ khác. Ví dụ, các bác chuyên gia Flash và Silverlight (2 công nghệ đã tử ẹo) sẽ rất khó tìm việc, nhưng nếu tìm được thì lương khá cao vì bây giờ ít người rành 2 cái đấy. Vậy người coder phải làm sao? Như mình đã nói, bài viết chỉ phân tích và định hướng chứ không thể trả lời cho bạn được. Lời khuyên hữu ích nhất mà mình có thể đưa ra là: Kiến thức dạng chữ T tức là bạn sẽ tập trung phát triển kiến thức nền tảng trên nhiều lĩnh vực, sau đó tập trung chuyên sâu vào một ít lĩnh vực mà mình thấy hứng thú. Với các bạn sinh viên , ở giai đoạn đầu, bạn sẽ không biết mình giỏi cái gì, yếu cái gì, cần tập trung vào thứ gì. Vậy thì cứ học rộng trước đi đã. Khi đã có chút kinh nghiệm với nhiều ngôn ngữ/công nghệ , bạn sẽ dễ lựa chọn hướng phát triển cho bản thân hơn. Một điều cần lưu ý nữa là nếu bạn đam mê startup thì nên ưu tiên “biết rộng” . Ở giai đoạn đầu khởi nghiệp, nhân sự ít, lập trình viên phải có khả năng đa nhiệm, làm đủ việc . Phát triển sản phẩm startup đòi hỏi bạn phải thông tuệ nhiều thứ để vận hành hệ thống trơn trụ. Ngược lại, nếu đầu quân cho các công ty lớn, họ sẽ ưu tiên người có kiến thức tập trung, hiểu sâu vấn đề. Kết luận Điều quan trọng nhất là bạn phải liên tục học tập, biết rộng cũng được, biết sâu cũng được. Nhiều bạn phân vân không biết nên học rộng hay sâu do sợ phí thời gian, kết quả là họ … đứng im một chỗ, không tiến bộ gì cả. Nếu bạn vẫn chưa rõ mình muốn gì, cứ học đi, đừng ngại tốn thời gian. Cứ tiến về phía trước, rồi sẽ có một con đường mở ra cho bạn. Bonus – Về việc chọn ngôn ngữ Hãy xem ngôn ngữ như con gái. Một developer giỏi phải biết nhiều ngôn ngữ. Một thanh niên tốt phải có nhiều bạn gái! Bạn sẽ cần một em gái đảm đang làm vợ, một em dễ thương làm bồ nhí, một số em dễ chăn để chịch khi cần. Ngôn ngữ cũng thế: Chọn một em mạnh mẽ, nhiều người dùng ( C# , Java) làm ngôn ngữ chính, tập trung đối tốt với em này như vợ. Chọn một em khác nổi tiếng để làm bồ nhí ( JavaScript ), dành nhiều thời gian tán tỉnh chiều chuộng. Chọn một số em nhanh gọn dễ dãi làm rau ( PHP , JavaScript), dùng để code mấy dự án nho nhỏ, lặt vặt. À, mấy cái ví dụ về rau, vợ và bồ nhí là theo góc nhìn của mình thôi nhé. Tùy theo sở thích mà bạn có thể chọn PHP, JavaScript làm vợ và C++ làm rau. Các bạn nên chung thủy, dành nhiều thời gian cho vợ nhà, nhưng nhớ ngó nghiêng các em hàng xóm và tình hình thế giới ra sao nhé. Một số góc nhìn của các developer khác: Sách The Passionate Programmer mình từng review cũng có nói về 2 hướng phát triển Generalist và Specialist Rate this: Like this: Related
Recently I received a number of questions about "Should I focus on one language or learn multiple languages?" This is an issue that causes quite a bit of controversy in the programming community. Actually, there is no right answer to this question! In the article, I will analyze the advantages/disadvantages of each option. However, the final choice is still up to you. Actually, you asked the wrong question in the first place! Instead of asking "should I learn one or more languages", you should ask "should I develop myself in breadth (generalist) or depth (specialist)?". What is extensive knowledge? What does it mean to know widely? Many people mistakenly think that just by knowing how to use many languages/technologies, they will become knowledgeable. This is only partly true. Learning widely means: in addition to knowing how to use many languages/technologies, you also have to know some other peripheral things (getting requirements, designing interfaces, installing servers). To put it bluntly, Superman can do everything, but to say it ironically, Ku-li can do anything. There is a saying "one job for nine is better than nine jobs", but this seems not to be true for the IT industry. When building a software system, if we have extensive knowledge, it will be easier to understand how the entire system operates, making it easier to maintain and repair when errors occur. In addition, if you know widely, you will have more job opportunities. Currently, knowing widely is gradually becoming a trend. Besides Front-end developers and Back-end developers, we now have Full-stack developers. Previously, Dev (software development) and Operation (product operation and maintenance) were separated. Recently, it has been grouped together as DevOps. Developers, in addition to coding, also have to know more about system setup. What is deep knowing? What is the benefit of knowing deeply? Many of you know that deep means focusing your time on one language, not learning other things. Actually, knowing deeply requires a much higher level! Knowing deeply means knowing thoroughly every nook and cranny of a certain language/technology/field. Taking JavaScript for example, knowing widely means you can use many frameworks such as AngularJS, VueJS, React, etc. Knowing deeply requires more. In addition to learning/using the framework, you also have to know about the concepts of execution stack, lexical scope, closure,... in Javascript, how to organize code for a large JS project, and how to optimize when code runs slowly. If you really specialize in any language/technology, you will be sought after by many companies, with quite high salaries. Just ask any C++ senior who has been there for 5-10 years or more to see how much their salary is. Why? Imagine you are craving for steak, will you choose restaurant A "Serves a full range of Asian and European dishes", or restaurant B "Only specializes in steak". Of course it's restaurant B, right? If they need to recruit experts for a certain field, companies will prioritize people with more in-depth knowledge. Of course you will also encounter some risks. Because you only specialize in a few languages, it may be more difficult for you to find the job you want. In addition, if your language/technology is... terrible, you have to spend time learning and specializing in something else. For example, experts in Flash and Silverlight (two obsolete technologies) will have a hard time finding a job, but if they can find a job, the salary is quite high because now few people are familiar with those two things. So what should coders do? As I said, this article only provides analysis and direction but cannot answer you. The most useful advice I can give is: T-shaped knowledge means you will focus on developing foundational knowledge in many fields, then focus in-depth on a few fields that you find interesting. animal. For students, in the early stages, you will not know what you are good at, what you are weak at, or what you need to focus on. So just learn widely first. Once you have some experience with many languages/technologies, it will be easier for you to choose your own development direction. Another thing to note is that if you are passionate about startups, you should prioritize "wide knowledge". In the early stages of starting a business, there are few personnel, programmers must be able to multitask and do everything. Developing startup products requires you to be knowledgeable about many things to operate the system smoothly. On the contrary, if they join large companies, they will prioritize people with focused knowledge and a deep understanding of the problem. Conclusion The most important thing is that you must continuously study, knowing widely is okay, knowing deeply is okay. Many people are confused about whether they should study widely or deeply because they are afraid of wasting time. As a result, they... stand still, not making any progress. If you still don't know what you want, just study, don't be afraid to waste time. Just move forward, and a path will open up for you. Bonus – About choosing a language Treat language like a girl. A good developer must know many languages. A good young man must have many girlfriends! You will need a capable girl to be your wife, a cute girl to be your mistress, and some easy-going girls to fuck when needed. The same goes for language: Choose a strong, widely used child (C#, Java) as the main language, focus on treating this child well as a wife. Choose another famous girl to be your mistress (JavaScript), spend a lot of time flirting and pampering her. Choose some quick and easy-to-use vegetables (PHP, JavaScript), and use them to code small, odd projects. Well, the examples about vegetables, wives and mistresses are just from my perspective. Depending on your preferences, you can choose PHP, JavaScript as your wife and C++ as your vegetable. You should be faithful, spend a lot of time with your wife, but remember to look at your neighbors and the world situation. Some perspectives from other developers: The book The Passionate Programmer I reviewed also talks about two development directions: Generalist and Specialist Rate this: Like this: Related
Đa phần những bạn học IT đều là những người có đam mê với máy tính. Thuở nhỏ, mình thích máy tính là do mê chơi game, muốn sau này học IT để làm game. Lớn hơn một chút, xem phim về hacker, mình lại muốn học IT để sau này trở thành hacker. Đến lúc vào đại học , mình cắm đầu học đến tận lúc gần ra trường mới biết ngành mình học là Software Engineering – viết phần mềm chứ không phải hack hay bảo mật. Mà thôi kệ, theo ngành này cũng vui, chẳng có gì phải phàn nàn. Tuy vậy, mình vẫn có hứng thú với hack và hacker. Hẳn là các bạn dân IT cũng thế. Do hôm trước mình đọc được một cuốn sách khá hay về giới hacker nên hôm nay mình viết review để chia sẻ với các bạn. Cuốn sách có tên là The Art of Intrusion – Nghệ thuật xâm nhập. Về tác giả Tác giả cuốn sách này là Kevin Mitnick , một hacker khá nổi tiếng. Chuyện đời của cha này khá là lâm li bi đát, nhầm, khá là li kì. Năm 13 tuổi, ông đã bắt đầu sự nghiệp lừa đảo bằng cách lục thùng rác trạm xe buýt,tự mua máy đóng vé để tự làm vé xe buýt giả (để đi bus free). Năm 16 tuổi, lần đầu tiên ông hack vào máy chủ một công ty và chôm phần mềm về, lãnh ngay án tù 1 năm. Vẫn chưa tởn, gần hết hạn tù, ông lại tiếp tục… hack công ty Pacific Bell và bị FBI truy nã. Ông bắt đầu giở đủ mọi chiêu trò từ lừa đảo ngoài đời thực (social engineering) cho tới hack để thoát vòng truy đuổi của FBI. Ông trốn được tận 2 năm rưỡi cho đến khi bị bắt. Lúc vào tù, toà cấm ông đụng vào vi tính vì có lời đồn là ông có thể… kích hoạt bom hạt nhân chỉ cần thông qua điện thoại. Sau khi mòn răng bóc lịch trong tù cỡ 4, 5 năm thì ông được thả, Kevin quyết định rửa tay gác kiếm, mở công ty tư vấn bảo mật, đồng thời trở thành diễn giả kiêm tác giả. Tiểu sử tác giả hầm hố vậy nên các bạn có thể tin tưởng những điều trong sách, không phải do ổng chém gió ra đâu. Tóm tắt Sách là tổng hợp khoảng 10 câu chuyện có thật về nghệ thuật hack. Tuy không phải là những sự việc đình đám, mỗi câu chuyện lại có những nét độc đáo riêng. Đọc sách, ta sẽ thấy hacker không chỉ là những kẻ ngồi máy tính gõ tay năm ngón, hoặc có khả năng technical thần thánh như trong phim. Trong số họ, có những người giỏi code, có người lại rất kiên trì (bỏ 3 tháng để hack 1 trang web), có người lại vô cùng rành về các lỗ hổng bảo mật. Đơn cử, có 1 chuyện về 1 anh hacker tìm cách đột nhập vào hệ thống mạng một công ty nọ. Sau 6 tháng trời mò mẫm trong hệ thống, anh hiểu rõ mọi ngóc ngách của hệ thống còn hơn cả mấy lão admin hệ thống. Để dụ dỗ bạn đọc, xin tóm tắt câu chuyện đầu tiên trong sách: Một nhóm bạn trẻ 5 người quyết định hack máy đánh xì dách trong casino. Theo phong cách lập trình viên, họ suy luận rằng: máy đánh bài thì cũng là máy tính, mà hễ là máy tính thì hack được. Thế là, họ ra chợ đen tìm mua 1 chiếc máy tương tự, sau đó tháo chip trong máy ra và dịch ngược mã máy ra code để biết máy hoạt động thế nào. Sau khi dịch ra toàn bộ code, họ thấy trong code sử dụng một thuật toán random “đểu”, có thể lợi dụng được. Dựa theo thuật toán của máy, họ tự chế ra một thiết bị hỗ trợ tính toán, chỉ cần làm theo kết quả là có thể thắng tiền trong máy. Để qua mặt nhân viên an ninh trong casino, thiết bị này phải nhỏ gọn, giấu được trong người. Cả nhóm chế tạo thành công, thắng được một khoản tiền kết xù và bắt đầu bị nhiều casino để ý. Cho đến một ngày nọ…. Muốn biết kết truyện thế nào thì nhớ tải sách về đọc nhé ;). Àh quên, câu chuyện trên xảy ra vào đầu những năm 1990, lúc mà công nghệ chưa hiện đại, chưa có đủ tool như bây giờ đâu nhé. Thế mới thấy trình độ của các bác đỉnh ra sao. Nhận xét Đây là sách về technical, nhưng được viết theo phong cách kể chuyện. Mạch truyện rất hấp dẫn và cuốn hút, làm cho sách hay và không hề bị “khô” chút nào. Tác giả cũng bỏ công giải thích rõ những khái niệm lạ như compiler, port scan, social engineering, … nên các bạn không cần kiến thức chuyên sâu vẫn có thể đọc hiểu được. Cuối mỗi câu chuyện, tác giả đều giải thích rõ các lỗ hổng và đưa ra bài học. Những bài học này sẽ rất có ích cho các bạn học bảo mật và developer nhé. Sách khoảng 10 chương, mỗi ngành đọc 1 chương thì 1 tuần bạn sẽ đọc xong thôi. Đánh giá : 8.8/10 Kết luận Thông qua sách, ta thấy đa phần lỗi bảo mật là do các anh sysadmin thiết lập hệ thống ẩu, hoặc do người dùng sử dụng password dễ đoán. Tuy vậy, một phần lỗi do developer không có tâm , code mà quên yếu tố bảo mật (Đơn cử các bạn lập trình viên bên Lotte Cinema ). Do vậy, có thể về sau mình sẽ viết một số bài hoặc nguyên series mới về bảo mật cơ bản cho developer, mong các bạn đón đọc nhé. Rate this: Like this: Related
Most IT students are passionate about computers. When I was young, I liked computers because I loved playing games and wanted to study IT to make games in the future. When I was a little older, watching movies about hackers, I wanted to study IT to become a hacker in the future. When I entered university, I devoted myself to studying until I was almost graduated when I realized my major was Software Engineering - writing software, not hacking or security. But never mind, following this industry is fun, nothing to complain about. However, I am still interested in hacking and hackers. Surely the same goes for IT people. Because the other day I read a pretty good book about hackers, so today I'm writing a review to share with you. The book is called The Art of Intrusion. About the author The author of this book is Kevin Mitnick, a quite famous hacker. This father's life story is quite sad, tragic, and quite thrilling. At the age of 13, he began his fraud career by rummaging through bus station trash and buying a ticket machine to make his own fake bus tickets (to ride the bus for free). At the age of 16, he hacked into a company's server for the first time and stole software, immediately receiving a 1-year prison sentence. Still unrepentant, nearing the end of his prison term, he continued... hacking the Pacific Bell company and was wanted by the FBI. He started using all kinds of tricks from social engineering to hacking to escape the FBI's pursuit. He escaped for 2 and a half years until he was captured. When he was in prison, the court forbade him from touching computers because there were rumors that he could... activate a nuclear bomb just through his phone. After being released from jail for about 4 or 5 years, Kevin decided to hang up his sword, open a security consulting company, and become a speaker and author. The author's biography is strong, so you can trust the things in the book, it's not just him making up stories. Summary The book is a collection of about 10 true stories about the art of hacking. Although not famous events, each story has its own unique features. Reading books, we will see that hackers are not just people who sit at a computer and type with five fingers, or have divine technical abilities like in the movies. Among them, there are people who are good at coding, some people are very persistent (spending 3 months hacking a website), some people are extremely knowledgeable about security holes. For example, there is a story about a hacker trying to break into a company's network system. After 6 months of fumbling around in the system, he understands every nook and cranny of the system better than the old system administrators. To entice readers, let's summarize the first story in the book: A group of 5 young people decided to hack a blackjack machine in a casino. In programmer style, they reasoned that: card machines are also computers, and if they are computers, they can be hacked. So, they went to the black market to buy a similar machine, then removed the chip in the machine and decompiled the machine's code to find out how the machine worked. After translating the entire code, they saw that the code used a "scary" random algorithm that could be exploited. Based on the machine's algorithm, they created a device that supports calculation. Just follow the results and you can win money in the machine. To bypass casino security staff, this device must be compact and concealable on the person. The whole group succeeded, won a huge sum of money and began to be noticed by many casinos. Until one day…. If you want to know how the story ends, remember to download the book and read it ;). Oh, I forgot, the above story happened in the early 1990s, when technology was not yet modern and did not have enough tools like today. That's how great your skills are. Comments This is a technical book, but written in a storytelling style. The story line is very engaging and engaging, making the book good and not "dry" at all. The author also took the time to explain unfamiliar concepts such as compiler, port scan, social engineering, etc. so you can still read and understand without needing in-depth knowledge. At the end of each story, the author clearly explains the flaws and gives lessons. These lessons will be very useful for security students and developers. The book has about 10 chapters, read 1 chapter for each branch and you will finish it in 1 week. Rating: 8.8/10 Conclusion Through the book, we see that most security errors are due to sysadmins carelessly setting up the system, or due to users using easy-to-guess passwords. However, part of the fault is that the developers do not care and code but forget the security factor (For example, the programmers at Lotte Cinema). Therefore, maybe in the future I will write some new articles or a whole series about basic security for developers, I hope you will read it. Rate this: Like this: Related
Chương 1 – Lược sử giang hồ Chương 2 – Võ lâm dậy sóng Chương 3 – Quần hùng cát cứ Hồi thứ bảy – Framework mê hồn trận Hồi thứ tám – Cái sướng và cái khổ của bách tính Hồi cuối – Bí kíp phòng thân Tóm tắt phần trước : NodeJS và hàng loạt các framework ra đời, làm giang hồ đại loạn. Lưu ý : Chương này có ích cho hầu hết các bạn front-end developer hoặc những bạn làm việc nhiều với JavaScript. Nếu bạn là back-end developer hoặc không dùng javascript thì đọc giải trí cũng được. Hồi thứ bảy – Thế cục giang hồ Thuở xưa, chỉ cần rành Javascript và jQuery là có thể độc tẩu giang hồ; thành thục một chút kĩ thuật AJAX nữa là có thể cưỡi mây lướt gió, tiếu ngạo quần hùng. Tiếc thay, thời đấy không còn nữa. Hiện tại, chỉ tính riêng front-end đã có hơn 63 JavaScript framework, con số này vẫn tiếp tục gia tăng ( nguồn ). Dân đen rơi vào cảnh lầm than. Mấy chục framework này hợp lại thành một trận đồ bát quái làm điên đảo từ những coder kinh nghiệm cho tới dân mới vào nghề. NodeJS và vô số thư viện/framework front-end lẫn back-end… làm giang hồ đã loạn nay càng thêm loạn. Xin kể sơ qua một số framework JS đang làm mưa làm gió ( nguồn ): Để bình về thế cuộc, xin trích hai câu thơ trong “Vịnh Framework” do Hoàng thiếu hiệp, môn chủ của Tôi đi code dạo Phái sáng tác. Giang hồ đồn rằng mấy câu thơ lưu danh thiên cổ này được sáng tác khi tác giả đang thưởng rượu ngắm trắng. Kẻ hèn này thì nghĩ rằng nó được sáng tác khi thằng tác giả đang phê cần ngáo đá (Bằng chứng là phía trên nó bảo là hai câu, phía dưới lại lòi ra tận bốn câu). Muốn biết dân tình (developer) dưới thời loạn sống như thế nào, mời xem tiếp hồi sau. Hồi thứ tám – Cái sướng và cái khổ của bách tính Tạp Khúc Gia triều Nguyên từng nói: “Hưng, bách tính khổ; vong, bách tính khổ”, ý là đã chấp nhận kiếp developer thì đời nào cũng khổ. Nói vậy mà không phải vậy. Sự ra đời, cạnh tranh của các framework làm công việc của developer trở nên dễ dàng hơn nhiều. Mọi thứ đều có sẵn, chỉ cần sử dụng thư viện/framework là xong: Muốn dựng web với nodejs ư? Chỉ cần cài express. Muốn viết RestAPI ư? Dùng express cũng chơi được luôn. Muốn viết app di động ư? Ionic (dựa trên Angular) có mặt. Nếu cần mạnh mẽ hơn thì chơi React Native (dựa trên React) luôn. Muốn viết JS chuẩn ES6 ư? Chỉ cần cài Gulp , cài Babel là xong. Song, bên cạnh cái sướng, cái khổ cũng nhiều lắm. Với các developer có kinh nghiệm, việc có quá nhiều framework làm họ cảm thấy khó khăn khi lựa chọn công nghệ phù hợp để theo đuổi. Với các developer mới vào nghề, mọi chuyện còn tệ hơn nhiều. Ngày xưa, nếu muốn học web tĩnh, kẻ nhập môn chỉ cần làm 3 bước sau để bắt đầu: Còn bây giờ, muốn làm một trang web đơn giản, chỉ hiển thị 2 dòng, ta phải làm khoảng 11 bước như sau: Dĩ nhiên, nếu làm theo 11 bước thì code sẽ “sướng” hơn. Tuy nhiên, điều tại hạ muốn nhấn mạnh là thực trạng của JavaScript : quá nhiều framework ra đời, làm cuộc sống của developer trở nên phức tạp hơn và gây vô số khó khăn cho những người mới nhập môn. Các developer Tây Dương bày tỏ quan điểm trên: Ở thời loạn thế này, muốn sống sót không đơn giản. May thay, tại hạ đã thu thập một số bí kíp phòng thân của các bậc tiền bối. Mời quí vị đọc các bí kíp này trong hồi cuối. Hồi kết – Bí kíp phòng thân Theo kinh nghiệm của mình và các tiền bối, thứ quan trọng nhất mà mọi developer cần có là căn bản . Nhớ nhé, học căn bản JS chứ đừng ham hố học framework trước . Căn bản này là những gì: Cơ bản JavaScript. Làm sao để luyện? Tìm đọc series JavaScript sida , phản phác qui chân và một số sách khác nhé. Học NodeJS và tìm hiểu npm. Đây là bắt buộc vì NodeJS dùng cho rất nhiều thứ chứ không chỉ front-end. Tập làm quen với ES6 vì đây là tương lai của JavaScript. Với Babel, ta đã có thể viết JS để chạy trên các trình duyệt cũ. Một số pattern và khái niệm cơ bản: Callback , Class , Module, Prototype , Promise , Ajax Rest API. Nhớ tìm hiểu các mô hình MVC và MVVM luôn. Học xong những thứ này, bạn đã có căn cơ vững chắc trên con đường front-end. Bây giờ ta có thể tập trung chuyên sâu vào một framework (AngularJS, React) tùy theo yêu cầu công việc. Nếu đi theo con đường back-end với NodeJS, bạn cần tìm hiểu thêm về các thư viện cơ bản NodeJS, cơ chế pipe, MongoDB .. trước khi cắm đầu vào các framework như Express hoặc Sail.js nhé. Hãy nhớ kĩ, đừng chạy theo đám đông mà hãy tìm hiểu và suy tính rõ ràng trước. Xin mượn hai câu thơ để mô tả thái độ mà một front-end developer nên có giữa thời loạn thế. Giữa thế cuộc xoay vần như hiện nay, ta có hai lựa chọn. Một là để mình bị cuốn theo thời thế , chạy theo những phù hoa lấp lánh. Hai là rèn căn bản thật vững để có thể giữ lòng “bất biến”. Có căn cơ vững chắc, mọi võ học hay framework đều có thể dễ dàng nắm tới tay. Một số lời khuyên bổ ích khác: Rate this: Like this: Related
Chapter 1 – Brief history of Gypsies Chapter 2 – The martial arts rise Chapter 3 – The heroes and the soldiers Act Seven – Framework bewitches the battle Chapter eight – The happiness and suffering of common people Final act – Self-defense tips Summary of the previous part: NodeJS and a series of frameworks were born, causing chaos. Note: This chapter is useful for most front-end developers or those who work a lot with JavaScript. If you are a back-end developer or don't use javascript, it's okay to read for entertainment. Chapter Seven – The World of Wanderers In the old days, one only needed to be familiar with Javascript and jQuery to be able to run a gang; Master a little AJAX technique and you can ride the clouds and surf the wind, smiling proudly at the heroes. Unfortunately, that time is no more. Currently, there are more than 63 JavaScript frameworks for the front-end alone, a number that continues to increase ( source ). Black people fell into misery. Dozens of these frameworks combine to form a trigram that makes experienced coders to beginners crazy. NodeJS and countless front-end and back-end libraries/frameworks... make the already chaotic situation even more chaotic. Let me briefly tell you some of the JS frameworks that are making waves (source): To comment on the situation, I would like to quote two verses in "Vinh Framework" composed by Hoang Thieu Hiep, the master of I Go Code Walking Phai. It is rumored that these famous ancient poems were composed while the author was enjoying white wine. This coward thinks that it was composed when the author was high and stoned (The evidence is that above it says it's two sentences, below it shows up to four sentences). If you want to know how developers live during the chaos, please continue reading the next episode. Chapter Eight – The happiness and suffering of common people. The Khoc Gia of the Yuan dynasty once said: “Hung, common people suffer; doomed, everyone suffers", meaning that if you accept the life of a developer, every life will be miserable. Say that that is not so. The advent and competition of frameworks make the developer's job much easier. Everything is available, just use the library/framework and you're done: Want to build a website with nodejs? Just install express. Want to write RestAPI? You can also play using express. Want to write a mobile app? Ionic (based on Angular) is present. If you need more power, then play React Native (based on React). Want to write ES6 standard JS? Just install Gulp, install Babel and you're done. However, besides the happiness, there is also a lot of suffering. For experienced developers, having too many frameworks makes it difficult for them to choose the right technology to pursue. For new developers, things are much worse. In the past, if you wanted to learn static web, beginners only needed to do the following 3 steps to get started: Now, if you want to make a simple website that only displays 2 lines, you have to do about 11 steps as follows: However, if you follow the 11 steps, the code will be "happier". However, what I want to emphasize is the current state of JavaScript: too many frameworks have been created, making the life of developers more complicated and causing countless difficulties for beginners. Tay Duong developers expressed the above views: In these chaotic times, surviving is not simple. Fortunately, I have collected some self-defense tips from my predecessors. Please read these tips in the last chapter. Conclusion - Self-defense tips According to my experience and that of my seniors, the most important thing every developer needs is the basics. Remember, learn the basics of JS, don't be tempted to learn the framework first. What is this basic: JavaScript basics. How to practice? Read the JavaScript sida series, counter sketch qui chan and some other books. Learn NodeJS and learn npm. This is required because NodeJS is used for many things, not just the front-end. Get familiar with ES6 because this is the future of JavaScript. With Babel, we can write JS to run on old browsers. Some basic patterns and concepts: Callback, Class, Module, Prototype, Promise, Ajax Rest API. Remember to learn MVC and MVVM models too. After learning these things, you will have a solid foundation on the front-end path. Now we can focus in-depth on one framework (AngularJS, React) depending on job requirements. If you go the back-end route with NodeJS, you need to learn more about the basic NodeJS libraries, pipe mechanism, MongoDB... before diving into frameworks like Express or Sail.js. Remember, don't follow the crowd, but research and think clearly first. Let me borrow two verses to describe the attitude that a front-end developer should have in the midst of chaos. In the midst of the current turmoil, we have two choices. One is to let yourself be swept away by the times, chasing after sparkling vanities. Second, forge a strong foundation to be able to maintain an "unchangeable" heart. With a solid foundation, every martial art or framework can be easily grasped. Some other useful tips: Rate this: Like this: Related
Làm lập trình viên, hẳn ai cũng biết tới khái niệm … web bán hàng. Code một trang web bán hàng là cách rất tốt để áp dụng ngôn ngữ / công nghệ mới . Thông qua các chức năng đăng kí, đăng nhập, show sản phẩm, ta học được cách phân quyền, routing, phân trang, xử lý business logic. Nhiều bạn sinh viên cho rằng code web bán hàng là một chuyện đơn giản , phần nhiều chỉ là thêm bớt xóa sửa. Thật vậy chăng? Hãy đọc bài viết này để xem bạn có mắc phải hai sai lầm dưới không nhé nhé. Sai lầm 1 – Không lưu giá tiền của sản phẩm vào trong hóa đơn Quan hệ giữa Order và Item là many-to-many, do đó ta phải thêm 1 bảng ở giữa để kết nối 2 bảng này. Theo lý thuyết, khi hiển thị hóa đơn, có thể tham chiếu qua bên bảng Item để lấy giá của sản phẩm và đem ra hiển thị. Tuy nhiên theo thực tế, giá tiền của sản phẩm thường thay đổi . Giả sử 10/5, giá một ổ bánh mì là 10k; đến ngày 12/5, giá của một ổ bánh mì là 15k. Khi ta xem chiếu lại hóa đơn ngày 10/5, ta thấy giá ổ bánh mì vẫn là 15k , vì nó tham chiếu tới giá hiện tại trong bảng Item . Ngoài ra, giá còn bị tác động các chương trình khuyến mãi, giảm giá. Nếu chỉ lưu giá sản phẩm thì lúc hiển thị hay xuất báo cáo, thông tin sẽ bị sai lệch. Vậy ta xử lý như thế nào? Cách đơn giản nhất là thêm 1 column chứa giá sản phẩm trong hóa đơn vào bảng OrderItem . Nhiều khi người ta còn dùng 1 bảng riêng để lưu sự thay đổi về giá cả cho từng sản phẩm, sau đó dựa theo ngày trên hóa đơn để tìm giá của sản phẩm trong ngày đó. (Lưu ý: bảng OrderItem có thể dùng ItemID và OrderID làm composite primary key nhé, mình tạo ID cho dễ query khi dùng Entity Framework thôi) Sai lầm 2 – Lưu giỏ hàng trong session Khi học về session trong Web, người ta thường dùng web bán hàng làm ví dụ. Mỗi user có 1 session riêng, do đó ta dùng session để lưu giỏ hàng cho mỗi user. Tuy nhiên, cách này chỉ phù hợp với web demo hoặc đồ án trong trường, chứ trong thực tế thì … rất dễ phát sinh vấn đề. Chúng ta thường không hiểu rõ quá trình mua hàng của người dùng. Nhiều trường hợp người dùng bỏ hàng vào giỏ rồi check out. Đôi khi, người dùng lại bỏ hàng vào giỏ để lưu tạm, dồn vài hôm cho nhiều rồi mua luôn 1 lượt để hưởng khuyến mãi. Nếu lưu giỏ hàng vào session, giỏ hàng sẽ bị biến mất khi session timeout, gây khó chịu cho người dùng. Hoặc giả sử người dùng sử dụng cả web và di động để mua hàng, nếu lưu trên session thì khi chuyển qua thiết bị khác, người dùng sẽ không thấy giỏ hàng của mình đâu nữa! Ngoài ra, về mặt technical, session chạy trong môi trường server farm sẽ gặp phải một số vấn đề ( xem thêm ). Vậy ta xử lý thế nào? Cách 1 – Lưu trong local storage : Cách này ko dùng được với trình duyệt cũ (có thể dùng cookie tạm). Cách này làm nhẹ tải server vì dữ liệu được đọc và ghi ở phía client. Nhược điểm là khi đổi device thì không thể xem được giỏ hàng. Bên tiki.vn có vẻ là dùng cách này. Cách 2 – Lưu trong database: Với user đã tồn tại, ta lưu giỏ hàng của họ trong DB. Với user không đăng mới, ta lưu 1 chuỗi id ở cookie hay local storage của họ, dùng cookie đó để truy vấn giỏ hàng trên DB. Nếu người dùng chỉ cho hàng vào giỏ, sau đó không quay lại website thì DB sẽ có khá nhiều dữ liệu rác. Để giải quyết chuyện này, người ta thường tạo 1 vài task chạy ngầm để xóa dữ liệu rác khỏi DB. (Trên amazon giỏ hàng bị xóa sau 90 ngày). Ngoài ra, để tăng tốc độ lưu, ta có thể dùng một số database NoSQL có tốc độ đọc ghi nhanh để lưu giỏ hàng. Nopcommerce , một trong số các framework e-commerce nổi tiếng của C# cũng lưu cart vào database (Các bạn nào code PHP thì vào xác nhận xem framework các bạn dùng có lưu cart vào DB không nhé, mình nghĩ là có). Nếu bạn vẫn chưa tin điều mình nói, hãy thử mua hàng trên Amazon và Ebay xem. Bạn sẽ thấy, sau khi cho hàng vào giỏ, bạn log out ra, sử dụng điện thoại để vào thì giỏ hàng vẫn còn đấy. Điều này chỉ có thể làm được khi giỏ hàng được lưu trong database. Kết Thế nhé, đừng coi thường sự phức tạp của 1 trang web bán hàng nhé. Để làm được một trang web bán hàng tiện dụng, cần có sự thấu hiểu về UI/UX (xem thêm bài viết 1 button giá 300 triệu đô ). Một số chức năng phức tạp như: người mua sản phẩm A cũng mua sản phẩm B, recommend sản phẩm theo đặc điểm người dùng,… cũng đòi hỏi một số thuật toán data mining rất phức tạp phía sau sau. Nói chung, việc tự code một trang web bán hàng là một cách học rất tốt . Song nếu code cho doanh nghiệp, cần làm nghiêm túc thì bạn nên sử dụng một số Framework/CMS có sẵn. Ở VN thì Web bán hàng khá rẻ là do người ta dùng framework rồi custom lại cho nhanh thôi. Nếu như thiết kế và code từ đầu, thêm 1 số chức năng phức tạp thì không có giá 3-5 triệu đâu nhé. Rate this: Like this: Related
As a programmer, everyone probably knows the concept of... web sales. Coding a sales website is a great way to apply new languages ​​/ technologies. Through the registration, login, and product show functions, we learn how to decentralize, route, paginate, and handle business logic. Many students think that coding a sales website is a simple matter, mostly just adding, removing, and editing. Is that true? Read this article to see if you make the two mistakes below. Mistake 1 - Not saving the price of the product in the invoice The relationship between Order and Item is many-to-many, so we must add a table in the middle to connect these two tables. In theory, when displaying an invoice, you can refer to the Item table to get the price of the product and display it. However, in reality, the price of the product often changes. Assuming 10/5, the price of a loaf of bread is 10k; By May 12, the price of a loaf of bread is 15k. When we review the invoice dated May 10, we see that the price of the loaf of bread is still 15k, because it refers to the current price in the Item table. In addition, prices are also affected by promotions and discounts. If you only save product prices, when displaying or exporting reports, the information will be incorrect. So how do we handle it? The simplest way is to add a column containing the product price in the invoice to the OrderItem table. Many times people also use a separate table to save price changes for each product, then based on the date on the invoice to find the price of the product on that day. (Note: the OrderItem table can use ItemID and OrderID as composite primary keys. I created the ID for ease of querying when using Entity Framework) Mistake 2 - Saving the shopping cart in the session When learning about sessions on the Web, people often use sales website as an example. Each user has a separate session, so we use the session to store the shopping cart for each user. However, this method is only suitable for demo websites or school projects, but in reality... problems can easily arise. We often do not understand the user's purchasing process clearly. In many cases, users put goods in the cart and then check out. Sometimes, users put goods in the cart to temporarily store them, store them for a few days, then buy them all at once to enjoy the promotion. If you save the shopping cart to a session, the shopping cart will disappear when the session times out, causing discomfort to the user. Or suppose the user uses both web and mobile to make purchases, if saved in the session, when switching to another device, the user will no longer see his shopping cart! In addition, technically, sessions running in a server farm environment will encounter some problems (see more). So how do we handle it? Method 1 - Save in local storage: This method cannot be used with old browsers (can use temporary cookies). This method lightens the server load because data is read and written on the client side. The downside is that when you change devices, you cannot view the shopping cart. Tiki.vn seems to use this method. Method 2 - Save in database: For existing users, we save their shopping cart in the database. For users who do not post recently, we store an id string in their cookie or local storage, and use that cookie to query the shopping cart on the DB. If the user only puts items in the cart and then does not return to the website, the database will have a lot of junk data. To solve this problem, people often create a few tasks that run in the background to delete junk data from the DB. (On amazon shopping carts are deleted after 90 days). In addition, to increase storage speed, we can use some NoSQL databases with fast read and write speeds to store shopping carts. Nopcommerce, one of the famous C# e-commerce frameworks, also saves carts in the database (If you code in PHP, please confirm whether the framework you use saves carts in the database, I think it does). If you still don't believe what I say, try buying on Amazon and Ebay. You will see, after putting the goods in the cart, you log out and use your phone to enter, the cart is still there. This can only be done when the shopping cart is saved in the database. In conclusion, don't underestimate the complexity of a sales website. To make a convenient sales website, it is necessary to have an understanding of UI/UX (see the article 1 button costs 300 million dollars). Some complex functions such as: people who buy product A also buy product B, recommend products according to user characteristics, etc. also require some very complex data mining algorithms behind the scenes. In general, coding a sales website yourself is a very good way to learn. But if you code for a business and need to do it seriously, you should use some available Framework/CMS. In Vietnam, Web sales are quite cheap because people use frameworks and then customize them quickly. If you design and code from scratch, adding some complex functions, it won't cost 3-5 million. Rate this: Like this: Related
Technical Debt (Nợ kĩ thuật) là một món nợ mà hầu như lập trình viên nào cũng phải gánh trong quá trình làm việc. Hẳn bạn sẽ thắc mắc: Hầu hết lập trình viên chúng mình đều là những con người siêng năng chăm chỉ, không cờ bạc gái gú, hết giờ làm là đi nhậu, mát xa … nhầm, về nhà với vợ con . Chúng ta không vay mượn ai bao giờ thì làm sao có nợ??? Muốn biết câu trả lời, hãy đọc bài viết để tìm hiểu thêm về Technical Debt nhé! Đây là một khái niệm khá quan trọng và bổ ích đấy. Technical Debt là gì? Khái niệm này được đưa ra bởi Ward Cunningham (Cha đẻ của wiki đầu tiên). Trong cuộc sống, đôi khi bạn sẽ phải mượn tiền để xài, sau đó cày cuốc trả. Số tiền này được gọi là nợ. Trong lập trình cùng thế, đôi khi ta chọn cách giải quyết “mì ăn liền”, giải quyết được vấn đề ngay, nhưng sẽ gây khó khăn cho quá trình phát triển và bảo trì về sau. Mỗi lần như vậy, ta tạo thêm 1 khoản “nợ kĩ thuật” cho dự án. Technical bebt ban đầu rất ít , nhưng theo quá trình code thì càng ngày nó càng nhiều lên, trở thành nợ nầng chồng chất. Một số ví dụ: Để tái sử dụng code đã viết, ta copy và paste code sửa đôi chút (thay vì phải tách thành module riêng). Cách này nhanh, nhưng khi có bug thì sửa… chết mẹ vì code được copy ở đủ chỗ. Khi có requirement mới, thay với áp dụng sửa lại code cho dễ mở rộng, ta viết thêm hàm if. Cách này nhanh, nhưng mở rộng nhiều thì code sẽ một đống if. Có bug khủng liên quan tới kiến trúc hệ thống, thay vì fix bug và refactor thì ta try/catch nuốt lỗi và fix tạm ở phần ngọn, gọi là hotfix. Technical Debt là điều tất yếu trong quá trình code. Mỗi quyết định ta đưa ra trong lúc code đều làm tăng số nợ này lên. Điều quan trọng là mượn xong thì phải trả , nếu để lâu, techinical debt tích lỹ sẽ gây ra nhiều hậu quả nguy hiểm khôn lường. Tác hại “khủng khiếp” của nợ Nếu không trả nợ, cả vốn lẫn lãi sẽ dần chồng chất trong quá trình phát triển. Quá nhiều technical debt làm chậm tốc độ của team, đồng thời ảnh hưởng đến tinh thần làm việc của các thành viên trong nhóm. Trong nhiều dự án, vì ban đầu bị trễ deadline nên team phải code ẩu, sinh ra technical debt. Nợ làm cho tốc độ phát triển chậm dần lại, dẫn tới trễ dealine -> code ẩu -> thêm nợ, thành 1 vòng lẩn quẩn. Một tính năng có thể chỉ mất 1 ngày để hoàn thành, nhưng nếu technical debt quá nhiều sẽ mất tới 1 tuần. Tới một mức nào đó, khi không trả được lãi nữa, ta sẽ bị “phá sản”. Lúc này, code hiện tại đã nát tới mức cực kì khó mở rộng hay bảo trì , phải đập đi viết lại. Đây cũng là nguyên nhân gây trễ deadline/thất bại cho nhiều dự án. Nợ ơi em từ đâu tới? Nếu như nợ công của Việt Nam là do các bác “ở trển” ăn xài thoải mái thì nợ technical debt lại do chính bản thân các developer gây ra . Có rất nhiều lý do gây ra technical debt: Do khách hàng thay đổi requirement liên tục, kiến trúc dự án không kịp thay đổi cho phù hợp Do bị dealine dí/ manager gây áp lực nên developer code ẩu để hoàn thành task. Do bản thân developer làm biếng, code không có comment , không viết document. Do team không có technical lead giỏi, hoặc các thành viên không đủ nền tảng kĩ thuật tốt. Đôi khi technical debt là do cố ý : Chấp nhận làm nhanh vì phải có sản phẩm giao khách hàng, giành dự án, vấn đề technical tính sau . Hoặc trong các công ty start-up, người ta xây dựng sản phẩm (MVP) nhanh chóng nhất có thể để khảo sát nhu cầu người dùng. Lúc này, chức năng và tốc độ phát triển mới là quan trọng nhất, code ẩu hay kiến trúc tệ không quan trọng. Làm sao trả nợ ??? Như mình đã nói, code nào cũng sẽ có bug, dự án nào cũng sẽ có technical debt. Cách đối phó với technical debt là tạm ngưng việc phát triển, tập trung vào trả nợ . Ta có thể trả nợ bằng cách phân tích và tái cấu trúc hệ thống, hoặc viết thêm document, viết thêm test case, refactor code để code rõ ràng, dễ cải tiến. Đôi lúc ta cũng có thể bỏ qua technical debt , ví dụ như khi làm prototype để demo cho khách hàng. Vì prototype xong rồi vứt luôn nên ta có thể xù nợ. Tuy nhiên nên cẩn thận, có rất nhiều trường hợp khách hàng đòi mở rộng/nâng cấp prototype thành sản phẩm để tiết kiệm thời gian. Lúc này ta phải trả nợ chết cmn luôn. Hãy nhớ một điều: Mỗi lần bạn code ẩu, code đểu, bạn đang thêm nợ cho dự án. Nợ đời có vay có trả, bạn không trả thì thằng khác trong team sẽ trả. Technical debt phải trả bằng thời gian, công sức và mồ hôi nước mắt của lập trình viên đấy nhé. P/S: Nếu sắp nghỉ việc, chuyển công ty thì các bạn cứ code ẩu thoải mái, không sao đâu! Một lập trình viên xấu số nào khác sẽ trả nợ giùm bạn =))). Dành cho các bạn muốn tìm hiểu thêm: Rate this: Like this: Related
Technical Debt is a debt that almost every programmer has to bear during their work. You will probably wonder: Most of us programmers are diligent and hard-working people, we don't gamble with girls, and when we get off work, we go out to drink, get massages... then go home to our wives and children. We never borrow from anyone so how can we have debt??? If you want to know the answer, read the article to learn more about Technical Debt! This is a quite important and useful concept. What is Technical Debt? This concept was introduced by Ward Cunningham (Father of the first wiki). In life, sometimes you will have to borrow money to spend, then pay it back. This amount is called debt. In the same programming situation, sometimes we choose the "instant noodle" solution, which solves the problem immediately, but will cause difficulties in the development and maintenance process later. Each time we do this, we create an additional amount of "technical debt" for the project. Technical debt was initially very small, but as the code progressed, it increased more and more, becoming heavily in debt. Some examples: To reuse already written code, we copy and paste the slightly modified code (instead of having to separate it into separate modules). This method is fast, but when there are bugs, fix them... damn because the code is copied in all the places. When there is a new requirement, instead of modifying the code to make it easier to expand, we write an if function. This method is fast, but if expanded too much, the code will be a bunch of ifs. There is a huge bug related to the system architecture. Instead of fixing the bug and refactoring, we try/catch to swallow the bug and temporarily fix it at the top, called a hotfix. Technical Debt is inevitable in the coding process. Every decision we make while coding increases this debt. The important thing is that after borrowing, you must pay it back. If left for too long, accumulated technical debt will cause many unpredictable and dangerous consequences. The "terrible" harm of debt If debt is not repaid, both capital and interest will gradually accumulate during the development process. Too much technical debt slows down the team's speed and also affects the morale of team members. In many projects, because the initial deadline was missed, the team had to code carelessly, creating technical debt. Debt slows down the pace of development, leading to late deadlines -> careless code -> more debt, creating a vicious cycle. A feature may only take 1 day to complete, but if the technical debt is too much it will take up to 1 week. At a certain point, when we can no longer pay interest, we will go bankrupt. At this point, the current code is so broken that it is extremely difficult to extend or maintain, having to be broken and rewritten. This is also the cause of missed deadlines/failures for many projects. Dear, where do you come from? If Vietnam's public debt is caused by the people "above" spending freely, then the technical debt is caused by the developers themselves. There are many reasons for technical debt: Because customers constantly change requirements, the project architecture cannot change accordingly Due to being pressured by dealine/pressure from the manager, the developer coded carelessly to complete the task. Because the developer himself is lazy, the code has no comments and no documentation. Because the team does not have a good technical lead, or the members do not have enough good technical background. Sometimes technical debt is intentional: Accepting work quickly because we have to deliver products to customers, win projects, technical issues are considered later. Or in start-up companies, people build products (MVPs) as quickly as possible to survey user needs. At this time, functionality and development speed are the most important, sloppy code or bad architecture is not important. How to pay debt??? As I said, every code will have bugs, every project will have technical debt. The way to deal with technical debt is to pause development and focus on paying off debt. We can repay the debt by analyzing and restructuring the system, or writing more documents, writing more test cases, and refactoring the code to make the code clear and easy to improve. Sometimes we can ignore technical debt, for example when making prototypes to demo for customers. Because the prototype is finished and then thrown away, we can clear the debt. However, be careful, there are many cases where customers ask to expand/upgrade the prototype into a product to save time. At this point, we have to pay off the debt forever. Remember one thing: Every time you code carelessly, you are adding debt to the project. Debts in life can be borrowed and repaid. If you don't pay, someone else on the team will pay. Technical debt must be paid with the programmer's time, effort, and sweat. P/S: If you're about to quit your job or change companies, feel free to code carelessly, it's okay! Another bad programmer will pay your debt for you =))). For those of you who want to learn more: Rate this: Like this: Related
Bên UK lúc này đang là mùa hè, nhưng chẳng hiểu sao cứ hay mưa hòai. Từng cơn mưa rả rích làm mình nhớ nhà, nhớ gấu, nhớ chuyện ngày xưa. Mấy hôm nay lên mạng thì nghe tin Yahoo lừng lẫy một thời nay phải bán thân với cái giả rẻ mạt là 4.5 tỷ USD (Còn rẻ hơn cả mình đi mát xa hớt tóc gội đầu). Cám cảnh thương hải tang điền, thương kiếp hồng nhan bạc phận, mình ngồi viết bài này đưa tiễn Ya Hu, kể về những kỉ niệm vui buồn, về “một thời để nhớ”. Yahoo Messenger – Người người đi chát, nhà nhà đi chát Yahoo đặt chân vào Việt Nam vào khoảng những năm 2003-2005. Thời đấy wifi, smartphone, và Internet còn chưa phổ biến như bây giờ, dân tình phải ra quán net để vào mạng. Thời đấy các quán net máy yếu, mạng chậm mà chém từ 3k-5k mỗi giờ, làm tụi nhỏ chúng tôi toàn phải nhịn ăn nhịn mặc hoặc nài nỉ xin tiền bố mẹ để “cúng” cho quán. Thuở đấy, 10 người ra quán net thì 8,9 người dùng Yahoo Messenger để chat. Chỉ cần đăng kí một cái nick, chọn một phòng chat, kiếm một cái nick dễ thương rồi gửi lời chào hỏi và bắt đầu chat. Không như Facebook, thời đấy trên mạng người ta chẳng biết mình là ai, đôi bên thoải mái trải lòng, chia sẻ đủ chuyện trên trời dưới đất. Cái cảm giác đấy, dùng facebook không bao giờ có được . Để dễ tìm được bạn chat, bạn phải có avatar đẹp cùng với một cái nickname độc, lạ. Thế là có vô số nickname hài hước sida được ra đời như: boyhn_thichchoitroi demtanhon_choinhammevo (quỳ) Yahoo cũng khá các trò giả gái, lừa tình, lừa tiền tràn ngập. Ngoài ra còn có văn hóa cứu net : các em gái ra quán net chơi không có tiền trả, lên mạng kiếm một anh đẹp giai hoặc có tiền ra trả tiền giùm. Sau khi trả tiền, hai người đi ăn uống rồi vào khách sạn đàm luận nhân sinh , chia sẻ những buồn vui trong cuộc sống, nói về những bất công trong xã hội đương thời. Dù yahoo không ai dùng nữa nhưng chẳng hiểu sao nét đẹp văn hóa này v ẫn còn tồn tại đến tận bây giờ . Gặp mặt để rồi xa, thân quen để thành lạ Yahoo Messenger nhịp cầu đưa bao trái tim cô đơn đến với nhau. Có những câu chuyện tình rất đẹp, chàng và nàng quen và yêu nhau trên Yahoo được 2 năm, hai bên thề non hẹn biển tính chuyện gặp mặt rồi làm đám cưới. Thế nhưng chính Yahoo cũng là thứ khiến họ chia xa. Một hôm nọ, chàng lỡ đăng nhập vào nick yahoo của nàng và đắng lòng phát hiện nàng cũng thả một đám thính tương tự với 4,5 chàng trai xấu số gì đấy. Câu chuyện kết thúc (không có hậu), bài học rút ra là: Đừng bao giờ để lộ nick Yahoo hay Facebook của mình cho người khác biết!!! Hồi đấy, tán gái không phải là xin số điện thoại, nick Facebook mà là xin… nick Yahoo. Kể nhỏ các bạn nghe thui, hồi xưa (lớp 10) mình chơi TSOnline, có quen một bé cũng dễ thương. Năn nỉ dụ dỗ một hồi ẻm mới cho nick Yahoo để add. Bé hay đòi mình kể chuyện tình cảm cho nghe, vừa party trong game vừa chat mà đôi khi mải chat quên cả chơi game. Tán qua tán lại được 6 tháng thì ẻm… nghỉ game, nghỉ luôn cả chat. Nghĩ lại cũng tiếc, do hồi đấy mình hiền lành chứ gặp mình bây giờ thì chắc là dụ dỗ với thịt rồi, ahihi :”>. Yahoo 360 – Chốn xô bồ thị phi Trước Camera 360, cũng từng có 1 sản phẩm khác mang tên 360 gây bao sóng gió trong cộng đồng mạng – Yahoo 360. Với Yahoo 360, mỗi người có thể tạo 1 trang blog riêng, chia sẻ tâm tư tình cảm của mình trên đấy. Ngày xưa việc đăng hình không dễ như bây giờ (Phải cắm di động vào máy, lấy hình ra, tìm chỗ up ảnh lên, dán link ảnh vào), do đó các blog này hầu như là những dòng tâm sự dài dằng dặc. Phong trào viết teen code cũng bắt đầu từ đây. Yahoo 360 còn có một bảng xếp hạng các blogger nổi tiếng dựa theo lượt xem và còm men. Vì thứ hạng và tiền quảng cáo, các bạn top bờ lốc gơ làm đủ chiêu trò câu view như: Đăng tin lá cải, tin giật gân, châm ngòi kích động cãi lộn để câu view. Hồi đấy mình rất thích lên xem các bạn hot blogger viết truyện ngắn, truyện dài, hoặc chửi nhau. Tiếc là hồi đấy mình còn nhỏ chứ viếtblog toidicodedao từ lúc ấy chắc bây giờ nổi tiếng rồi. Tiếc thương chi một chuyện tình dang dở Xét cho cùng, Yahoo đã giúp nhiều bạn trẻ Việt Nam biết đến Internet và laptop hơn. Hôm nay, nhìn biểu tượng của tuổi thơ bị bán đi với giá rẻ mạt, mình bỗng thấy khóe mắt cay cay chực khóc nhưng không thốt nên lời (sến). Thôi thì dù tài hèn sức mọn nhưng mình cũng ráng “rặn” ra vài câu thơ con cóc chia buồn. Thằng nào chê thơ mình dở mình block. Mà thôi kệ, Yahoo chết thì cũng đã chết rồi, chỉ mong em được an lành nơi chín suối. Trên đời này đâu ai biết trước chuyện gì. Có khi 10-20 năm sau Apple, Google và Facebook cũng nối đuôi nhau đi theo vết xô đẻ,.. lộn, vết xe đổ của Yahoo thì sao. Kết Giờ đây, chúng ta dùng Gmail thay cho Yahoo Mail, dùng Facebook thay cho 360 và Messenger. Tuy vậy, Yahoo vẫn là biểu tượng của tuổi thơ, gợi nhớ đến những chuyện vui buồn của một thời trẻ trâu thơ dại. B ạn đọc của toidicodedao phần nhiều là dân công nghệ thế hệ 8-9x, chắc cũng có khá nhiều kỉ niệm buồn vui với Yahoo nhỉ? Hãy cùng chia sẻ trong phần comment nhé! Rate this: Like this: Related
It's summer in the UK right now, but for some reason it always rains. Every pouring rain makes me miss home, miss bears, miss the old days. A few days ago, when I went online, I heard that the once-famous Yahoo had to sell its body for a cheap price of 4.5 billion USD (even cheaper than getting a massage and getting my hair cut and washed). Feeling sorry for the sea of ​​mourning, mourning the beauty of life and fate, I sat down to write this article to say goodbye to Ya Hu, telling about happy and sad memories, about "a time to remember". Yahoo Messenger – Everyone chats, family chats Yahoo set foot in Vietnam around 2003-2005. At that time, wifi, smartphones, and the Internet were not as popular as they are now, people had to go to internet cafes to access the internet. At that time, internet cafes had weak computers and slow networks, charging from 3k to 5k per hour, forcing us children to starve ourselves or beg our parents for money to "donate" to the shop. At that time, out of 10 people who went to internet cafes, 8.9 people used Yahoo Messenger to chat. Just register an account, choose a chat room, find a cute account, say hello and start chatting. Unlike Facebook, at that time online people didn't know who they were, both parties freely opened their hearts and shared all kinds of things in heaven and earth. That feeling can never be achieved using Facebook. To easily find chat friends, you must have a beautiful avatar with a unique, strange nickname. Thus, countless funny nicknames Sida were born, such as: boyhn_thichchoitroi demtanhon_choinhammevo (kneel) Yahoo is also quite popular with fake girls, love scams, and money scams. There is also a culture of saving the net: girls go to internet cafes to play without money, go online to find a handsome guy or have money to pay for them. After paying, the two went out to eat and drink, then went to the hotel to discuss life, share the joys and sorrows of life, and talk about injustices in contemporary society. Even though no one uses Yahoo anymore, I don't understand why this cultural beauty still exists until now. Meet each other and then be far apart, get acquainted and become strangers. Yahoo Messenger is a bridge that brings many lonely hearts together. There are very beautiful love stories, a guy and a girl met and loved each other on Yahoo for 2 years, both sides swore to each other to plan to meet and get married. But Yahoo is also the thing that separates them. One day, he accidentally logged into her Yahoo account and was heartbroken to discover that she had also flirted with a similar group of 4 or 5 unfortunate boys. The story ends (unfortunately), the lesson learned is: Never reveal your Yahoo or Facebook account to others!!! Back then, flirting with girls didn't mean asking for phone numbers or Facebook accounts, but asking for... Yahoo accounts. Tell me a little story, when I was in 10th grade, I played TSOnline and met a cute girl. After begging and coaxing her for a while, she gave me a Yahoo account to add her. She often asks me to tell her love stories, partying in the game while chatting, but sometimes I'm so busy chatting that I forget to play the game. After flirting back and forth for 6 months, she... quit the game, quit chatting. Thinking back, it's a pity, because back then I was gentle, but when I see myself now, I'm sure he was seduced with meat, ahihi :”>. Yahoo 360 - A bustling and bustling place Before Camera 360, there was also another product called 360 that caused a lot of turmoil in the online community - Yahoo 360. With Yahoo 360, each person can create their own blog and share. My thoughts and feelings are up there. In the past, posting photos was not as easy as it is now (You had to plug in your phone, take out the photo, find a place to upload the photo, paste the photo link), so these blogs were almost endless confessions. The movement to write teen code also started here. Yahoo 360 also has a ranking of famous bloggers based on views and comments. Because of rankings and advertising money, top traffickers do all kinds of tricks to attract views such as: Posting tabloid news, sensational news, inciting quarrels to attract views. Back then, I really liked going to watch hot bloggers write short stories, long stories, or curse at each other. It's a pity that I was still young at that time, but blogging toidicodedao since then is probably famous now. What a pity for an unfinished love story. After all, Yahoo has helped many young Vietnamese people know about the Internet and laptops. Today, looking at the symbol of my childhood being sold at a cheap price, I suddenly felt tears in the corners of my eyes and wanted to cry but I couldn't say anything (cheesy). Well, even though I have little talent, I still tried my best to "squeeze" out a few toad poems to express my condolences. Anyone who criticizes my poetry will be blocked. But never mind, Yahoo is already dead, I just hope you are at peace in the nine streams. In this world, no one knows what will happen. Maybe 10-20 years later, Apple, Google and Facebook will follow each other in the footsteps of Yahoo. Conclusion Now, we use Gmail instead of Yahoo Mail, Facebook instead of 360 and Messenger. However, Yahoo is still a symbol of childhood, reminiscent of the happy and sad stories of childhood. Toidicodedao's readers are mostly technology people of the 8-9x generation. They probably have a lot of happy and sad memories with Yahoo, right? Let's share in the comments section! Rate this: Like this: Related
Cách đây vài tháng, mình có viết 1 bài để chửi thực trạng học lập trình của các thanh niên hiện nay. Ngoại trừ một số câu hỏi bài tập, hoặc vấn đề công nghệ, phần nhiều các câu hỏi là “gặp lỗi không biết sửa”. Qua đó, có thể thấy các bạn sinh viên năm 2 năm 3 hoặc mới ra trường vẫn còn thiếu kĩ năng debug. Thôi, các cụ có câu là “vừa đấm vừa xoa”, chửi sướng mồm rồi thì bây giờ viết một bài chia sẻ những kinh nghiệm để debug và đặt câu hỏi hiệu quả hơn đây. Mỗi khi thấy ai hỏi bài, nhờ sửa lỗi các bạn cứ share bài viết này để giúp ích cho người ta nhé. Trời đã sinh dev sao còn sinh bug? Người ta thường bảo là developer và QA (tester) là kẻ thù không đội trời chung, một bên ráng giấu bug còn một bên ráng chạy chương trình để moi bug. Tuy nhiên, sự thật không phải vậy. Cả dev và QA đều có kẻ thù chung là bug. Thế mới có câu chuyện rằng: Một chàng developer gặp phải con bug rất khôn, lúc ẩn lúc hiện. Chàng phải OT hết cả tuần lễ để tìm bug, không có thời gian dắt gấu đi chơi nên gấu bỏ đi theo người khác. Uất hận, chàng ngửa mặt lên trời than “Trời đã sinh dev sao còn sinh bug”, sau đó hộc máu mà chết. Thuở mới học lập trình , ta thường nghĩ rằng code là chuyện khó, sửa lỗi là chuyện dễ. Bắt đầu lập trình mới biết là thời gian debug đôi khi còn nhiều hơn thời gian viết code . Thế nhưng, trường đại học lại chỉ hướng dẫn học sinh viết code chứ không bao giờ cách debug. Điều này dẫn tới việc nhiều bạn gặp lỗi nhưng không biết cách tìm lỗi, không biết cách sửa. Ở phần dưới, mình sẽ chia sẻ những bí kíp tìm lỗi từ sơ cấp đến cao cấp, cùng những điều cần lưu ý để đặt câu hỏi hiệu quả. Quyển thứ nhất (sơ cấp) – Lỗi cú pháp Đây là các lỗi hay gặp khi mới học lập trình, viết sai cú pháp nên chương trình không build được: thiếu mở đóng ngoặc, nhầm dấu bằng, thiếu chấm phẩy. Cách giải quyết: dùng IDE xịn (Visual Studio, Eclipse, Atom). Các IDE này đều hỗ trợ nhắc lỗi cú pháp (Chỉ cần các bạn chịu khó đọc error message bằng tiếng Anh là được). Các lỗi này chỉ cần code nhiều là quen, hầu như đi làm sẽ hết bị. Bạn có thể tập một số thói quen như: Khi mở ngoặc nhớ đóng ngoặc, cuối câu lệnh phải thêm chấm phẩy. Quyển thứ hai (trung cấp) – Exception Sau khi sửa các lỗi cú pháp, chương trình đã build được, nhưng khi chạy lại crash hoặc quăng Exception. Exception hay gặp nhất là NullPointerException , khi bạn muốn truy cập vào một biến có giá trị null. Các lỗi này cũng không quá khó xử lý. Chỉ cần đọc tên Exception + message kèm theo là bạn có thể hiểu được nguyên nhân gây lỗi. Tiếp theo, hãy copy tên Exception và message vào Google , câu trả lời thường sẽ có ở một vài link đầu tiên. Quyển thứ ba (cao cấp) – Lỗi framework và logic Đây thường là những lỗi phức tạp, chương trình chạy sai mà không báo lỗi hay quăng Exception gì. Ví dụ, lỗi mà bạn nào cũng gặp khi mới học là viết = thay cho == , chương trình chạy sai mà không rõ lỗi là gì. Các lỗi này thường khó sửa vì bạn không biết nguyên nhân gây lỗi nên không biết sửa. Với những lỗi dạng này, trước tiên bạn cần xác định: Nếu chưa biết debug hãy in ra toàn bộ các giá trị và kiểm xem có giá trị nào sai hay không? Khi đã quen, bạn chỉ cần đặt breakpoint, cho chương trình chạy từng dòng lệnh và kiểm tra giá trị của từng biến. Sau khi làm rõ những điều nói trên, nhiều khả năng bạn đã tìm được câu trả lời cho mình. Nếu không tìm được hàm gây lỗi, lục tung Google nhưng không tìm ra nguyên nhân hay cách sửa, bạn sẽ phải dùng đến cách cuối cùng: Vác đi hỏi. Trong các hệ thống lớn và phức tạp, việc debug và tìm lỗi trở nên khó hơn rất nhiều. Mình sẽ có 1 bài viết chuyên sâu hơn về chuyện này. Tàn quyển – Làm sao đặt câu hỏi một cách hiệu quả? Đầu tiên, hãy đặt mình vào vị trí người được hỏi, liệu họ đọc câu hỏi có hiểu gì không . Nhiều bạn cứ hỏi chung chung kiểu: Code không chạy được!! Thánh cũng chả hiểu code của bạn tại sao lại không chạy được. Làm rõ điều cần hỏi là bạn đã trả lời được 50% câu hỏi rồi. Khi bạn vác một câu hỏi lên stackoverflow , bạn thường được yêu cầu là: Tạo 1 fiddle cho câu hỏi, hoặc chỉ post đoạn code gây lỗi lên. Hãy tập thói quen này trước khi đi hỏi: Xác định đoạn code gây bug, tách riêng nó ra, cố gắng tái tạo lại bug. Việc xác định được đoạn code gây bug là đã giải quyết 50% vấn đề rồi, có khi xác định xong là bạn sửa được bug luôn, chẳng cần phải đi hỏi nữa. Hãy nhớ một điều, luôn luôn google và tìm hiểu trước khi đặt câu hỏi. Người được hỏi thường rất sẵn lòng giúp đỡ, nhưng họ sẽ rất bực mình nếu bạn hỏi những câu đơn giản mà chỉ cần 30s google là ra. Việc không chịu tìm hiểu, google trước khi hỏi chứng tỏ bạn lười và không tôn trọng thời gian của người được hỏi. Lời kết Kĩ năng debug cũng như kĩ năng code đều cần có thời gian rèn luyện mới có thể thành thục . Do đó, đừng buồn hay nản lòng khi bạn tốn quá nhiều thời gian để fix lỗi. Qua một thời gian bạn sẽ quen dần và nhanh hơn thôi. Nhớ nhé, phải thường xuyên luyện tập code và tự debug thì mới nâng cao được khả năng code lẫn kĩ năng debug nhé. Đã nói ở phần trên rồi, nhưng mình vẫn nhắc lại thêm lần nữa. Thay vì cứ gặp khó khăn là vác đi hỏi lung tung, nhớ Google 7 lần trước khi hỏi . Về lâu dài, việc này sẽ nâng cao khả năng tìm lỗi và debug của bạn đấy. Đừng để tới lúc đi làm, cứ bí là phải lên Facebook hỏi hoặc quay sang hỏi đồng nghiệp nhé =))). Một số resource nên tham khảo: Sách Debug It! Find, Repair and Prevent Bugs in Your Code Rate this: Like this: Related
A few months ago, I wrote an article to criticize the current situation of learning programming among young people. Except for some exercise questions or technology issues, most of the questions are "errors that cannot be fixed". Through this, it can be seen that 2nd, 3rd year students or new graduates still lack debugging skills. Well, as the old saying goes, "you punch and rub at the same time" and curse happily, now write an article to share your experiences on debugging and asking questions more effectively. Whenever you see someone asking questions or asking for corrections, please share this article to help others. God gave birth to developers, so why still give birth to bugs? People often say that developers and QA (testers) are sworn enemies, one side tries to hide bugs and the other side tries to run programs to find bugs. However, the truth is not so. Both dev and QA have a common enemy: bugs. That's why there is a story: A developer encountered a very clever bug, sometimes hidden and sometimes visible. He had to OT for a whole week to find bugs. He didn't have time to take the bear out, so the bear ran away with someone else. Frustrated, he raised his face to the sky and lamented, "If God gave birth to a dev, why would he give birth to a bug?" then he vomited blood and died. When we first learn programming, we often think that coding is difficult and fixing errors is easy. When I first started programming, I realized that the time spent debugging is sometimes more than the time spent writing code. However, the university only teaches students how to write code and never how to debug. This leads to many people encountering errors but not knowing how to find the errors or how to fix them. Below, I will share tips for finding errors from beginner to advanced, along with things to keep in mind to ask effective questions. The first book (beginner) - Syntax errors These are common errors when learning to program, writing incorrect syntax so the program cannot be built: missing opening and closing parentheses, wrong equal sign, missing semicolon. Solution: use a good IDE (Visual Studio, Eclipse, Atom). These IDEs all support syntax error prompts (You just need to take the trouble to read the error message in English). You just need to code a lot to get used to these errors, and most of them will go away at work. You can practice some habits such as: When opening parentheses, remember to close parentheses, and add a semicolon at the end of the statement. The second book (intermediate) – Exception After fixing the syntax errors, the program was built, but when running again it crashed or threw an Exception. The most common exception is NullPointerException , when you want to access a variable with null value. These errors are not too difficult to handle. Just read the Exception name + accompanying message and you can understand the cause of the error. Next, copy the Exception name and message into Google, the answer will usually be in the first few links. Book three (advanced) – Framework and logic errors These are often complex errors, the program runs incorrectly without reporting an error or throwing an exception. For example, the mistake that everyone encounters when first learning is writing = instead of == , the program runs incorrectly without knowing what the error is. These errors are often difficult to fix because you don't know the cause of the error so you don't know how to fix it. With errors of this type, you first need to determine: If you don't know how to debug, print out all the values ​​and check to see if any values ​​are wrong or not? Once you get used to it, you just need to set a breakpoint, let the program run each command line and check the value of each variable. After clarifying the above, you most likely have found your answer. If you can't find the function causing the error, search Google but can't find the cause or how to fix it, you'll have to use the last resort: Go ask. In large and complex systems, debugging and finding errors becomes much more difficult. I will have a more in-depth article about this. Aspiration – How to ask questions effectively? First, put yourself in the position of the person being asked, do they understand anything when reading the question? Many people keep asking general questions like: The code doesn't work!! I also don't understand why your code doesn't work. By clarifying what you need to ask, you have already answered 50% of the question. When you post a question on stackoverflow, you are often asked to: Create a fiddle for the question, or just post the code that causes the error. Get into this habit before asking questions: Identify the code causing the bug, isolate it, and try to reproduce the bug. Identifying the code causing the bug is already solving 50% of the problem. Sometimes after identifying it, you can fix the bug right away, no need to ask anymore. Remember one thing, always google and research before asking questions. The person in question is usually very willing to help, but they will get very annoyed if you ask simple questions that only take 30 seconds to google. Refusing to research or google before asking shows that you are lazy and do not respect the questioner's time. Conclusion: Debugging skills as well as coding skills take time to master. Therefore, don't be sad or discouraged when you spend too much time fixing errors. Over time you will get used to it and get faster. Remember, you must regularly practice coding and debugging to improve your coding and debugging skills. It's been said above, but I'll say it again. Instead of asking around every time you encounter difficulties, remember to Google 7 times before asking. In the long run, this will improve your ability to find errors and debug. Don't wait until you get to work and feel stuck going to Facebook to ask or turn to your colleagues =))). Some resources to refer to: Book Debug It! Find, Repair and Prevent Bugs in Your Code Rate this: Like this: Related
Cách đây vài hôm, Microsoft vừa khiến cộng đồng Open Source dậy sóng bằng việc ra mắt .NET Core 1.0 và ASP.NET Core 1.0. Giờ đây, .NET không chỉ chạy trên mỗi Windows mà còn chạy được trên Linux và MacOS. Đây là một nước cờ khá cao tay của Microsoft. Hãy cùng xem anh em developer chúng ta được lợi ích gì trong vụ này nhé. .NET Framework của ngày hôm qua Ngày xửa ngày xưa, khi nhắc tới C# , người ta nghĩ ngay tới .NET Framework của Microsoft. C# hay bị người đời ném đá bởi vì nó đi kèm với .NET Framework chỉ hoạt động trên Windows. Ngoài ra, để viết ứng dụng C#, lập trình viên còn phải làm việc với 2 thằng vừa nặng vừa mắc tiền là Visual Studio và Microsoft SQL Server. Hai thằng này cũng … chỉ hoạt động trên Windows nốt. Trước đây, để chạy C# trên các hệ điều hành khác, ta có thể sử dụng Mono . Tuy nhiên, đây không phải là 1 dự án chính thức của Microsoft. Developer vẫn không có IDE C# nào ngon lành, cũng chẳng có SQL Server nào đi kèm. Sử dụng C#.NET đồng nghĩa với việc phải dùng toàn bộ hệ sinh thái (tốn tiền) của Microsoft!! Vì lẽ đó, C# tiếp tục trùm chăm đắp chiếu trên Windows, chịu sự ghẻ lạnh của người đời (người đời ở đây là cộng đồng developer dùng Linux, MacOS). .NET Framework ngày hôm nay Thế rồi Microsoft bắt đầu mở cửa dần dần. Thay vì đóng im ỉm như trước, Microsoft bắt đầu open source .NET Framework, ASP.NET MVC, Entity Framework để thu hút cộng đồng lập trình viên Open Source. .NET Core đã bắt đầu ra những bản beta từ năm ngoái, và bản 1.0 vừa được chính thức ra mắt cách đây vài hôm. Giờ đây, việc lập trình C# trở nên nhẹ nhàng rất nhiều. Ta chỉ cần cài đặt .NET Core (nhẹ), Visual Studio Code (cũng nhẹ). Tất cả đều free nhé. Trong thời gian sắp tới thì Microsoft sẽ đưa SQL Server 2016 lên Linux luôn. Lý do Microsoft đưa .NET lên Linux Lý do rất đơn giản: Vì Microsoft muốn cho các developer có thêm nhiều lựa chọn, góp phần phát triển ngành phần mềm . Đùa đấy, bọn tư bản giãy chết làm gì tốt bụng như thế được! Đây là chiêu thả con săn sắt bắt con cá khô của Microsoft. Nền tảng đám mây Azure của Microsoft cho phép tạo các máy ảo Red Hat Linux . Việc Red Hat Linux chạy được .NET sẽ giúp Microsoft tăng doanh số Azure Cloud. Ngoài ra, do rào cản về tiền bạc đã biến mất, Microsoft cũng thu hút được kha khá lập trình viên sử dụng công nghệ của họ. .NET Core đi kèm những “đồ chơi” gì? Bộ cài .NET Runtime: cho phép viết code, build và chạy ứng dụng .NET trên Windows, Linux, Mac .NET Cli: Thay vì phải sử dụng Visual Studio để mở project, build và bấm run, nay ta có thể dùng command line và gõ dotnet build , dotnet run . Vừa ngầu vừa nhanh gọn. Việc build và run bằng command line cũng giúp tích hợp CI và deploy dự án dễ dàng hơn nhiều. IDE: Visual Studio rất nhiều tính năng nhưng chạy chậm và khá tốn RAM. Giờ đây ta có Visual Studio Code : nhanh, gọn, nhẹ, tích hợp git và chạy được trên mọi hệ điều hành. Bạn nào quen dùng hàng của JetBrain (ReSharper, WebStorm) có thể chờ và dùng Project Rider của họ Database: Trước nay dùng .NET là phải dùng kèm với Microsoft SQL Server. Giờ chuyển qua Linux thì dùng Database gì?? Đừng lo, Microsoft cũng sẽ đưa bản SQL Server 2016 của họ lên Red Hat Linux luôn. Ơ thế có ảnh hưởng gì tới cuộc sống của mình không? Dĩ nhiên là.. có chứ! Trước đây, nếu muốn deploy một trang web C#, bạn phải tự mua host, mua Azure cloud hoặc up lên somee. Rất phiền toái. Giờ đây, bạn có thể thoải mái deploy lên heroku, openshift và các host Linux khác. Bạn cũng có thể code và chạy C# trực tiếp trên Cloud9 luôn. Tuyệt quá phải không nào! (À, WebForm thì .NET Core chưa hỗ trợ đâu nhé, ahihi). Kết luận Nước đi này của Microsoft được cộng đồng các developer hoan nghênh nhiệt liệt. Cộng đồng developer có thêm lựa chọn công nghệ để sử dụng. Microsoft thì lôi kéo được một đống developer sử dụng phần mềm của họ. Bản thân C# vốn đã là một ngôn ngữ khá mạnh mẽ. Với sự ra đời của .NET Core, C# đã có thể chạy trên mọi hệ điều hành. Giờ đây, bạn có thể dùng C# để viết web, viết ứng dụng di động (với Xamarin), chạy được trên nhiều nền tảng khác nhau. Còn chờ gì nữa nào? Cùng vào dot.net để tải .NET Core 1.0 về máy và nghịch nào. Bản này nhẹ lắm, không nặng như .NET Framework đâu. Dành cho các bạn muốn tìm hiểu thêm: Rate this: Like this: Related
A few days ago, Microsoft just made the Open Source community stir by launching .NET Core 1.0 and ASP.NET Core 1.0. Now, .NET runs not only on Windows but also on Linux and MacOS. This is a pretty high-stakes move by Microsoft. Let's see what benefits we developers get in this case. Yesterday's .NET Framework Once upon a time, when mentioning C#, people immediately thought of Microsoft's .NET Framework. C# is often criticized by people because it comes with the .NET Framework that only works on Windows. In addition, to write C# applications, programmers also have to work with two heavy and expensive guys: Visual Studio and Microsoft SQL Server. These two guys also... only work on Windows. Previously, to run C# on other operating systems, we could use Mono. However, this is not an official project of Microsoft. Developers still don't have any good C# IDEs, nor do they have any SQL Server included. Using C#.NET means having to use the entire (expensive) Microsoft ecosystem!! For that reason, C# continues to dominate Windows, suffering the estrangement of people (people here are the developer community using Linux and MacOS). .NET Framework today Then Microsoft started to gradually open up. Instead of staying silent like before, Microsoft started open source .NET Framework, ASP.NET MVC, Entity Framework to attract the Open Source programmer community. .NET Core started releasing beta versions last year, and version 1.0 was officially released a few days ago. Now, C# programming has become much easier. We only need to install .NET Core (lightweight), Visual Studio Code (also lightweight). All are free. In the near future, Microsoft will bring SQL Server 2016 to Linux. The reason why Microsoft brought .NET to Linux is very simple: Because Microsoft wants to give developers more options, contributing to the development of the software industry. Just kidding, capitalists can't be so kind when they die! This is Microsoft's trick of letting iron hunters catch dried fish. Microsoft's Azure cloud platform allows the creation of Red Hat Linux virtual machines. The fact that Red Hat Linux can run .NET will help Microsoft increase Azure Cloud sales. In addition, because the financial barrier has disappeared, Microsoft has also attracted quite a few programmers to use their technology. What “toys” does .NET Core come with? .NET Runtime installer: allows writing code, building and running .NET applications on Windows, Linux, Mac .NET Cli: Instead of having to use Visual Studio to open the project, build and click run, we can now use the command line and type dotnet build , dotnet run . Both cool and quick. Building and running using the command line also makes integrating CI and deploying the project much easier. IDE: Visual Studio has many features but runs slowly and consumes a lot of RAM. Now we have Visual Studio Code: fast, compact, lightweight, integrates git and runs on all operating systems. Those who are familiar with JetBrain's products (ReSharper, WebStorm) can wait and use their Project Rider Database: Previously, when using .NET, it had to be used with Microsoft SQL Server. Now when switching to Linux, what database should I use? Don't worry, Microsoft will also bring their SQL Server 2016 to Red Hat Linux. Does that have any impact on my life? Of course.. yes! Previously, if you wanted to deploy a C# website, you had to buy hosting yourself, buy Azure cloud or upgrade to somee. Very annoying. Now, you can freely deploy to heroku, openshift and other Linux hosts. You can also code and run C# directly on Cloud9. Isn't it great? (Ah, WebForm is not supported by .NET Core yet, ahihi). Conclusion This move by Microsoft was warmly welcomed by the developer community. The developer community has more technology options to use. Microsoft has attracted a bunch of developers to use their software. C# itself is already quite a powerful language. With the advent of .NET Core, C# can run on any operating system. Now, you can use C# to write web pages, write mobile applications (with Xamarin), and run on many different platforms. What are you waiting for? Let's go to dot.net to download .NET Core 1.0 to your computer and play with it. This version is very light, not as heavy as .NET Framework. For those of you who want to learn more: Rate this: Like this: Related
Tư duy thành công Hôm nay, chúng ta sẽ gác chuyện lập trình và nghề nghiệp một bên để bàn về một chuyện quan trọng hơn: Tư duy dẫn đến thành công. Tại sao tư duy lại quan trọng? Nếu không có tư duy thành công, dù có code giỏi , soft-skill giỏi tới mấy bạn cũng không thành công được. Hãy nghe một bạn trẻ chia sẻ về tư duy thành công. À, phía trên là mình đùa thôi, các bạn đừng tin kẻo tiền mất tật mang nhé. Hôm nay, mình chia sẻ một tư duy thành công mà mình tâm đắc. Hãy ngưng đổ lỗi khi thất bại! Thuở cấp 3, khi học môn Lịch Sử, chúng ta thường nghe phân tích về nguyên nhân khách quan và chủ quan. Phần lớn khi gặp thất bại, các bạn đều đổ lỗi những yếu tố khách quan bên ngoài, những điều nằm ngoài khả năng của bạn . Khi xin việc mà không được nhận, ta thường đổ cho nguyên nhân khách quan là trường dạy không đủ, công ty phỏng vấn ngu. Khi tán gái mà không đổ, ta thường đổ cho nguyên nhân khách quan là con gái hám tiền, chỉ thích trai hư, do cha mẹ sinh ta không đẹp trai. Điều này… sai bét ! Nếu chỉ biết đổ lỗi, bạn sẽ mãi thất bại và thất bại mà thôi. Thế không đổ lỗi thì làm gì? Hãy nghĩ tới những nguyên nhân chủ quan do chính bản thân chúng ta! Xin việc mà không được nhận là do ta chuẩn bị kiến thức không tốt, chọn không đúng công ty. Tán gái thất bại là do ta… ở dơ, tẻ nhạt, không biết cách ăn nói, không biết cách tán tỉnh. Với nguyên nhân khách quan, ta không thể làm gì được! Nhưng với nguyên nhân chủ quan, ta luôn có thể thay đổi chính mình để thành công. Thay vì đổ lỗi cho thế giới , hãy tự nhận lỗi và tìm cách hoàn thiện mình hơn . Lấy ví dụ: Nếu vấn đề là ở gái, ta bó tay vô phương cứu chữa. Nếu vấn đề là ở ta, ta có thể tập ăn mặt sạch sẽ, nói chuyện thú vị, tập hiểu tâm lý phụ nữ (đọc Alpha Art và The Game nhé). Cuộc sống này đã có quá nhiều người đổ lỗi cho cha mẹ, cho chế độ, cho hệ thống giáo dục lắm rồi. Để thành công, hãy khác biệt, đừng làm như họ! Những gì nằm trong khả năng của bạn, hãy dành hết sức để làm nó Hãy nhìn vào H. H tán một bạn nữ tên M gần nửa năm mà không đổ. Ban đầu, H nghĩ rằng bạn nữ kia chỉ thích trai nhà giàu sáu múi. Cái này thì H bó tay, không thể làm gì được. Sau đó, H thay đổi bản thân. H học cách tán gái, ăn mặc sạch sẽ, trau chuốt bề ngoài hơn. H dần dần nắm bắt được tâm lý phụ nữ, trở thành con người thú vị hơn. Dần dần, bạn nữ kia bắt đầu để ý lại H. Lúc này, H đã thành hotboy, thành nông dân chăn rau thứ thiệt. Dòng đời xô đẩy, H mắc phải căn bệnh HIV… Bài học rút ra ở đây là gì? Đừng chăn rau để rồi nhiễm HIV? Dĩ nhiên là không phải! Bài học rút ra là: Để thành công, hãy dồn hết sức làm những việc trong khả năng của mình . Đôi lời cuối cùng Đây là câu chuyện của chính mình: Ngày xưa khi mình mới viết blog , mỗi ngày chỉ được lèo tèo 10-20 view . Ban đầu mình chỉ biết đổ lỗi cho các yếu tố khách quan: Blog mới thành lập nên ít người biết Giới trẻ Việt Nam chỉ khoái tin lá cải chứ không đọc blog. Sinh viên Việt Nam lười suy nghĩ nên đọc blog technical không hiểu. Mình có thể thay đổi được những điều này không? Dĩ nhiên là không!! Làm sao mình thay đổi được việc blog còn non trẻ, làm sao mình thay đổi được giới trẻ Việt Nam? Rồi mình làm thế nào? Mình xác định những việc trong tầm tay mà mình có thể làm: Blog ít người biết vì không được quảng bá. Chịu khó quảng bá (Thông qua facebook, fanpage ) thì blog sẽ được nhiều người biết tới. Để thu hút bạn đọc trẻ, hãy trau chuốt cho nội dung bài viết. Bài viết hay, bổ ích, hài hước thì sẽ có nhiều người xem. Sinh Việt Nam đọc blog technical không hiểu. Vậy thì sử dụng phong cách kiếm hiệp , dùng ví dụ trực quan để giải thích cho họ hiểu. Kết quả ra sao? Blog dần dần cán mốc 1k view , 100k views và 500k view như các bạn thấy đấy. Nếu mình vẫn tiếp tục giữ suy nghĩ rằng “chẳng thể làm gì được”, có lẽ bây giờ Tôi đi code dạo vẫn còn là một blog nho nhỏ xinh xinh thôi. Những điều mình chia sẻ chỉ có vậy. Hãy thử áp dụng chúng xem, biết đâu bạn sẽ thấy thành công tự tìm đến với bạn. Rate this: Like this: Related
Successful mindset Today, we will put programming and career aside to talk about something more important: The mindset that leads to success. Why is thinking important? If you don't have a successful mindset, no matter how good you are at coding and soft-skills, you won't be successful. Listen to a young person share about successful thinking. Oh, I'm just joking above, don't believe it or you'll lose your money. Today, I share a success mindset that I like. Stop blaming when you fail! In high school, when studying History, we often hear analysis of objective and subjective causes. Most of the time when you encounter failure, you blame external objective factors, things beyond your ability. When applying for a job and not being accepted, we often blame objective reasons such as the school not teaching enough or the company's stupid interview. When we flirt with girls and don't fall for them, we often blame the objective reasons: girls are money-hungry, only like bad boys, or because their parents gave birth to them because they weren't handsome. This... is wrong! If you only know how to blame, you will always fail and fail. So why not blame? Think about the subjective reasons that come from ourselves! Applying for a job but not getting accepted is because we did not prepare well and did not choose the right company. Failure to flirt with girls is because we are... dirty, boring, don't know how to talk, don't know how to flirt. With objective reasons, we cannot do anything! But with subjective reasons, we can always change ourselves to succeed. Instead of blaming the world, admit your mistakes and find ways to improve yourself. For example: If the problem is with the girl, we are helpless and there is no way to fix it. If the problem is us, we can practice dressing cleanly, having interesting conversations, and learning to understand women's psychology (read Alpha Art and The Game). In this life, too many people blame their parents, the regime, and the education system. To be successful, be different, don't do like them! Whatever is within your ability, put all your effort into doing it. Look at H. H has been flirting with a girl named M for almost half a year without falling for him. At first, H thought that the other girl only liked rich guys with six packs. H is at a loss for this, there's nothing he can do about it. After that, H changed himself. H learned how to flirt with girls, dress cleanly, and improve his appearance. H gradually grasps women's psychology, becoming a more interesting person. Gradually, the other girl began to pay attention to H. At this time, H had become a hotboy, a real vegetable farmer. Life got in the way, H contracted HIV... What is the lesson learned here? Don't grow vegetables and get infected with HIV? Of course not! The lesson learned is: To be successful, put all your effort into doing things within your ability. A few final words This is my own story: In the past, when I first started blogging, I could only get 10-20 views per day. At first, I could only blame objective factors: The blog has just been established so few people know about it Vietnamese youth only like tabloid news and do not read blogs. Vietnamese students are too lazy to think, so they read technical blogs without understanding. Can I change these things? Of course not!! How can I change the fact that blogging is still young, how can I change Vietnamese youth? Then what do I do? I identify things within my reach that I can do: The blog is not known to many people because it is not promoted. If you work hard to promote it (through facebook, fanpage), the blog will become known to many people. To attract young readers, refine your article content. If the article is good, useful, and humorous, many people will see it. Vietnamese students read technical blogs but don't understand. Then use swordplay style, use visual examples to explain to them. What were the results? The blog gradually reached 1k views, 100k views and 500k views as you can see. If I continue to keep thinking that "nothing can be done", maybe now I go coding and still be a pretty little blog. What I share is just that. Try applying them, maybe you will see success come to you. Rate this: Like this: Related
Bản thân mình là một con người hiền lành nhân hậu, hay khóc thầm, yêu màu hồng, ghét sự giả dối. Vốn hiền lành nên mình không ném gạch ai bao giờ, cũng không bị ăn gạch bao giờ. Tuy nhiên, từ sau khi viết blog thì mình dính rất nhiều gạch từ đủ mọi thành phần. Lắm lần mình cảm thấy tâm hồn bé bỏng bị tổn thương đến mức muốn đóng cửa luôn blog cho đẹp trời. Tuy nhiên, mỗi lần định đóng cửa blog, mình lại nghĩ tới sự háo hức của các bạn đọc khi có bài viết mới mỗi thứ 3,5 nên không nỡ đóng. Ngẫm lại, chắc đa phần các bạn đọc cũng từng có lần bị ném đá ngoài đời hoặc mạng xã hội. Do đó mình viết bài này để chia sẻ kinh nghiệm chống lại “gạch đá”, hi vọng chúng có ích cho các bạn. Tại sao bạn ăn gạch Theo tâm lý học, động cơ mà con người đi “gạch đá” người khác là thể hiện trình độ, thể hiện quyền lực , làm mình cảm thấy ngầu hơn hơn, sướng hơn. Khoa học cũng chứng minh là những người hay ném gạch đá thường bị đánh nhiều gấp 4 lần những người bình thường. Đoạn trên là mình đùa đấy, các bạn đừng tin. Mạng Internet là chốn thị phi, ai ai cũng có thể làm “anh hùng bàn phím”, thoải mái ném gạch mà không bị gì. Những bài viết mình nhận được nhiều gạch đá nhất trong quá trong quá trình viết blog là: Mặt tối của ngành công nghiệp IT C# là ngôn ngữ tuyệt với nhất Thực trạng học lập trình của sinh viên Sự thật đắng lòng – Đôi khi code là cách ngu nhất giải quyết vấn đề Các comment gạch đá bao gồm đủ mọi thành phần như sau: Lẽ dĩ nhiên, khi post một bài viết mang tính chất tranh luận, mình luôn ủng hộ các góc nhìn khác nhau, các ý kiến trái chiều. Tuy nhiên, có vẻ người Việt Nam mình chưa biết cách tranh luận cho lắm, mà chủ yếu mang tính trù dập là chính =)). Bạn có thể chia những người ném gạch ra làm các thành phần sau: Thể loại auto chửi/auto chê : Không thèm quan tâm bạn phát biểu thế nào, chỉ cần thấy không hợp ý là auto chửi, hoặc auto chê kiểu: Bài viết nhảm nhí, tác giả ngu, bài viết xàm lông. Đọc comment của thể loại này chỉ tổ bực mình + không có lợi ích gì nên cứ bơ và xóa comment là tốt nhất. Thể loại “thích thể hiện” : Mục đích của thể loại này khi ném gạch là để hạ bệ bạn, đồng thời nâng bản thân mình lên. Comment họ viết thường dài nhằm thể hiện trình độ, đồng thời kèm thông tin công kích hạ bệ bạn. Cá nhân mình không ưa loại này, nhưng đôi khi bạn có thể học được nhiều điều để cải thiện từ những góp ý dài lê thê của họ. Thể loại góp ý chân thành : Đây là thể loại bạn bè mà ai cũng thích và muốn có nhiều. Tuy nhiên thành phần này hơi ít, đa phần dân VN mình ở thể loại 2 nhiều hơn (mình cũng thể loại 2). Hãy trân trọng những bạn bè/độc giả kiểu này, họ sẽ giúp bạn tốt hơn. Trước đây, mình có khuyên một số bạn nên viết blog để tăng kiến thức và khả năng diễn đạt. Bây giờ, mình phát hiện thêm 1 lợi ích nữa: viết blog còn luyện cho bạn da mặt dày và khả năng giữ bình tĩnh nữa, rất có ích cho công việc sau này đấy. Học được gì từ “gạch đá” Tất nhiên, không phải ai gạch đá bạn cũng đều có ý xấu. Bạn hãy cứ cho rằng họ có ý tốt, muốn góp ý cho bạn tốt lên nhưng do không biết cách nói nên nó mới trở thành gạch đá đấy. Vì lẽ đó, mình rất cảm động khi có rất nhiều người chịu bỏ thời gian ra viết thật dài để chỉ ra lỗi sai cho mình. Ông bà ta có câu nước đục lóng phèn xài đỡ , khi ăn gạch đá của người đời, bạn nên lọc ra những góp ý có ích từ những lời phê phán của họ. Đôi khi mấy cục gạch đá này còn có ích, giúp mình phát triển hơn những lời khen nhiều. Cứ cảm ơn và tiếp nhận góp ý là xong nhé, không ai tranh cãi với bạn nữa đâu. Nhờ ăn nhiều gặp đá, mình rút được kinh nghiệm khi làm việc với người khác. Để góp ý không mang tính xúc phạm và cá nhân, hãy góp ý vào công việc chứ đừng công kích người làm: vd như nói code chỗ này hơi rối , khó hiểu chứ đừng nói mày code bối rối vl . Bạn cũng đừng nên đưa ra mệnh lệnh mà hãy góp ý, thay vì bảo mày phải tách hàm này ra , viết thêm class, dùng design pattern này nọ, hãy bảo: này, mình nghĩ chỗ này nếu tách hàm ra class khác, dùng singleton thì code đỡ rối , sau này dễ tái sử dụng nè”. Kết – Làm sao phải xoắn Một điều rất hay mình đọc được trong sách Đắc Nhân Tâm về “cách luôn chiến thắng trong mọi cuộc tranh luận” là: Đừng tranh cãi gì cả, nó sai nó ngu thì cứ để đời dạy nó, mình không cần dạy. Ngoài ra, trong thời đại Facebook này, ăn gạch dễ nhưng cũng né gạch cũng rất dễ. Tại sao lại phải quá bận tâm về một đứa nào đó khi bạn có thể làm cho nó biến mất hoàn toàn khỏi cuộc đời mình chỉ bằng một click chuột nhỉ? Cứ thoải mái tiếp nhận góp ý từ người tốt và block những đứa làm bạn ngứa mắt nhé. Về phần các bạn thì sao? Các bạn thường xử xự như thế nào khi bị gạch đá? Hãy cùng chia sẻ trong phần comment nhé. Rate this: Like this: Related
I am a gentle and kind person, often cry silently, love the color pink, hate lies. Because I'm a gentle person, I've never thrown bricks at anyone, nor have I ever been criticized. However, since blogging, I have received a lot of criticism from all sorts of sources. Many times I felt my little soul was so hurt that I wanted to close the blog for good. However, every time I plan to close the blog, I think about the excitement of my readers when there are new posts every Tuesday or Thursday, so I don't have the heart to close it. Thinking back, most of the readers have probably been criticized in real life or on social networks. Therefore, I wrote this article to share my experiences in fighting "bullying", hoping they will be useful to you. Why do you get criticized? According to psychology, the motive for people to "criticize" others is to show their qualifications, show their power, and make themselves feel cooler and happier. Science also proves that people who often throw bricks and stones are beaten 4 times more often than normal people. The above paragraph is a joke, don't believe it. The Internet is a place of gossip, anyone can be a "keyboard warrior" and freely throw bricks without getting hurt. The articles I received the most criticism during my blogging process were: The dark side of the IT industry C# is the coolest language Current status of students learning programming Bitter truth – Sometimes code is the stupidest way to solve a problem Criticizing comments include all components as follows: Of course, when posting a controversial article, I always support different perspectives and opposing opinions. However, it seems that Vietnamese people don't know how to argue very well, but mainly act in a repressive manner =)). You can divide brick throwers into the following components: Genre of auto cursing/auto criticizing: Doesn't care what you say, as long as it doesn't agree with you, it will auto curse, or auto criticize like: Bullshit article, stupid author, lame article. Reading comments of this type is just annoying + has no benefit so it's best to just ignore and delete the comment. Category "likes to show off": The purpose of this category when throwing bricks is to bring you down, and at the same time lift yourself up. The comments they write are often long to show their qualifications, and at the same time include offensive information that brings you down. Personally, I don't like this type, but sometimes you can learn a lot to improve from their lengthy comments. Genre of sincere comments: This is the type of friends that everyone likes and wants to have a lot of. However, this component is a bit small, most Vietnamese people are more in category 2 (I am also category 2). Appreciate these types of friends/readers, they will help you get better. Previously, I advised some of you to write a blog to increase your knowledge and expression ability. Now, I discovered one more benefit: blogging also trains you to have a thick skin and the ability to stay calm, which is very useful for your future work. What to learn from "criticism" Of course, not everyone who criticizes you has bad intentions. Just assume that they have good intentions and want to give you feedback to improve, but because they don't know how to say it, it becomes criticism. For that reason, I am very touched when so many people take the time to write at length to point out my mistakes. Our grandparents have a saying that if you use alum, when you receive criticism from people, you should filter out useful suggestions from their criticism. Sometimes these bricks and stones are even useful, helping me develop much more than compliments. Just say thank you and accept the comments and you're done, no one will argue with you anymore. Thanks to eating a lot, I have gained experience when working with others. To make comments that are not offensive and personal, please comment on the work and not attack the worker: for example, say the code here is a bit confusing and difficult to understand, let alone your code is so confusing. You should not give orders but give suggestions, instead of telling you to separate this function, write more classes, use this design pattern or that, say: hey, I think in this place, if we separate the function into another class, use Singleton makes the code less confusing and easier to reuse later. Conclusion - How to twist One very good thing I read in the book How to Win Friends and Influence People about "how to always win in every argument" is: Don't argue at all, if he's wrong, if he's stupid, just let life teach him, I no need to teach. In addition, in this Facebook era, it is easy to receive criticism but it is also very easy to avoid criticism. Why worry too much about someone when you can make them completely disappear from your life with just one click? Feel free to accept comments from good people and block those who annoy you. What about you guys? How do you usually act when you get criticized? Please share in the comments section. Rate this: Like this: Related
Thuở bé, hẳn ai trong số chúng ta cũng từng thích các câu chuyện ngụ ngôn, cổ tích. Lớn lên, khi đi làm , ta không xem truyện cổ tích nữa mà chuyển qua đọc webtretho, truyện tranh, truyện voz. Bài viết này sẽ kể về những điều “hư cấu/hoang đường” như trong cổ tích, nhưng lại thường được các developer (đang đi học hoặc vừa ra trường ) tin sái cổ. Ngày xưa, lúc còn ngáo ngơ mình cũng tưởng mấy điều này là thật đấy. Vì vậy, hôm nay mình viết bài này để chia sẻ lại cho các bạn lập trình viên để các bạn không giẫm vào vết xe đổ của mình. Chuyện hư cấu khi còn đi học Cái gì được nhiều người sử dụng tức là nó tốt : Nhiều người nghĩ rằng: PHP được rất nhiều nhiều người, do đó nó là ngôn ngữ tốt , đáng học. Lý do PHP phổ biến là vì nó dễ học, dễ deploy, chứ không hẳn là do nó tốt. Vì vậy, trước chạy theo trào lưu, chạy theo số đông, hãy tự mình nghiên cứu tìm hiểu trước nhé. Ngôn ngữ/Framework của mình là tốt nhất, xịn nhất, giải quyết được mọi vấn đề : Không có ngôn ngữ/framework nào là vạn năng hay mạnh nhất. Do đó, đừng đi hổ báo kiểu: C, C++ của tao làm gì cũng được, Ruby là mạnh nhất, … coi chừng ăn gạch bể đầu luôn đấy. Có thể “học xong” một ngôn ngữ : Nhiều bạn mới học lập trình hay lên kế hoạch: em mất 1 tháng để học xong ngôn ngữ A, sau đó chuyển qua ngôn ngữ B. Xin thưa, trong lập trình không có khái niệm “học xong” . Bạn chỉ có thể học cú pháp, một số API cơ bản chứ không phải “học xong”. Bản thân một ngôn ngữ có rất nhiều khái niệm, thư viện mà khi tiếp xúc ta mới biết được. Nhiều developer làm việc với một ngôn ngữ 5-10 năm trời mà vẫn chỉ có thể thành thục chứ không xong được. Chỉ cần tập trung vào 1 ngôn ngữ/framework là không lo chết đói : Thế giới công nghệ thay đổi rất nhanh, công nghệ nào cũng chỉ sống được vài năm . Ví dụ như cách đây 5-10 năm người ta hay dùng WinForm , dùng Flash, giờ tụi nó sắp xuống lỗ cả. Theo đuổi nghiệp lập trình đồng nghĩa với việc “học, học nữa, học mãi, học tới khi về hưu”. Bạn cần nắm vững các kiến thức nền tảng , khái niệm cơ bản để có thể học nhanh chóng hơn. Chuyện hư cấu khi mới đi làm Chỉ cần technical giỏi là bạn sẽ thành trùm, thăng tiến vù vù : Đây là lần thứ 3 mình nhắc lại vấn đề này. Hồi mới ra trường mình cũng nghĩ thế, đi làm một thời gian mới biết: technical chỉ là điều kiện cần chứ không phải điều kiện đủ. Để có thể thăng tiến, gây chú ý của cấp trên, bạn còn phải rèn luyện kĩ năng giao tiếp , thuyết trình ,… và các soft-skill khác. Code cũ như đống sh*t, viết lại từ đầu còn nhanh hơn : Khi tham gia một dự án cũ, bạn sẽ thấy code cũ lòng vòng khó hiểu. Đôi khi bạn sẽ có suy nghĩ đập hết tất cả viết lại từ đầu sẽ nhanh hơn. Cẩn thận nhé!! Đa phần code cũ rắc rối là để giải quyết 1 số bug phức tạp và 1 số case đặc biệt. Viết lại từ đầu rất dễ làm lòi ra thêm bug mới hoặc làm bug cũ sống lại đấy! (Nếu thật sự cần viết lại, các bác dev có kinh nghiệm thường viết unit test trước để bắt bug rồi mới viết lại code). Phần lớn thời gian lập trình được dùng để viết code: Đôi khi, thời gian test và tìm bug còn nhiều hơn cả thời gian code. Suy nghĩ nhiều lên, viết code ít thôi. Mình thấy hiện tại nhiều bạn chưa nắm rõ vấn đề đã cắm đầu ngay vào code. Theo kinh nghiệm, ta nên xác định vấn đề, xác định cách giải quyết trên giấy trước, sau đó mới bắt tay vào code. Viết code chạy đúng là đã hoàn thành công việc : Nếu điều này là đúng thì cuộc sống developer dễ dàng biết mấy. Tiếc thay, code bạn viết ra còn phải đủ comment, dễ hiểu, dễ bảo trì . Vì sao? Khi khách hàng thay đổi requirement thì ta phải vào chỉnh sửa lại code. Viết code ẩu thì chính bạn là người lãnh đủ. Code tạm cho xong trước đã, khi nào có thời gian thì quay lại refactor sau : Đôi khi chúng ta viết code ẩu để chạy được, sau đó nhủ thầm “khi nào rảnh thì quay lại dọn dẹp cho đẹp vậy”. Tiếc thay, trong ngành lập trình , deadline thường dí sát tới mức bạn không có thời gian “rảnh” để dọn dẹp đống shit mình đã viết. tới khi quay lại đọc code cũ để thêm chức năng mới thấy hối hận. Nếu chỉ sửa một hai dòng code, không cần test lại làm gì cho phức tạp : Đa số trường hợp thì đúng là vậy, sửa 1,2 dòng code vô hại thường không ảnh hưởng gì đến code. Tuy nhiên, thái độ bất cẩn không test này có thể gây ra những hậu quả khá khủng khiếp . Hồi còn làm FPT, mình từng nghe “huyền thoại” về một bác dev thêm 1,2 dòng code để sửa bug “nhỏ” trước hôm demo, làm ứng dụng crash ngay hôm demo cho khách hàng. Hậu quả ra sao thì các bạn đoán ra rồi hén…. Có thể dễ dàng dự đoán thời gian hoàn thành một task/module : Một sự thật đắng lòng là đa số developer rất kém trong việc dự đoán, họ thường không lường trước được các trường hợp, dẫn tới việc estimate thiếu thời gian. Nếu là junior, các bạn nên cẩn thận khi estimate nếu chưa nắm rõ dự án nhé. Kết luận Biết được sự thật đằng sau những chuyện hư cấu/hoang đường này sẽ giúp bạn dễ sống sót và tiến thân hơn trên con đường lập trình. Đừng tin tưởng hoàn toàn những gì người ta nói, mà hãy google và phân tích trước nhé. Các bạn nào đã đi làm, có gì muốn chia sẻ thì cứ comment nhé. Một số nguồn tham khảo: Rate this: Like this: Related
As children, all of us probably liked fables and fairy tales. When I grow up, when I go to work, I stop watching fairy tales and switch to reading web stories, comics, and television stories. This article will talk about "fictional/mythical" things like in fairy tales, but are often falsely believed by developers (who are in school or have just graduated). In the past, when I was still stupid, I thought these things were true. Therefore, today I am writing this article to share with you programmers so that you do not follow my mistakes. Fiction when I was in school What is used by many people means it is good: Many people think: PHP is used by many people, therefore it is a good language, worth learning. The reason PHP is popular is because it is easy to learn and deploy, not necessarily because it is good. So, before following the trend or following the crowd, do your own research first. My language/Framework is the best, most advanced, can solve all problems: No language/framework is universal or the most powerful. Therefore, don't be aggressive like: My C, C++ can do anything, Ruby is the strongest, ... be careful of getting hit with a brick. It is possible to "finish" a language: Many people who are new to programming often make plans: it took me 1 month to finish learning language A, then switch to language B. Please tell me, in programming there are no concepts. “finished studying”. You can only learn the syntax, some basic APIs, but not "finish learning". A language itself has many concepts and libraries that we can only know when exposed to them. Many developers work with a language for 5-10 years and still only master it, not finish it. Just focus on one language/framework and you won't have to worry about starving to death: The technology world changes very quickly, any technology only lasts a few years. For example, 5-10 years ago people used WinForm and Flash, but now they are all about to lose money. Pursuing a programming career means "study, study more, study forever, study until retirement". You need to master the foundational knowledge and basic concepts to be able to learn more quickly. Fiction when I first started working As long as you are good at technique, you will become a boss and advance rapidly: This is the 3rd time I repeat this issue. When I first graduated, I thought the same thing. After working for a while, I realized: technical skills are only a necessary condition, not a sufficient condition. To be able to advance and attract the attention of your superiors, you also have to practice communication skills, presentation skills,... and other soft-skills. Old code is like a pile of sh*t, rewriting from scratch is even faster: When participating in an old project, you will find the old code wandering around confusingly. Sometimes you will have the thought that it will be faster to destroy everything and rewrite it from scratch. Be careful!! Most of the complicated old code is to solve some complex bugs and some special cases. Rewriting from scratch can easily reveal new bugs or revive old bugs! (If it really needs to be rewritten, experienced developers often write unit tests first to catch bugs and then rewrite the code). Most programming time is spent writing code: Sometimes, the time spent testing and finding bugs is more than the time spent coding. Think more, code less. I see that currently many of you do not understand the problem and are immediately immersed in the code. According to experience, we should identify the problem, determine the solution on paper first, and then start coding. Writing code that works correctly is getting the job done: If this were true, how easy would a developer's life be. Unfortunately, the code you write must be commented enough, easy to understand, and easy to maintain. Why? When customers change requirements, we have to edit the code again. If you write careless code, you are the one who suffers. Let's finish the temporary code first, when we have time, come back to refactor later: Sometimes we write careless code to make it work, then think to ourselves, "when we have free time, we'll come back and clean it up to make it look nice." Unfortunately, in the programming industry, deadlines are often so tight that you don't have "free" time to clean up the shit you wrote. It's not until I go back and read the old code to add functions that I regret it. If you only change a line or two of code, there's no need to retest anything to make it complicated: In most cases, that's true, editing 1 or 2 harmless lines of code usually doesn't affect the code at all. However, this careless attitude of not testing can cause quite terrible consequences. When I was working at FPT, I once heard a "legend" about a developer who added 1 or 2 lines of code to fix a "small" bug before the demo day, causing the application to crash on the day of the demo for customers. You can guess what the consequences will be... Can easily predict the completion time of a task/module: The bitter truth is that most developers are very poor at predicting, they often cannot foresee situations, leading to underestimation of time. If you are a junior, you should be careful when estimating if you do not clearly understand the project. Conclusion Knowing the truth behind these fictions/myths will make it easier for you to survive and advance in your programming career. Don't completely trust what people say, but google and analyze first. If you have worked and have anything to share, please comment. Some reference sources: Rate this: Like this: Related
Gần đây, khi lang thang trên mạng, mình chợt thấy một bài viết về Micorosoft Coginitive Service API . Sau khi test thử và thấy nó quá “ảo diệu”, mình cầm lòng không được nên phải lên blog viết bài này để chia sẻ cho các bạn. Giới thiệu tổng quan Nói đơn giản, bộ API này là kết tinh vô số tinh hoa về thuật toán, machine learning, data mining của Microsoft. Sử dụng bộ API này, bạn có thể tạo ra những ứng dụng “vi diệu” mà không cần biết gì về machine learning hay data mining cả. Bộ API Cognitive Service của Microsoft bao gồm 5 bộ API nhỏ: Vision : Nhận diện hình ảnh, khuôn mặt và cảm xúc Speech : Nhận diện giọng nói Language : Nhận diện ngôn ngữ Knowledge : Tra cứu dữ liệu trong giới học thuật (các báo cáo, bài báo khoa học) Search : Sử dụng bing để tìm kiếm bằng chữ, hình ảnh, video Các API về giọng nói, ngôn ngữ chỉ hoạt động được với tiếng Anh và một số ngôn ngữ khác, không có tiếng Việt. Do đó, trong phạm vi bài viết, mình sẽ giới thiệu bộ API Vision (Thật ra đây mới là thằng ngầu nhất). Vision API Bộ này có 4 set API nhỏ vô cùng bá đạo như sau: Computer Vision : Nhận diện các thuộc tính của hình ảnh, các vật thể trong ảnh, đưa ra mô tả. Ngoài ra, API này còn có thể n hận diện được ảnh có phải là ảnh XXX hay không =))). Lúc đầu test mình rất ngạc nhiên vì kết quả API trả về khá là chính xác . Face : Nhận diện các khuôn mặt trong hình như Facebook. Bạn cũng có thể thông qua API để huấn luyện cho máy, giúp nó nhận diện người trong ảnh là ai. API này còn có thể nhận được người trong ảnh là nam hay nữ, tuổi khoảng bao nhiêu luôn nhé, rất bá đạo =)). Emotion : Nhận diện khuôn mặt và cảm xúc của người trong ảnh. Chức năng này khá vui và hài hước. Video : Cho phép nhận diện khuôn mặt, hình ảnh, nhận diện chuyển động, chống rung, tạo thumbnail cho video. API này có vẻ cũng khá hay nhưng mình chưa test. Cách dùng API Ngày trước, lúc làm đồ án tốt nghiệp , mình cũng từng làm một dự án liên quan tới nhận diện hình ảnh. Hồi đấy mình sử dụng OpenCV để nhận diện khuôn mặt trong hình và tên người trong ảnh. Do OpenCV viết bằng C++, bạn phải tìm thư viện wrapper bằng Java, C# để sử dụng, khá là mệt. Cognitive Serivce được Microsoft cung cấp dưới dạng Restful API nên bạn có thể dễ dàng tích hợp nó với mọi ngôn ngữ lập trình. Hiện tại mình đang đã tích hợp nó với bot chat trong NodeJS. Sử dụng API rất đơn giản, bạn không cần cài đặt gì cả, chỉ cần làm 3 bước: Ứng dụng của các API Nếu bạn có ý định xây dựng một mạng xã hội, bạn sẽ cần chức năng nhận diện khuôn mặt, nhận diện thành viên. Thay vì viết lại chức năng này từ đầu (rất phức tạp, đòi hỏi phải biết về machine learning, data mining), ta có thể dùng FaceAPI để có kết quả một cách nhanh chóng. Bộ Computer Vision API cho phép ta nhận diện các vật có trong ảnh, có thể dùng để thêm tag cho hình ảnh. Giả sử bạn có một thư viện ảnh và bạn muốn thêm chức năng tìm kiếm theo nội dung ảnh, bạn chỉ cần sử dụng Computer Vision để thêm tag cho các hình. Nếu người dùng muốn tìm hình “chó”, ta chỉ cần query ảnh có tag “chó” là ra kết quả. Hiện tại, con chat bot của tôi đi code dạo cũng đang tích hợp Computer Vision API và Emotion API để nhận diện hình ảnh và cảm xúc. Bạn nào tò mò có thể vào m.me/toidicodedao để nghịch chơi. Bạn nào có ý tưởng nào hay để sử dụng các API này thì cứ comment nhé. Rate this: Like this: Related
Recently, while wandering online, I suddenly saw an article about Micorosoft Coginitive Service API. After testing it and finding it too "magical", I couldn't hold back so I had to write this article on my blog to share with you all. Overview Simply put, this API set is the crystallization of countless quintessence of Microsoft's algorithms, machine learning, and data mining. Using this API set, you can create "magical" applications without knowing anything about machine learning or data mining. Microsoft's Cognitive Service API set includes 5 small API sets: Vision: Recognize images, faces and emotions Speech: Voice recognition Language: Identify language Knowledge: Look up data in the academic world (reports, scientific articles) Search: Use bing to search by text, image, video Voice and language APIs only work with English and some other languages, not Vietnamese. Therefore, within the scope of this article, I will introduce the Vision API set (Actually, this is the coolest guy). Vision API This set has 4 extremely powerful small API sets as follows: Computer Vision: Identify properties of images, objects in images, provide descriptions. In addition, this API can also detect whether a photo is XXX or not =))). At first testing, I was very surprised because the results the API returned were quite accurate. Face: Identify faces in images like Facebook. You can also use the API to train the machine to help it recognize who the person in the photo is. This API can also recognize whether the person in the photo is male or female, and how old they are, very cool =)). Emotion: Recognize faces and emotions of people in photos. This function is quite fun and humorous. Video: Allows face and image recognition, motion detection, anti-shake, and creating thumbnails for videos. This API seems quite good but I haven't tested it yet. How to use API In the past, when I was doing my graduation project, I also did a project related to image recognition. Back then, I used OpenCV to identify faces in pictures and names of people in pictures. Because OpenCV is written in C++, you have to find wrapper libraries in Java and C# to use, which is quite tiring. Cognitive Serivce is provided by Microsoft as a Restful API so you can easily integrate it with any programming language. Currently, I have integrated it with the chat bot in NodeJS. Using the API is very simple, you don't need to install anything, just do 3 steps: Application of APIs If you intend to build a social network, you will need facial recognition and member recognition functions. Instead of rewriting this function from scratch (very complicated, requires knowledge about machine learning, data mining), we can use FaceAPI to get results quickly. The Computer Vision API allows us to identify objects in images and can be used to add tags to images. Suppose you have a photo library and you want to add a search function by photo content, you just need to use Computer Vision to add tags to the images. If the user wants to find a picture of "dog", we just need to query the image with the tag "dog" to get the results. Currently, my chat bot is also integrating Computer Vision API and Emotion API to recognize images and emotions. Those who are curious can go to m.me/toidicodedao to play around. If you have any good ideas for using these APIs, please comment. Rate this: Like this: Related
Hiện tại, nhiều trường đại học vẫn dạy các môn lập trình bằng tiếng Việt. Hãy cùng mình tìm hiểu xem bạn sẽ phải chịu những thiệt thòi gì khi phải học lập trình bằng tiếng Việt nhé. Học bằng tiếng Việt thì được gì? Có thể nói, lập trình là một ngành khó. Không chỉ đòi hỏi suy nghĩ logic, bạn còn phải làm quen với rất nhiều khái niệm mới lạ như function, object, pointer, …. Ở những giai đoạn đầu của việc học lập trình, sử dụng tiếng Việt sẽ giúp bạn thấy d ễ hiểu, dễ tiếp thu hơn. Các khái niệm như biến, mảng, con trỏ, vòng lặp được dịch ra tiếng Việt sẽ dễ hiểu hơn. Với những môn phức tạp khác như Cấu trúc dữ liệu giải thuật, hướng đối tượng , … ta phải tiếp xúc với nhiều khái niệm rắc rối, các thuật toán dài dòng. Lúc này, học bằng tiếng Việt sẽ giúp tiết kiệm được thời gian, giúp ta dễ nhớ, dễ thấm hơn. Song, học lập trình tiếng Việt cũng làm bạn thiệt thòi rất nhiều? Không tin à, đọc phần dưới nhé. Mất gì à? Mất cũng kha khá đấy Học lập trình tiếng Việt sẽ gây khá nhiều khó khăn khi code, đồng thời cản trở quá trình tự học và phát triển của bạn. Nói thật đấy, không đùa đâu! Nguồn tài liệu lập trình tiếng Việt khá ít ỏi . Hầu hết những sách tiếng Việt hay là sách về C, C++, và… thuật toán. Những sách về công nghệ mới không nhiều. Những cuốn sách thuộc hàng kinh điển trong giới developer thế giới như: Clean Code , Refactoring, Code Complete… đều không có tiếng Việt. Do đã quen với việc dùng tiếng Việt, nên mỗi khi gặp khó khăn các bạn thường hay google bằng tiếng Việt để tìm câu trả lời. Tiếc thay, ở Việt Nam không có stackoverflow , chỉ có một vài diễn đàn lập trình, group facebook nên nhiều khả năng bạn sẽ không tìm được câu trả lời mình cần. Không tìm được cách giải quyết vấn đề, nhiều bạn phải mang đi hỏi lung tung (Mình từng phàn nàn về vấn đề này ở bài thực trạng lập trình ). Điều này sẽ làm bạn phải dựa dẫm vào người khác, mất đi tính tự chủ. Học bằng tiếng Việt sẽ có lợi khi bạn trả lời phỏng vấn bằng tiếng Việt. Tuy vậy, bạn cũng sẽ gặp khó khăn khi muốn vươn tầm ra thế giới: lên stackoverflow thể hiện bản thân, phỏng vấn ở công ty nước ngoài (Hồi xưa vào Aswig mình bị PV bằng tiếng Anh. Mấy quảng cáo tuyển dụng mình đọc gần đây thấy PV tiếng Anh cũng kha khá nhiều đấy). Học lập trình bằng tiếng Anh thì được chi? Nếu đã quen lập trình bằng tiếng Anh, bạn có thể tha hồ đọc sách technical, xem video hướng dẫn trên mạng. Một chân trời mới bao la sẽ mở ra trước mắt. Mỗi khi gặp lỗi, chỉ cần đọc hiểu Exception, bạn google bằng tiếng Anh chỉ mất 5 phút là ra kết quả. Không còn phải đi hỏi để nghe thằng chủ blog Tôi đi code dạo chửi xéo nữa =))). Không còn phải nhờ vả người khác, bạn có thể chủ động trong việc học. Do tài liệu tiếng Anh rất đầy đủ và miễn phí, bạn có thể học bất kì thứ gì mình muốn. Có vô số trang web dạy code miễn phí bằng tiếng Anh. Bạn tha hồ tìm hiểu và vọc công nghệ mới mà không cần phải đợi tài liệu tiếng Việt. Mà cũng không cần nói đâu xa, các tuyển dụng developer có khả năng tiếng Anh thì lương lậu đều nhỉnh hơn so với không có tiếng Anh nhé. Nghe có vẻ hay, nhưng mà có vẻ khó…. Có một sự thật đắng lòng là: Phần đông sinh viên Việt Nam không giỏi tiếng Anh nên họ rất ngại. Dĩ nhiên mình cũng biết là nếu đã quen với tiếng Việt thì cũng khó có thể chuyển qua tiếng Anh ngay lập tức. Để bắt đầu, các bạn có thể tìm đọc một số series đơn giản: Head First, For Dummies. Các series này dùng ngôn ngữ dễ hiểu , nhiều hình ảnh minh họa, code đầy đủ. Bạn cũng có thể làm quen dần bằng cách đọc sách tiếng Anh về ngôn ngữ mình đã biết . Ví dụ nếu bạn đã biết Java thì thử tìm một số sách cơ bản Java tiếng Anh xem, sẵn ôn lại kiến thức luôn. Sau khi đã đọc sách quen thì các bạn có thể lên cousera, udemy, tìm xem các khóa học có phụ đề nhé. Vừa luyện đọc, vừa luyện nghe, vừa nâng cao kĩ năng lập trình, một công đôi ba việc luôn còn gì! Bắt đầu ngay đi nhé. Góc quảng cáo Rate this: Like this: Related
Currently, many universities still teach programming subjects in Vietnamese. Let's find out with us what disadvantages you will have to endure when you have to learn programming in Vietnamese. What are the benefits of studying Vietnamese? It can be said that programming is a difficult industry. Not only does it require logical thinking, you also have to get familiar with many new concepts such as functions, objects, pointers, etc. In the early stages of learning programming, using Vietnamese will help you find it easier to understand and absorb. Concepts such as variables, arrays, pointers, and loops translated into Vietnamese will be easier to understand. With other complex subjects such as algorithmic data structures, object orientation, etc., we have to come into contact with many complicated concepts and lengthy algorithms. At this time, learning in Vietnamese will help save time, make it easier to remember and absorb. However, learning Vietnamese programming also disadvantages you a lot? Don't believe it, read below. Lost something? It costs quite a bit. Learning Vietnamese programming will cause many difficulties when coding, and will hinder your self-study and development process. Seriously, no joke! Vietnamese programming resources are quite limited. Most good Vietnamese books are books about C, C++, and... algorithms. There are not many books about new technology. The classic books in the world of developers such as: Clean Code, Refactoring, Code Complete... are not available in Vietnamese. Because you are used to using Vietnamese, when you encounter difficulties, you often google in Vietnamese to find answers. Unfortunately, in Vietnam there is no stackoverflow, only a few programming forums and facebook groups, so you most likely won't find the answer you need. Unable to find a way to solve the problem, many of you have to ask around (I once complained about this problem in the current state of programming article). This will make you rely on others and lose your autonomy. Learning in Vietnamese will benefit you when you answer interviews in Vietnamese. However, you will also encounter difficulties when you want to reach out to the world: go to stackoverflow to express yourself, interview at foreign companies (In the past when I went to Aswig, I was interviewed in English. I read some recruitment ads Recently, I've seen quite a few English PVs.) What is the benefit of learning programming in English? If you are familiar with programming in English, you can freely read technical books and watch instructional videos online. A vast new horizon will open before your eyes. Every time you encounter an error, just read and understand Exception. Google it in English and it only takes 5 minutes to get the results. No more having to ask questions to hear the blog owner I code around curse anymore =))). You no longer have to rely on others, you can be proactive in learning. Because English materials are very complete and free, you can learn anything you want. There are countless websites that teach free coding in English. You can freely learn and dabble with new technology without having to wait for Vietnamese documents. Needless to say, hiring developers with English skills will have a higher salary than those who do not speak English. It sounds good, but it seems difficult…. There is a bitter truth: Most Vietnamese students are not good at English so they are very shy. Of course, I also know that if you are familiar with Vietnamese, it will be difficult to switch to English immediately. To start, you can read some simple series: Head First, For Dummies. These series use easy-to-understand language, many illustrations, and complete code. You can also get acquainted by reading English books about the language you already know. For example, if you already know Java, try finding some basic English Java books to review your knowledge. After reading familiar books, you can go to cousera, udemy, and look for courses with subtitles. Practice reading, listening, and improve programming skills, all at the same time! Let's start now. Advertising corner Rate this: Like this: Related
Lâu lâu lang thang trên mấy forum và group lập trình , thấy nhiều bạn vẫn hay có thắc mắc về WebForm. Thôi thì trước đây mình đã từng bình luận về WinForm và Silverlight rồi, hôm nay bình về WebForm luôn cho đủ bộ vậy. Bài viết sẽ cho bạn lý do để… từ bỏ WebForm và dành thời gian đi học cái khác có ích hơn. Lưu ý : bài viết là quan điểm cá nhân của tác giả . Mọi tranh luận về technical và góp ý về cách viết đều được hoan nghênh. WebForm, em là ai? Em ở hành tinh nào xuống? Trước khi nói lý do nên tránh xa WebForm, hãy nghe mình kể về quãng đời lên voi xuống chó đầy thăng trầm của bé WebForm. Ngày xửa ngày xưa, khi hầu hết đối tượng sử dụng phần mềm là các doanh nghiệp, các bác developer suốt ngày chỉ ngồi code Enterprise Application (ứng dụng doanh nghiệp) cho nội bộ công ty bằng WinForm và VB6. Thế rồi một ngày nọ, Internet ra đời. Thay vì chỉ làm ứng dụng nội bộ, nay các bác lãnh đạo còn đòi hỏi phải đưa sản phẩm lên web . Khổ nỗi, công ty trước giờ chỉ có 1 đống developer chuyên làm WinForm. Để viết ứng dụng web phải đào tạo lại về HTML/CSS/JS và back-end , rất tốn thời gian và công sức. Thế là Microsoft tạo ra WebForm. Chẳng cần học HTML/CSS hay JavaScript gì, dân dev chỉ việc áp dụng một số kiến thức sẵn có về WinForm, kéo thả control là có thể tạo ra ứng dụng web, quá tiện phải không nào!. Web Form nhanh chóng được mọi công ty ưa thích. Với sự ra đời của 1 số user control do KendoUI, DevExpress, việc kéo thả, thiết kế ứng dụng web trở nên tiện lợi và nhanh chóng. Tiếc thay, vật đổi sao dời, cũng như Internet Explorer , đời WebForm cũng trải qua bao thương hải tang điền . Em phải chia tay người yêu soái ca, bán mình vào lầu xanh, sau khi được đại gia chuộc ra thì bị vợ đại gia đánh ghen, … nhầm, đang review truyện Kiều nên viết lộn vào luôn . Hơn một năm trước, WebForm cũng bị chính cha nó khai cmn tử : Vì sao WebForm lại chết, ẻm đã làm gì sai ?? Vì sao mình lại dặn phải tránh xa Web Form, xin mời các bạn đọc tiếp ở phần 2, nhầm,… phía dưới. Điểm yếu của WebForm Dưới đây là một số lý do mà WebForm bị người đời chửi hơn chửi chó (Để tìm hiểu thêm, các bạn có thể google “Why Web Form sucks”). View State của WebForm thường khá lớn, đôi khi lên đến cả MB (chứa thông tin về toàn bộ các field của form), làm việc gửi nhận dữ liệu trở nên nặng nề. Không quản lý được ID của các element được tạo ra nên khó tích hợp với jQuery (Các bản WebForm mới đã khắc phục lỗi này). Page Cycle phức tạp khó hiểu với 7 step và gần 10 event. Một số control hỗ trợ viết code nhanh dẫn đến code ẩu (Ví dụ như cho phép kết nối tới Database trực tiếp từ view). Không thể áp dụng DI , không viết được unit test . Tuy nhiên, đây chỉ là điếm yếu (điểm yếu thì ngôn ngữ/framework nào cũng có) chứ không phải là lý do mình khuyên không nên học WebForm. Lý do nên tránh xa webform Lý do mình khuyên các bạn nên bỏ WebForm không phải là vì em từng vào lầu xanh nên bị HIV, mà là: WebForm hiện tại rất ít được dùng, và kiến thức thu được từ WebForm rất vô dụng . WebForm là một thằng ml ba xạo, nó dùng khái niệm user control để che giấu sự thật về web: Bản chất Web *éo phải là Form và Control, Web là HTML/CSS/JS . Nó tạo cho bạn 1 cảm giác : Làm Web cũng đơn giản như form, chỉ việc kéo thả rồi viết code cho các event là xong. Ban đầu với những chức năng đơn giản hoặc có code sẵn thì WebForm hoạt động khá tốt, nhưng khi cần đụng tới tương tác phức tạp với JavaScript, AJAX, RestAPI, WebForm dần lộ ra những nhược điểm của mình. Mặt khác, hầu hết các framework về Web đều phân chia rõ ràng hai bộ phận là front-end và back-end . Nếu đã học ASP.NET MVC, hiểu về model, controller, bạn có thể dễ dàng chuyển qua Ruby on Rail, Struts, Django, Express, hoặc áp dụng kiến thức MVC vào các framework front-end như AngularJS. Hiểu rõ khái niệm front end/back end bạn sẽ viết được RestAPI , viết Single Page Application. Tuy nhiên, nếu học WebForm, bạn sẽ phải học lại từ đầu khi chuyển qua các framework khác như MVC, Struts,… vì chả thằng nào dùng chung các khái niệm server control, page cycle, … của WebForm cả. Đấy, chẳng phải vô dụng là gì!!! Kết luận Thời xưa mình học FPT cũng từng được dạy Web Form. Tuy chẳng biết viết HTML CSS nhưng mà kéo thả cũng ra một cái web rất nhanh và ảo. Hậu quả là sao khi học mình chả biết gì về HTML và CSS cả =)). Mình cũng biết WebForm là một công nghệ hay, hữu dụng , nhưng thật sự nó không có ích cho con đường phát triển lâu dài của bạn. Bài này được viết để cảnh báo những người đã, đang hoặc sắp học WebForm. Nhớ cẩn thận, đừng đầu tư quá nhiều thời gian công sức cho nó nhé!! Đưa con số xác thực kẻo các bác lại bảo là chém gió =))) Rate this: Like this: Related
Occasionally wandering around programming forums and groups, I see that many people still have questions about WebForm. Well, I've commented on WinForm and Silverlight before, so today I'll comment on WebForm for the full package. This article will give you a reason to... give up WebForm and spend time learning something more useful. Note: this article is the personal opinion of the author. Any technical debate and writing suggestions are welcome. WebForm, who are you? What planet are you from? Before telling you why you should stay away from WebForm, let me tell you about WebForm's life full of ups and downs. Once upon a time, when most software users were businesses, developers only coded Enterprise Applications for internal companies using WinForm and VB6. Then one day, the Internet was born. Instead of just making internal applications, leaders now also require products to be posted on the web. Unfortunately, the company has only had a bunch of developers specializing in WinForm. To write a web application, you have to retrain yourself in HTML/CSS/JS and back-end, which is very time-consuming and labor-intensive. So Microsoft created WebForm. There is no need to learn HTML/CSS or JavaScript, developers just need to apply some existing knowledge about WinForm, drag and drop controls to create a web application, too convenient, isn't it!. Web Forms are quickly becoming popular with every company. With the advent of a number of user controls from KendoUI and DevExpress, drag and drop and web application design have become convenient and fast. Unfortunately, things change and change, and just like Internet Explorer, WebForm's life has also gone through many ups and downs. I had to break up with my handsome lover, sold myself into a brothel, and after being ransomed by a rich man, I was jealous of the rich man's wife... by mistake, I was reviewing Kieu's story so I wrote it wrong. More than a year ago, WebForm was also declared dead by its father: Why did WebForm die, what did he do wrong?? Why do I tell you to stay away from Web Forms? Please continue reading in part 2, mistake,... below. Weaknesses of WebForm Below are some reasons why WebForm is more cursed by people than dogs (To learn more, you can google "Why Web Form sucks"). The View State of a WebForm is often quite large, sometimes up to MB (containing information about all fields of the form), making sending and receiving data cumbersome. Unable to manage the IDs of created elements, making it difficult to integrate with jQuery (New WebForm versions have fixed this error). Page Cycle is complicated and confusing with 7 steps and nearly 10 events. Some controls support quick coding, leading to careless coding (For example, allowing connections to the Database directly from the view). Can't apply DI, can't write unit tests. However, this is just a weakness (weaknesses that every language/framework has) and not the reason I recommend not learning WebForm. Reasons to stay away from webforms The reason I advise you to give up WebForms is not because I used to go to a brothel and got HIV, but rather: WebForms are currently very rarely used, and the knowledge gained from WebForms is very useless. WebForm is a liar, it uses the concept of user control to hide the truth about the web: The nature of the Web is not Form and Control, the Web is HTML/CSS/JS. It gives you the feeling: Making a Web is as simple as a form, just drag and drop and write code for events and you're done. Initially, with simple functions or available code, WebForm works quite well, but when it comes to complex interactions with JavaScript, AJAX, RestAPI, WebForm gradually reveals its shortcomings. On the other hand, most Web frameworks clearly divide the two parts: front-end and back-end. If you have learned ASP.NET MVC and understand models and controllers, you can easily switch to Ruby on Rail, Struts, Django, Express, or apply MVC knowledge to front-end frameworks like AngularJS. Understanding the concept of front end/back end will help you write RestAPI and Single Page Application. However, if you learn WebForm, you will have to learn from the beginning when switching to other frameworks such as MVC, Struts,... because no one uses the same concepts of server control, page cycle,... of WebForm. See, it's not useless!!! Conclusion In the past, when I studied at FPT, I was also taught Web Form. Even though I don't know how to write HTML and CSS, I can drag and drop to create a very fast and virtual website. As a result, when I was studying, I didn't know anything about HTML and CSS =)). I also know that WebForm is a good and useful technology, but it's really not useful for your long-term development path. This article is written to warn those who have learned, are learning or are about to learn WebForm. Remember to be careful, don't invest too much time and effort into it!! Give the exact numbers so people won't say it's a joke =))) Rate this: Like this: Related
Bài viết kể về một hội chứng thường gặp ở các FA và lập trình viên mà các bạn nên đề phòng. Để mở đầu cầu chuyện, mình sẽ kể cho các bạn nghe về mối tình đơn phương hơn 6 tháng của mình ngày trước (Bạn nào không khoái chuyện tình cảm lâm li bi đát có thể bỏ qua đoạn này, kéo xuống bắt đầu đọc mục từ mục One itis của developer nhé) . Câu chuyện “cảm động” vừa rồi có liên quan éo gì đến bải viết? Có đấy, chứng bệnh “tương tư” mà mình gặp phải khi quen Ý Ý là hội chứng one itis!! Từ chứng one itis của FA “ One itis ” tạm hiểu là hội chứng Hội chứng này hay gặp ở FA, các thanh niên chưa tiếp xúc nhiều với gái, chưa có kinh nghiệm với phái nữ. Chỉ cần thấy một em dễ thương, nói chuyện ngọt ngào, tử tế với mình chút là bắt đầu thích thầm . Sau đó bắt đầu add friend Facebook để ngắm hình và tìm hiểu thêm về ẻm. Ở giai đoạn đầu, con bệnh sẽ có các triệu chứng như: thường xuyên ngắm hình facebook của gái, like và comment liên tục các status mới…. Nếu không có biện pháp chữa trị, bệnh sẽ có xu hướng tiến triển nặng, do con bệnh bị tình cảm làm mờ mắt nên chỉ thấy toàn điểm tốt chứ không thấy hề thấy điểm xấu trong con người ẻm (Giang hồ gọi trường hợp này là Trung Tình Thượng Não – tức là cái gì chui lên não ấy). Con bệnh bắt đầu thần tượng hóa đối tượng, xem gái là lẽ sống, là hạnh phúc của đời mình. Điều nguy hiểm là: Trong mắt con bệnh, người con gái ấy là tốt nhất, là số một, là người định mệnh, duy nhất của cuộc đời mình . Cho tới chứng one itis của developer Dân developer thường là FA nên cũng dễ bị lây hội chứng one itis của FA. Trong khi FA thì cuồng gái một cách hoang tưởng, còn developer thì cuồng ngôn ngữ một cách hoang tưởng . Khi tiếp xúc lâu dài với một ngôn ngữ (giống FA tiếp xúc lâu với gái), một developer sẽ quen dần với ngôn ngữ đó, tìm ra được nhiều điều hay ho ẩn trong ngôn ngữ. Với tình yêu dành cho ngôn ngữ, nhiều developer chỉ nhìn thấy cái hay, cái đẹp của ngôn ngữ đó . Developer sẽ nghĩ rằng ngôn ngữ của mình là tốt nhất, hay nhất, nhanh nhất, có thể giải quyết được mọi vấn đề. Mỗi khi có ai động đến ngôn ngữ yêu thương của họ, họ sẵn sàng “xù lông nhím” lên để… một mất một còn với đối thủ. Tác hại Ở FA, tác hại của oneitis khá nặng nề. Con bệnh cứ dành tình cảm mù quáng cho một gái nên rất khó tìm được người yêu. Con bệnh thường rơi vào trạng thái co giật, tê liệt, đau khổ khi tỏ tình mà bị từ chối hoặc rơi vào friendzone. Ở developer, tác hại của oneitis có vẻ nhẹ hơn đôi chút. Yêu thích và tập trung vào một ngôn ngữ lâu có thể làm bạn trở thành master, thành guru của ngôn ngữ đó (Ngôn ngữ lập trình rất tốt, ai yêu nó thì nó yêu lại, không như con gái! ). Nếu thành thạo chỉ một, hai ngôn ngữ, bạn vẫn có thể sống tốt, có thể kiếm được việc lương cao, nhưng cơ hội sẽ ít đi hơn nhiều. Hãy nhớ, ngôn ngữ vốn dĩ chỉ là công cụ. Hãy chọn công cụ phù hợp nhất để giải quyết vấn đề, chứ đừng quá tôn sùng nó. Việc chỉ biết 1,2 ngôn ngữ có thể làm giảm khả năng xin việc của bạn; đồng thời làm bạn khó có cái nhìn khách quan khi lựa chọn ngôn ngữ/công nghệ cho một dự án. Cách chữa trị Theo sách vở , các chữa bệnh này cho FA rất đơn giản: chỉ cần tạm gạt người đó qua một bên, ra ngoài xã hội tán tỉnh(và ngủ) với một hoặc nhiều em khác. Trải nghiệm và tiếp xúc nhiều, bạn sẽ có cái nhìn khách quan hơn. Khi đã có nhiều lựa chọn, bạn sẽ không còn bị tình cảm che mắt , không còn mãi coi người kia là duy nhất nữa. Sẵn đây mình giới thiệu cuốn sách Alpha Art- Trở thành người đàn ông mọi phụ nữ mong muốn , cuốn này sẽ giúp ích cho bạn trong việc tiếp cận và chinh phục phái nữ :3. Với developer, hội chứng này chỉ hay gặp ở các bạn sinh viên hoặc mới ra trường . Thường thường, sau khi đi làm một thời gian, hội chứng này sẽ… tự khỏi vì có dự án đòi hỏi phải tiếp xúc với nhiều ngôn ngữ, công nghệ. Tuy nhiên, nhiều người vẫn bị hội chứng này do làm mãi tại một công ty, một vị trí, vẫn một công nghệ. Bạn có thể tự chữa bệnh bằng cách thử thách bản thân với các ngôn ngữ mới: nếu bạn rành Java, hãy thử Python, JavaScript ; nếu bạn thích PHP, hay thử chuyển qua NodeJS xem sao? Bạn sẽ thấy mỗi ngôn ngữ/framework đều có điểm mạnh điểm yếu riêng , ngôn ngữ yêu thích của mình cũng thế. Không có ngôn ngữ nào là tốt nhất cả. Kết Xét cho cùng, nếu bạn muốn đời mình lãng mạn và thơ mộng như ngôn tình thì cứ thoải mái mà ôm cái bệnh one-itis đấy tới cuối đời. Nếu may mắn biết đâu bạn sẽ sánh duyên được với người trong mộng (Tới lúc quen nhau và lấy về có khi lại lòi ra rằng người ta cũng chẳng tốt như bạn nghĩ đâu!). Về phần mình, bệnh oneitis là một bệnh rất rất nên chữa . Thanh niên chữa được bệnh này sẽ dễ thoát kiếp FA, có cái nhìn khách quan hơn khi tìm gấu. Developer chữa được bệnh này sẽ có cái nhìn khách quan hơn khi lựa chọn ngôn ngữ/công nghệ , dễ định hình con đường phát triển nghề nghiệp của bản thân mình. Còn ý kiến của các bạn thì sao? Hãy cùng comment và thảo luận phía dưới nhé!!! Tái bút : Tên nhân vật đã được sửa đổi vì lý do riêng tư, nếu bạn nào học FU HCM hoặc RMIT mà biết ai tên Ý hoặc làm ASWIG biết ai tên Trang thì chỉ là trùng hợp ngẫu nhiên thôi nhé!!. Rate this: Like this: Related
This article tells about a common syndrome among FAs and programmers that you should be wary of. To start the story, I will tell you about my unrequited love of more than 6 months ago (If you don't like tragic love stories, you can skip this paragraph, scroll down and start reading the section). from the One ITis section of the developer). What does the "touching" story just now have to do with this article? Yes, the "love" disease that I encountered when I met Y Y is one itis syndrome!! From FA's one itis syndrome, "One itis" is roughly understood as the syndrome. This syndrome is common in FA, young men who have not had much contact with girls and do not have experience with women. Just seeing a girl who's cute, talks sweetly, and is a little kind to you is enough to start secretly liking her. Then start adding friends on Facebook to see pictures and learn more about her. In the early stages, the patient will have symptoms such as: regularly looking at girls' Facebook photos, constantly liking and commenting on new statuses... If there is no treatment, the disease will tend to progress seriously. Because the patient's eyes are blinded by emotions, he can only see the good points and not the bad points in him or her (Gypsy calls this case is Central Love in the Upper Brain - that is, what goes up to the brain). The patient begins to idolize the object, viewing the girl as his reason for living, the happiness of his life. The dangerous thing is: In the patient's eyes, that girl is the best, the number one, the destined and only person in his life. Until developer one itis syndrome Developers are often FA so they are also susceptible to FA one itis syndrome. While FAs are paranoidally crazy about girls, developers are paranoidally crazy about languages. When exposed to a language for a long time (like FA having long contact with a girl), a developer will gradually get used to that language and find out many interesting things hidden in the language. With a love for the language, many developers only see the goodness and beauty of that language. Developers will think that their language is the best, the best, the fastest, and can solve all problems. Every time someone touches their love language, they are ready to "ruffle their feathers" to... win or lose with their opponent. Harmful effects In FA, the harmful effects of oneitis are quite severe. The patient keeps having blind feelings for one girl, so it's very difficult to find a lover. Patients often fall into a state of convulsions, paralysis, and pain when they confess but are rejected or fall into the friendzone. In developers, the harmful effects of oneitis seem to be a bit milder. Loving and focusing on a language for a long time can make you become a master, a guru of that language (Programming language is very good, whoever loves it will love it back, unlike girls! ). If you are fluent in just one or two languages, you can still live well and get a high-paying job, but the opportunities will be much less. Remember, language is inherently just a tool. Choose the most suitable tool to solve the problem, don't worship it too much. Knowing only 1 or 2 languages ​​can reduce your ability to get a job; At the same time, it makes it difficult for you to have an objective view when choosing a language/technology for a project. Treatment According to the book, the treatment for FA is very simple: just temporarily put that person aside, go out into society and flirt (and sleep) with one or more other girls. With more experience and exposure, you will have a more objective view. When you have many options, you will no longer be blinded by emotions and will no longer consider the other person as the only one. Here I introduce the book Alpha Art - Become the man every woman wants, this book will help you in approaching and conquering women: 3. For developers, this syndrome is only common in students or new graduates. Usually, after working for a while, this syndrome will... go away on its own because a project requires exposure to many languages ​​and technologies. However, many people still suffer from this syndrome due to working at the same company, in the same position, and in the same technology. You can treat yourself by challenging yourself with new languages: if you're good at Java, try Python, JavaScript; If you like PHP, why not try switching to NodeJS? You will see that each language/framework has its own strengths and weaknesses, and so does your favorite language. There is no one language that is best. Conclusion After all, if you want your life to be as romantic and poetic as love, then feel free to embrace that one-itis for the rest of your life. If you're lucky, maybe you'll be matched with the person of your dreams (By the time you get to know each other and get married, you might find out that that person isn't as good as you thought!). For my part, oneitis is a disease that should be treated. Young people who can cure this disease will easily escape the FA life and have a more objective view when looking for bears. Developers who can cure this disease will have a more objective view when choosing language/technology, making it easier to shape their own career development path. What about your opinions? Please comment and discuss below!!! PS: The character's name has been changed for privacy reasons. If anyone studying at FU HCM or RMIT knows someone named Italy or doing ASWIG and knows someone named Trang, it's just a coincidence!!. Rate this: Like this: Related
Giới thiệu Đây là đây là bài viết thứ 2 trong series SOLID cho thanh niên code cứng . Ở bài viết này, mình sẽ nói về Open/Closed Principle – Nguyên lý Đóng Mở. Nội dung nguyên lý: À xin lỗi, vừa viết bài vừa học tiếng Nhật thông qua phim ảnh nên mình phát biểu nguyên lý hơi nhầm 1 tí. Nội dung nguyên lý đây: Giải thích nguyên lý Theo nguyên lý này, một module cần đáp ứng 2 điều kiện sau: Dễ mở rộng : Có thể dễ dàng nâng cấp, mở rộng, thêm tính năng mới cho một module khi có yêu cầu. Khó sửa đổi : Hạn chế hoặc cấm việc sửa đổi source code của module sẵn có. Hai điều kiện này thoạt nghe có vẻ mâu thuẫn quá nhỉ? Theo lẽ thường, khi muốn thêm chức năng thì ta phải viết thêm code hoặc sửa code đã có. Đằng này, nguyên lý lại hạn chế việc sửa đổi source code !! Vậy làm thế nào để ta có thể thiết kế một module dễ mở rộng, nhưng lại khó sửa đổi? Trước khi nói về lập trình, hãy cùng phân tích một vật dụng được thiết kế chuẩn theo Nguyên lý Đóng Mở: khẩu súng. Để bắn được xa hơn, ta có thể gắn thêm ống ngắm; để không gây tiếng động, ta có thể gắn nòng giảm thanh; để tăng số lượng đạn, ta có thể gắn thêm băng đạn phụ; khi cần cận chiến ta có thể gắn lưỡi lê vào luôn. Dễ thấy, khẩu súng được thiết kế để ta dễ dàng mở rộng tính năng mà không cần phải mổ xẻ tháo lắp các bộ phận bên trong (source code) của nó. Một module phù hợp OCP cũng nên được thiết kế như vậy. Ví dụ minh họa Ta hãy cùng đọc code trong ví dụ dưới đây: Ta có 3 class là Square , Circle , Rectangle . Class AreaDisplay tính diện tích các hình này và in ra. Theo code cũ, để tính diện tích, ta cần dùng hàm if để check và ép kiểu object đưa vào, sau đó bắt đầu tính. Dễ thấy nếu trong tương lại ta thêm nhiều class nữa, ta phải sửa class AreaDisplay , viết thêm chừng đó hàm if nữa . Sau khi chỉnh sửa, ta phải compile và deploy lại class AreaDisplay , dài dòng và dễ lỗi phải không nào?? Áp dụng OCP, ta sẽ cải tiến lại như sau: Ta chuyển module tính diện tích vào mỗi class. Class AreaDisplay chỉ việc in ra. Trong tương lai, khi thêm class mới, ta chỉ việc cho class này kế thừa class Shape ban đầu. Class AreaDisplay có thể in ra diện tích của các class thêm vào mà không cần sửa gì tới source code của nó cả. Lưu ý và kết luận Nguyên lý OCP xuất hiện khắp mọi ngóc ngách của ngành lập trình . Một ứng dụng của nguyên lý này là hệ thống plug-in (cho Eclipse, Visual Studio, add-on Chrome). Để thêm các tính năng mới cho phần mềm, ta chỉ việc cài đặt các plug-in này, không cần can thiệp gì đến source code sẵn có. Nguyên lý này cũng được áp dụng chặt chẽ khi viết các thư viện/framework . Ví dụ, khi sử dụng MVC, ta không được xem hay chỉnh sửa code của các class Router, Controller có sẵn, nhưng có thể viết các Controller mới, Router mới để thêm tính năng. Hoặc khi sử dụng ionicFramework , ta có thể tải thêm plug-in để sử dụng chức năng chụp hình, quét barcode mà không cần động vào source code của ionic . Khi áp dụng nguyên lý này trong thiết kế, ta cần phải xác định được những thứ cần thay đổi , để thiết kế phù hợp với thay đổi đó. Đây là một việc rất rất KHÓ , kể cả với developer lâu năm . Nó đòi hỏi nhiều kinh nghiệm , tầm nhìn và một ít khả năng dự đoán. Còn nếu như lỡ đoán sai những điều cần thay đổi thì sao? Cứ viết code cho chạy trước đã rồi refactor dần dần là được thôi =))). Những nguyên tắc còn lại của SOLID sẽ được giới thiệu ở những bài viết sau nhé. Có thắc mắc hay góp ý gì các bạn cứ thoải mái nêu ra trong phần comment, mình sẽ cố gắng giải đáp. Một số tài liệu để tham khảo thêm: Rate this: Like this: Related
Introduction This is the second article in the SOLID series for young people who code hard. In this article, I will talk about the Open/Closed Principle. Principle content: Sorry, while writing the article and learning Japanese through movies, I stated the principle a bit wrongly. Here is the content of the principle: Explanation of the principle According to this principle, a module needs to meet the following two conditions: Easy to expand: Can easily upgrade, expand, and add new features to a module when required. Difficult to modify: Limit or prohibit modifying the source code of existing modules. These two conditions seem contradictory at first, right? Normally, when we want to add functionality, we have to write more code or edit existing code. On the other hand, the principle limits the modification of source code!! So how can we design a module that is easy to expand, but difficult to modify? Before talking about programming, let's analyze an object that is designed according to the Open-Close Principle: the gun. To shoot farther, we can attach a viewfinder; To not make noise, we can attach a silencer; To increase the number of bullets, we can attach an additional magazine; When we need close combat, we can always attach the bayonet. Obviously, the gun is designed so that we can easily expand its features without having to disassemble and disassemble its internal parts (source code). An OCP compliant module should also be designed in the same way. Illustrative example Let's read the code in the example below: We have 3 classes: Square, Circle, Rectangle. Class AreaDisplay calculates the area of ​​these shapes and prints them. According to the old code, to calculate the area, we need to use the if function to check and force the type of the input object, then start calculating. It's easy to see that if we add more classes in the future, we will have to edit the AreaDisplay class and write that many more if functions. After editing, we have to compile and redeploy the AreaDisplay class, which is lengthy and error-prone, right?? Applying OCP, we will improve it as follows: We move the area calculation module into each class. Class AreaDisplay just prints it. In the future, when adding a new class, we just need to let this class inherit the original Shape class. The AreaDisplay class can print the area of ​​additional classes without needing to modify its source code at all. Notes and conclusions The OCP principle appears in every corner of the programming industry. One application of this principle is the plug-in system (for Eclipse, Visual Studio, Chrome add-ons). To add new features to the software, we just need to install these plug-ins, without needing to interfere with the existing source code. This principle is also strictly applied when writing libraries/frameworks. For example, when using MVC, we cannot view or edit the code of the existing Router and Controller classes, but we can write new Controllers and Routers to add features. Or when using ionicFramework, we can download additional plug-ins to use the image capture and barcode scanning functions without touching ionic's source code. When applying this principle in design, we need to determine what needs to change, so that the design is consistent with that change. This is a very, very DIFFICULT task, even for veteran developers. It requires a lot of experience, vision and a little bit of foresight. What if you misjudge what needs to be changed? Just write the code to run first and then gradually refactor it =))). The remaining principles of SOLID will be introduced in the following articles. If you have any questions or suggestions, please feel free to ask them in the comment section, I will try to answer. Some documents for further reference: Rate this: Like this: Related
Giới thiệu Đây là đây là bài viết thứ 3 trong series “SOLID cho thanh niên code cứng”. Ở bài viết này, mình sẽ nói về Liskov Substitution Principle – Nguyên lý Thay Thế Lít Kốp (LSP). Nội dung nguyên lý: Giải thích nguyên lý Xin cảnh báo trước một chút là nguyên lý này hơi trừu tượng và khó hiểu (các bác developer nước ngoài cũng tranh cãi khá nhiều về nó), do đó mình sẽ cố gắng giải thích một cách đơn giản nhất có thể. Nếu đọc lần đầu không hiểu, các bạn cố gắng đọc kĩ lại vài lần nhé, nếu vẫn không hiểu thì… chịu khó google tìm bài khác vậy. Để giữ tính đúng đắn của chương trình, class con phải thay thế được class cha. Nói dễ hiểu là thế này: Ngày xửa ngày xưa, hẳn bạn nào cũng có 1 cái Individual Portable Brick Game , tên tiếng Việt là máy chơi game xếp hình “thần thánh”. Thuở ấy, mỗi lần máy hết pin, mình lại xin mấy nghìn ra ngoài hàng mua pin con ó gắn vào chơi tiếp. Một lần nọ, hết pin mà không có tiền, mình đi lượm mấy cục pin con heo gắn vào chơi tạm. Không ngờ gắn pin vào xong, vừa hí hửng bật máy lên thì máy bị cháy vì điện thế của pin hơn bình thường. Thế là đi tong luôn cái máy chỉ vì… tiếc tiền mua pin. Theo lý thuyết, class PinConHeo là con của class Pin, khi ta dùng PinConHeo gắn vào làm Pin thì máy phải chạy bình thường. Tuy nhiên trong trường hợp của mình, class Pin Con Heo đã vi phạm LSP vì đã gây lỗi khi dùng thay cho class Pin (Sau này, mình gặp một trải nghiệm tương tự với class PhimConH.., nhưng mà thôi để lần khác kể vậy). Ví dụ minh họa Mình sẽ đưa ra 2 ví dụ thường gặp về việc vi phạm LSP: Giả sử, ta muốn viết một chương trình để mô tả các loài chim bay. Đại bàng, chim sẻ, vịt bay được, nhưng chim cánh cụt không bay được. Do chim cánh cụt cũng là chim, ta cho nó kế thừa class Bird . Tuy nhiên, vì cánh cụt không biết bay, khi gọi hàm bay của chim cánh cụt, ta sẽ quăng NoFlyException . Ta tạo 1 mảng chứa các loài chim rồi duyệt các phần tử. Khi gọi hàm Fly của class Penguin , hàm này sẽ quăng lỗi. Class Penguin gây lỗi khi chạy, không thay thế được class cha của nó là Bird , do đó nó đã vi phạm LSP. Đây là ví dụ kinh điển về hình vuông và hình chữ nhật mà mọi người thường dùng để giải thích LSP, mình chỉ viết và giải thích lại đôi chút. Đầu tiên, hãy cùng đọc đoạn code dưới đây. Ta có 2 class cho hình vuông và hình chữ nhật. Ai cũng biết hình vuông là hình chữ nhật có 2 cạnh bằng nhau, do đó ta có thể cho class Square kế thừa class Rectangle để tái sử dụng code. Do hình vuông có 2 cạnh bằng nhau, mỗi khi set độ dài 1 cạnh thì ta set luôn độ dài của cạnh còn lại. Tuy nhiên, khi chạy thử, hành động này đã thay đổi hành vi của của class Rectangle , dẫn đến vi phạm LSP. Trong trường hợp này, để code không vi phạm LSP, ta phải tạo 1 class cha là class Shape , sau đó cho Square và Rectangle kế thừa class Shape này. Lưu ý và kết luận Đây là nguyên lý… dễ bị vi phạm nhất, nguyên nhân chủ yếu là do sự thiếu kinh nghiệm khi thiết kế class. Thuông thường, design các class dựa theo đời thật: hình vuông là hình chữ nhật, chim cánh cụt là chim. Tuy nhiên, không thể bê nguyên văn mối quan hệ này vào code. Hãy nhớ 1 điều: Trong đời sống, A là B (hình vuông là hình chữ nhật, chim cánh cụt là chim) không có nghĩa là class A nên kế thừa class B. Chỉ cho class A kế thừa class B khi class A thay thế được cho class B. Pin con heo là pin nhưng không thay thế được cho pin, chim cánh cụt là chim nhưng không thay thế được cho chim, do đó 2 ví dụ này vi phạm LSP. Nguyên lý này ẩn giấu trong hầu hết mọi đoạn code, giúp cho code linh hoạt và ổn định mà ta không hề hay biết. Ví dụ như trong C#, ta có thể chạy hàm foreach với List, ArrayList, LinkedList bởi vì chúng cùng kế thừa interface IEnumerable . Các class List, ArrayList , .. đã được thiết kế đúng LSP, chúng có thể thay thế cho IEnumerable mà không làm hỏng tính đúng đắn của chương trình. Một số tài liệu để tham khảo thêm: Rate this: Like this: Related
Introduction This is the third article in the series "SOLID for young people who code hard". In this article, I will talk about Liskov Substitution Principle - Literary Substitution Principle (LSP). Principle content: Explaining the principle Please warn me in advance that this principle is a bit abstract and difficult to understand (foreign developers also argue a lot about it), so I will try to explain it in a simple way. as simple as possible. If you don't understand it the first time, try to read it carefully a few times. If you still don't understand it... just try to google it and find another article. To maintain the correctness of the program, the child class must replace the parent class. To put it simply, it's like this: Once upon a time, everyone must have had an Individual Portable Brick Game, the Vietnamese name being a "divine" puzzle game machine. Back then, every time the phone ran out of battery, I would ask for a few thousand to go to the store and buy an eagle battery to plug in and continue playing. One time, the battery ran out and I had no money, so I went to collect some pig batteries and put them in to play temporarily. Unexpectedly, after installing the battery, as soon as I excitedly turned it on, the device burned out because the battery voltage was higher than normal. So I lost the device just because... I regret spending money on batteries. In theory, the PinConHeo class is a child of the Pin class. When we use PinConHeo attached as a Battery, the device must run normally. However, in my case, the Pin Con Heo class violated the LSP because it caused an error when used in place of the Pin class (Later, I encountered a similar experience with the PhimConH class.., but that's for another time. So). Illustrative examples I will give two common examples of LSP violations: Suppose, we want to write a program to describe flying birds. Eagles, sparrows, and ducks can fly, but penguins cannot fly. Because penguins are also birds, we let them inherit the Bird class. However, since penguins can't fly, when we call the penguin's fly function, we throw a NoFlyException . We create an array containing birds and then browse the elements. When calling the Fly function of the Penguin class, this function will throw an error. The Penguin class caused an error when run, not replacing its parent class Bird , so it violated the LSP. This is the classic example of squares and rectangles that people often use to explain LSP, I just wrote and explained it a bit. First, let's read the code below. We have 2 classes for squares and rectangles. Everyone knows that a square is a rectangle with two equal sides, so we can let the Square class inherit the Rectangle class to reuse code. Because a square has two equal sides, every time we set the length of one side, we also set the length of the other side. However, when tested, this action changed the behavior of the Rectangle class, resulting in an LSP violation. In this case, in order for the code not to violate LSP, we must create a parent class called Shape class, then let Square and Rectangle inherit this Shape class. Notes and conclusions This is the principle... most easily violated, mainly due to lack of experience when designing classes. Usually, the design of classes is based on real life: squares are rectangles, penguins are birds. However, it is not possible to translate this relationship verbatim into the code. Remember one thing: In life, A is B (a square is a rectangle, a penguin is a bird) does not mean that class A should inherit class B. Only let class A inherit class B when class A replaces Substitute for class B. A pig battery is a battery but is not a substitute for a battery, a penguin is a bird but is not a substitute for a bird, so these two examples violate the LSP. This principle is hidden in almost every piece of code, making the code flexible and stable without us even realizing it. For example, in C#, we can run the foreach function with List, ArrayList, LinkedList because they all inherit the IEnumerable interface. The List, ArrayList, .. classes have been properly designed as LSP, they can replace IEnumerable without damaging the correctness of the program. Some documents for further reference: Rate this: Like this: Related
Giới thiệu Chào mừng các bạn đến với bài viết cuối cùng trong series SOLID. Ở bài viết này, mình sẽ nói về Dependency Inversion Principle – Nguyên lý Đảo Ngược Dependency. Nội dung nguyên lý Giải thích nguyên lý Trong bài, mình hay dùng từ module. Trong thực tế, module này có thể là 1 project, 1 file dll, hoặc một service. Để dễ hiểu, chỉ trong bài viết này , các bạn hãy xem mỗi module là một class nhé. Với cách code thông thường, các module cấp cao sẽ gọi các module cấp thấp. Module cấp cao sẽ phụ thuộc và module cấp thấp , điều đó tạo ra các dependency. Khi module cấp thấp thay đổi, module cấp cao phải thay đổi theo . Một thay đổi sẽ kéo theo hàng loạt thay đổi, giảm khả năng bảo trì của code. Nếu tuân theo DIP, các module cấp thấp lẫn cấp cao đều phụ thuộc vào 1 interface không đổi. Ta có thể dễ dàng thay thế, sửa đổi module cấp thấp mà không ảnh hưởng gì tới module cấp cao. Để dễ hiểu, bạn hãy nhìn vào cái mấy cái đèn điện trong nhà mình. Ở đây, module cấp cao chính là ổ điện, interface chính là đuôi đèn tròn , 2 module cấp thấp là bóng đèn tròn và bóng đèn huỳnh quang. Hai module này đều kế thừa interface đuổi tròn, Ta có thể dễ dàng thay đổi 2 loại bóng vì module cấp cao (ổ điện) chỉ quan tâm tới interface (đuôi tròn), không quan tâm tới implementation (bóng đèn tròn hay huỳnh quang). Trong code cũng vậy, khi áp dụng DIP, các module liên kết với nhau thông qua interface . Để kết nối tới database, ta chỉ cần gọi hàm Get, Save … của interface IDataAccess . Khi thay database, ta chỉ cần thay implementation của interface này. Ví dụ minh họa Code khi chưa áp dụng DIP: Code sau khi đã thiết kế lại, áp dụng DIP: Trong thực tế, người ta thường áp dụng pattern Dependency Injection để đảm bảo nguyên lý DIP trong code. Mình đã giải thích kĩ về code trong bài viết này nên không nhắc lại nữa, các bạn vào xem nhé: Lưu ý và kết luận DIP được áp dụng nhiều nhất trong code, nhưng nó cũng gây ra nhiều điều tranh cãi. Bên cạnh một số ưu điểm, DIP cũng đi kèm một số khuyết điểm sau: Giảm sự kết dính giữa các module Code dễ bảo trì, dễ thay thế module Rất dễ test và viết Unit Test Khái niệm DI khá “khó tiêu”, các developer mới sẽ gặp khó khăn khi học Sử dụng interface nên đôi khi sẽ khó debug, do không biết chính xác module nào được gọi Làm tăng độ phức tạp của code Mình từng gặp một số dự án mà mỗi interface chỉ có 1 class implement nó, cũng không có Unit Test gì cả. Trong trường hợp này, DIP không mang lại nhiều lợi ích, áp dụng DI chỉ khiến cho code dài dòng, khó debug hơn. Một số tài liệu để tham khảo thêm: Lời kết Chúc mừng các bạn đã cùng mình hoàn thành series SOLID cho thanh niên code cứng này. Hi vọng qua series, các bạn có thể thu được những kiến thức hữu ích và áp dụng chúng vào việc thiết kế/ viết code. Như mình đã nói ở bài đầu tiên , các nguyên lý này chỉ là hướng dẫn , giúp cho code của bạn tốt hơn, sạch hơn , dễ bảo trì hơn. Tuy nhiên, “không có bữa ăn trưa nào miễn phí”. Áp dụng các nguyên lý này vào code có thể giúp bạn cải thiện được chất lượng code, nhưng cũng có thể làm nó rườm rà, dài hơn, khó quản lý hơn. Nhắc lại một điều mình đã nói trong bài design pattern : Để thành một developer giỏi, ta nên biết các nguyên lý SOLID, các design patterns. Tuy nhiên, không phải cứ cứng nhắc áp dụng nhiều nguyên lý và design pattern vào code thì code sẽ tốt hơn. Một người developer giỏi sẽ hiểu rõ những trade-off của chúng và chỉ áp dụng một cách hợp lý để giải quyết vấn đề. Hãy nhớ, trong design, tất cả đều là đánh đổi nhé! Rate this: Like this: Related
Introduction Welcome to the final article in the SOLID series. In this article, I will talk about Dependency Inversion Principle - Dependency Inversion Principle. Principle content Explanation of principle In the article, I often use the word module. In reality, this module can be a project, a dll file, or a service. For ease of understanding, in this article, please consider each module as a class. With normal coding, high-level modules will call low-level modules. High-level modules will depend on low-level modules, creating dependencies. When low-level modules change, high-level modules must change accordingly. One change will lead to a series of changes, reducing the maintainability of the code. If you follow DIP, both low-level and high-level modules depend on a constant interface. We can easily replace and modify low-level modules without affecting the high-level modules. To make it easier to understand, look at the electric lights in your house. Here, the high-level module is the electrical outlet, the main interface is the tail light, and the two low-level modules are the light bulb and the fluorescent light bulb. These two modules both inherit the circular bulb interface. We can easily change the two types of bulbs because the high-level module (electrical socket) only cares about the interface (round bulb), not the implementation (circular or fluorescent bulbs). ). In code, too, when applying DIP, modules connect to each other through interfaces. To connect to the database, we just need to call the Get, Save... function of the IDataAccess interface. When changing the database, we only need to change the implementation of this interface. Example to illustrate Code without applying DIP: Code after redesigning and applying DIP: In practice, people often apply the Dependency Injection pattern to ensure the DIP principle in code. I have explained the code thoroughly in this article so I won't repeat it again, please take a look: Note and conclusion DIP is most commonly applied in code, but it also causes a lot of controversy. Besides some advantages, DIP also comes with the following disadvantages: Reduce adhesion between modules Code is easy to maintain, easy to replace modules Very easy to test and write Unit Test The concept of DI is quite difficult to understand, new developers will have difficulty learning it Using an interface makes it sometimes difficult to debug, because you don't know exactly which module is being called Increases code complexity I have come across some projects where each interface only has one class implementing it, and no Unit Test at all. In this case, DIP does not bring many benefits, applying DI only makes the code longer and more difficult to debug. Some documents for further reference: Conclusion Congratulations on completing this SOLID series for young people with hard coding. Hopefully through the series, you can gain useful knowledge and apply it to designing/writing code. As I said in the first article, these principles are just guidelines, helping to make your code better, cleaner, and easier to maintain. However, “there is no free lunch”. Applying these principles to your code can help you improve code quality, but it can also make it more cumbersome, longer, and more difficult to manage. Recalling something I said in the design pattern article: To be a good developer, we should know SOLID principles and design patterns. However, rigidly applying many principles and design patterns to code does not mean the code will be better. A good developer will clearly understand their trade-offs and only apply a reasonable way to solve the problem. Remember, in design, it's all about trade-offs! Rate this: Like this: Related
Series gồm 3 phần: Sau khi đọc và làm theo phần 2 , các bạn đã có 1 con bot c hạy được . Tuy nhiên, Cloud9 chỉ hỗ trợ các bạn code và deploy để test thứ chứ không hỗ trợ hosting. Sau khoảng 2,3 tiếng không sử dụng, cloud9 sẽ tự tắt server làm bot ngưng hoạt động. Do đó chúng ta phải deploy con bot lên một host khác . Deploy bot lên OpenShift Ở đây mình lựa chọn OpenShift vì nó free, tốc độ cũng khá nhanh, lại dễ deploy. Sau 24h không hoạt động thì nó mới cho host ngủ. Một lựa chọn khác là heroku , host heroku cũng sẽ tự ngủ sau 2, 3 tiếng không sử dụng. Các bạn làm theo video để deploy bot lên host nhé nhé. Test và Submit bot cho Facebook Sau khi deploy, bot của bạn đã có thể hoạt động ổn định. Tuy nhiên, hiện tại c hỉ có mình bạn có thể sử dụng con bot này. Để mọi người có thể sử dụng bot, bạn cần phải nộp bot cho Facebook xét duyệt. Xem video để biết cách làm rủ bạn bè test hộ và submit bot cho Facebook nhé. Làm video mệt quá nên mình sụt mất 3,4 kg :'(. Về sau mỗi lần làm hướng dẫn bằng video chắc phải đòi các bạn 200 like hoặc 200 share quá =)). Rate this: Like this: Related
The series includes 3 parts: After reading and following part 2, you will have a running bot. However, Cloud9 only supports you to code and deploy to test things, not hosting. After about 2-3 hours of non-use, cloud9 will automatically turn off the server, causing the bot to stop working. Therefore we have to deploy the bot to another host. Deploy bot to OpenShift Here I choose OpenShift because it is free, the speed is quite fast, and it is easy to deploy. After 24 hours of inactivity, it will let the host sleep. Another option is heroku, the heroku host will also sleep automatically after 2 or 3 hours of inactivity. Please follow the video to deploy the bot to the host. Test and Submit bot for Facebook After deploying, your bot can operate stably. However, currently only you can use this bot. In order for anyone to be able to use the bot, you need to submit the bot to Facebook for review. Watch the video to learn how to invite friends to test it for you and submit the bot to Facebook. Making videos was so tiring that I lost 3.4 kg :'(. In the future, every time I make a video tutorial, I will probably ask you for 200 likes or 200 shares =)). Rate this: Like this: Related
Giới thiệu Đây là đây là bài viết thứ tư trong series “SOLID cho thanh niên code cứng”. Ở bài viết này, mình sẽ nói về Interface Segregation Principle – Nguyên lý phân tách interface. Nội dung nguyên lý: Giải thích nguyên lý Trước khi giải thích nguyên lý, mình nhắc lại khái niệm interface một chút cho các bạn mất căn bản nhé. Interface là một lớp rỗng chỉ chứa khai báo về tên phương thức không có khai báo về thuộc tính hay thứ gì khác và các phương thức này cũng là rỗng. Bởi vậy bất kỳ lớp nào sử dụng lớp interface đều phải định nghĩa các phương thức đã khai báo ở lớp interface. (Xem thêm tại: ) Để thiết kế một hệ thống linh hoạt, dễ thay đổi, các module của hệ thống nên giao tiếp với nhau thông qua interface . Mỗi module sẽ gọi chức năng của module khác thông qua interface mà không cần quan tâm tới implementation bên dưới. Như đã nói ở trên, do interface chỉ chứa khai báo rỗng về method, khi một class implement một interface, class đó phải implement toàn bộ các method được khai báo trong interface đó. Điều này tương đương với việc nếu ta tạo ra 1 interface bự (hơn 100 method chẳng hạn), mỗi class sẽ phải implement toàn bộ 100 method đó, kể những method không bao giờ sử dụng đến. Nếu áp dụng ISP, ta sẽ chia interface này ra thành nhiều interface nhỏ, các class chỉ cần implement những interface có chức năng mà chúng cần , không cần phải implement những chức năng thừa nữa. Ví dụ minh họa Đây là nguyên lý dễ hiểu nhất trong SOLID, các bạn chỉ đọc code một chút là hiểu ngay! Giả sử ta muốn viết một chương trình giới thiệu thuộc tính của các loài động vật. Động vật nào cũng có thể ăn, uống, ngủ, ta thiết kế interface IAnimal như sau: Khi ta muốn thêm 1 số loài động vật mới và tính năng vào, ta phải thêm có thêm method vào trong interface như: bơi lội, bay, săn mồi, … Điều này làm interface phình to ra. Khi một loài động vật kế thừa interface, nó phải implement luôn cả những hàm không dùng đến . Trong thực tế cũng vậy, khi cần thêm chức năng mới, ta thường thêm method vào interface, làm cho interface ngày càng phình to ra. Khi thêm method vào interface IAnimal , những class cũ như Dog , Cat đều phải implement những method mới nên mất thời gian. Giải pháp trong tình huống này là tách interface IAnimal ra thành các interface nhỏ như sau: Để có thể phân tách một interface lớn thành các interface nhỏ một cách hợp lý, các bạn nên xem lại bài viết đầu tiên của series về Single Responsibility Principle . Tuy nhiên, đôi khi việc tách ra nhiều interface có thể làm tăng số lượng interface, tăng số lượng class , ta cần cân nhắc lợi hại trước khi áp dụng nhé. Lưu ý và kết luận Áp dụng nguyên lý ISP sẽ làm hệ thống linh hoạt hơn, đồng thời giảm thiểu code thừa (do phải implement những tính năng không cần thiết). Tuy nhiên, trong thực tế vẫn có nhiều trường hợp bất khả kháng mà chúng ta phải tạo 1 interface lớn. Ví dụ: Trong một ứng dụng ASP.NET, nếu muốn implement chức năng đăng nhập/phân quyền cho user, ta phải implement iinterface MembershipProvider. Interface này khá là bự với hơn 27 method (Giờ có khi còn nhiều hơn). Có lẽ mục đích của Microsoft khi design interface này là để cover toàn bộ các chức năng cần có của việc đăng nhập/phân quyền . Tuy nhiên, do interface này lớn, nếu ta chỉ muốn làm phân quyền đơn giản thì việc implement 27 method này là hoàn toàn mất thời gian và không cần thiết. Ở bài viết sau, mình sẽ giới thiệu về Dependency Inversion Principle – nguyên lý cuối cùng trong SOLID . Có thắc mắc hay góp ý gì các bạn cứ thoải mái nêu ra trong phần comment, mình sẽ cố gắng giải đáp. Một số tài liệu để tham khảo thêm: Rate this: Like this: Related
Introduction This is the fourth article in the series "SOLID for hard coders". In this article, I will talk about Interface Segregation Principle - Interface separation principle. Principle content: Explain the principle Before explaining the principle, let me remind you of the concept of interface a bit to help you understand the basics. Interface is an empty class that only contains declarations of method names, no declarations of properties or anything else, and these methods are also empty. Therefore, any class that uses the interface class must define the methods declared in the interface class. (See more at: ) To design a flexible, easy-to-change system, the system's modules should communicate with each other through the interface. Each module will call the functions of another module through the interface without regard to the underlying implementation. As mentioned above, because interfaces only contain empty declarations of methods, when a class implements an interface, that class must implement all the methods declared in that interface. This is equivalent to the fact that if we create a large interface (more than 100 methods, for example), each class will have to implement all 100 of those methods, including the methods that are never used. If we apply ISP, we will divide this interface into many small interfaces. Classes only need to implement interfaces with the functions they need, no need to implement redundant functions. Illustrative example This is the easiest to understand principle in SOLID, you just read the code a little and you will understand immediately! Suppose we want to write a program that introduces the properties of animals. Any animal can eat, drink, and sleep. We design the IAnimal interface as follows: When we want to add some new animals and features, we have to add more methods to the interface such as swimming, flying, hunting, etc. This makes the interface expand. When an animal inherits an interface, it must also implement unused functions. In reality, too, when we need to add new functions, we often add methods to the interface, making the interface increasingly larger. When adding methods to the IAnimal interface, old classes like Dog and Cat must implement new methods, so it takes time. The solution in this situation is to separate the IAnimal interface into small interfaces as follows: To be able to properly decompose a large interface into small interfaces, you should review the first article of the series on the Single Responsibility Principle. However, sometimes separating multiple interfaces can increase the number of interfaces and increase the number of classes. We need to consider the pros and cons before applying. Notes and conclusions Applying the ISP principle will make the system more flexible, while minimizing redundant code (due to having to implement unnecessary features). However, in reality there are still many force majeure cases where we have to create a large interface. For example: In an ASP.NET application, if we want to implement login/authorization functionality for users, we must implement iinterface MembershipProvider. This interface is quite large with more than 27 methods (Now there are even more). Perhaps Microsoft's purpose when designing this interface is to cover all the necessary functions of login/authorization. However, because this interface is large, if we just want to do simple decentralization, implementing these 27 methods is completely time-consuming and unnecessary. In the following article, I will introduce Dependency Inversion Principle - the last principle in SOLID. If you have any questions or suggestions, please feel free to ask them in the comment section, I will try to answer. Some documents for further reference: Rate this: Like this: Related
Cách đây 1,2 tháng, Facebook vừa ra mắt Facebook Messenger Platform , cho phép ta viết 1 con bot hỗ trợ tự động trả lời người dùng. Vốn đam mê công nghệ nên mình cũng tò mò viết thử 1 con. Các bạn có thể thử trò chuyện với bot tại: m.me/toidicodedao , hoặc xem video demo tại đây. Như đã hứa với các bạn trên Facebook, nếu được hơn 100 like mình sẽ đăng bài hướng dẫn cách viết bot. Vốn hơi lười nhưng mà ai ngờ chỉ mới hơn 30p đã được 100 like, biết vậy mình set 300 like là được rồi. Hứa rồi thì viết vậy. Tuy hiện tại NodeJS đã có sẵn botkit để viết bot, song nếu chỉ chăm chăm dùng thư viện , dùng hàng ăn sẵn , bạn sẽ không học hỏi được gì. Ngoài ra, không phải bạn nào cũng biết dùng NodeJS, do đó mình sẽ viết bài giải thích cơ chế, cách viết 1 con bot từ đầu cho tới cách deploy. Chỉ cần nắm rõ cơ chế, bạn có thể dùng C#, Java, Python , … cũng đều viết được bot cả. Series gồm 3 phần: Để hiểu rõ cách thức Facebook Bot hoạt động, bạn cần nắm rõ 2 khái niệm: Webhook và RestAPI . Webhook và RestAPI được tạo ra để giải quyết một vấn đề: Làm sao để 2 chương trình viết bằng 2 ngôn ngữ riêng biệt có thể giao tiếp được với nhau. Webhook là gì? Hãy tưởng tượng bạn là một thanh niên đi làm đã có vợ con đùm đề. Một ngày nọ, có một em gái người Pháp tóc vàng ngực khủng rất xinh chuyển tới gần nhà bạn. Nhà em gái nọ kín cổng cao tường, có 2 con chó bẹc giê giữ tợn canh giữ; nhà bạn cũng chả khá hơn, có 1 mụ vợ già canh giữ. Bạn rất muốn rủ rê em gái nọ đi chơi nhưng không biết cách. Bí quá, bạn bèn ra lan can dựng tấm bảng : “Đang tìm người xem phim chung, ai muốn đi thì ném cái thời gian địa điểm hẹn qua nhé”. May thay, thấy bạn đẹp trai khoai to nên em gái kia cũng hứng thú, viết một mẩu giấy ghi thời gian địa điểm hẹn ném qua lan can nhà bạn. Nhặt được tờ giấy , bạn bắt đầu lên kế hoạch nói dối mụ vợ để ra ngoài hú hí. Nếu nói bạn và em gái Pháp là 2 chương trình khác nhau, thì ở đây Webhook chính là cái lan can , thứ giúp 2 người kết nối với nhau. Theo lý thuyết, webhook là một HTTP callback . Trong code, khi bạn truyền callback vào 1 hàm, mang ý nghĩa “Tao đưa mày cái hàm này nè, khi nào có thì gọi hàm đó báo tao nhe”. Webhook cũng tương tự, nhưng là thông qua HTTP POST. Ví dụ có thể giải thích như sau trên: Slack có thể tích hợp được rất nhiều dịch vụ là nhờ webhook. Giả sử khi bạn commit code lên Git, git sẽ gửi một POST request lên webhook của Slack tại: . Slack sẽ đọc webhook này và xử lý (Build code, lưu trữ xuống database). RestAPI là gì? Quay lại chuyện em gái Pháp tóc vàng ngực khủng. Nhận được tờ giấy, bạn mừng rơn nhưng không biết làm sao báo lại cho nàng. Nàng không biết tiếng Việt, còn bạn cũng không rành tiếng Pháp. May thay, nàng vốn là tiểu thư, nên nhà có con người hầu biết tiếng Anh. Bạn gửi một mẫu giấy cho con người hầu, nhờ nó báo lại địa điểm hẹn cho nàng. Cuộc hẹn thành công tốt đẹp. Hai người đi ăn uống, xem phim rồi tìm nơi thanh vắng riêng tư nghỉ ngơi. Chó bẹc giê hay mụ vợ già cũng chẳng thể nào ngăn cách tình yêu đôi lứa. Ở đây, bạn là chương trình C# , còn nàng lại viết bằng Java. Con bé người hầu ở đây là RestAPI của nàng, sử dụng tiếng Anh (giao thức HTTP) để giúp 2 bạn giao tiếp với nhau. Nhờ có RestAPI mà 2 chương trình viết bằng 2 ngôn ngữ khác nhau có thể giao tiếp, truy cập dữ liệu của nhau. Cũng đã có khá nhiều bài viết về REST nên mình không nhắc lại, bạn nào muốn tìm hiểu có thể google thêm nhé: REST API là gì? . Hiện tại, các ứng dụng nổi tiếng như Facebook, Youtube, Twitter đều có REST API. Thông qua các Rest API này, ta có thể viết web , mobile app để truy cập dữ liệu Facebook, Youtube, … mà không cần quan tâm đến ngôn ngữ sử dụng . Cơ chế hoạt động của Facebook Bot Cơ chế hoạt động của Facebook Bot cũng khá đơn giản, không khác em gái mình miêu tả phía trên là mấy. Đầu tiên, ta đưa 1 địa chỉ webhook (lan can) cho Facebook. Khi có người gửi tin nhắn đến bot, facebook POST thông báo (ném tờ giấy) đến webhook của chúng ta để ta tiếp tục xử lý. Sau khi xử lý xong, nếu muốn reply lại người dùng, ta gửi tin cho RestAPI (em hầu gái) của Facebook. Nhận được tin, bot sẽ trả lời lại cho người dùng. Nắm vững cơ chế hoạt động trên, bạn có thể viết 1 con bot Facebook bằng bất cứ ngôn ngữ nào bằng cách thực hiện 2 bước sau: Ở bài viết sau, mình sẽ hướng dẫn các bạn cách tạo trang fanpage, tạo ứng dụng và bắt đầu viết code nhé. Các bạn nhớ đón xem. Rate this: Like this: Related
1 or 2 months ago, Facebook just launched the Facebook Messenger Platform, allowing us to write a bot that automatically responds to users. Being passionate about technology, I was curious to try writing one. You can try chatting with the bot at: m.me/toidicodedao, or watch the demo video here. As promised to you on Facebook, if I get more than 100 likes, I will post instructions on how to write a bot. I'm a bit lazy, but who would have thought that in just over 30 minutes, it already had 100 likes, knowing that I could set 300 likes. If you promise, then write it. Although NodeJS currently has a botkit available to write bots, if you only focus on using libraries and ready-made foods, you won't learn anything. In addition, not all of you know how to use NodeJS, so I will write an article explaining the mechanism, how to write a bot from scratch to how to deploy. As long as you understand the mechanism, you can use C#, Java, Python, ... to write bots. The series includes 3 parts: To understand how Facebook Bot works, you need to understand 2 concepts: Webhooks and RestAPI. Webhooks and RestAPI were created to solve a problem: How can two programs written in two separate languages ​​communicate with each other. What are webhooks? Imagine you are a young working man with a wife and children to take care of. One day, a very beautiful blonde French girl with big breasts moved near your house. That girl's house is surrounded by high walls and gates, with two German Shepherd dogs fiercely guarding it; Your house is no better, there is an old wife guarding it. You really want to ask that girl out but don't know how. Feeling so confused, my friends went to the railing and put up a sign: "Looking for someone to watch a movie with. If anyone wants to go, please throw in the meeting time and place." Luckily, seeing that her friend was handsome, the other girl was also interested, wrote a note with the time and place of meeting and threw it over the railing of her friend's house. Picking up the piece of paper, you start planning to lie to your wife so you can go out and have fun. If it is said that you and your French sister are two different programs, then here Webhook is the railing, the thing that helps two people connect with each other. In theory, a webhook is an HTTP callback. In code, when you pass a callback into a function, it means "I'll give you this function. When it's available, call that function and let me know." Webhooks are similar, but via HTTP POST. The example can be explained as follows: Slack can integrate many services thanks to webhooks. Suppose when you commit code to Git, git will send a POST request to Slack's webhook at: . Slack will read this webhook and process it (Build code, store it in the database). What is RestAPI? Back to the story of the blonde French girl with big breasts. When you receive the paper, you are very happy but don't know how to tell her. She doesn't know Vietnamese, and you don't know French either. Fortunately, she was a young lady, so the family had a servant who knew English. You send a piece of paper to the servant, asking him to inform her of the meeting location. The appointment was a success. The two went out to eat, watch movies, and then found a quiet, private place to rest. Neither a German Shepherd nor an old wife can separate a couple's love. Here, you are a C# program, and she is writing in Java. The servant here is her RestAPI, using English (HTTP protocol) to help you two communicate with each other. Thanks to RestAPI, two programs written in two different languages ​​can communicate and access each other's data. There have been quite a few articles about REST so I won't repeat it again. If you want to learn more, you can google it: What is REST API? . Currently, famous applications such as Facebook, Youtube, Twitter all have REST API. Through these Rest APIs, we can write web and mobile apps to access data on Facebook, Youtube,... without caring about the language used. Facebook Bot's operating mechanism The Facebook Bot's operating mechanism is also quite simple, not much different from what my sister described above. First, we give a webhook address (rail) to Facebook. When someone sends a message to the bot, Facebook POSTs the notification (throws a piece of paper) to our webhook for us to continue processing. After processing, if we want to reply to the user, we send a message to Facebook's RestAPI (maid). Upon receiving the message, the bot will reply back to the user. Mastering the above operating mechanism, you can write a Facebook bot in any language by performing the following 2 steps: In the following article, I will guide you how to create a fanpage, create an application and Let's start writing code. You remember to watch. Rate this: Like this: Related
Cách đây khá lâu, mình đã có một bài viết tổng quát về SOLID Principle , những nguyên lý thiết kế OOP. Nhắc lại một chút cho các bạn đã quên. Đây là những nguyên lý được đúc kết bởi máu xương vô số developer, rút ra từ hàng ngàn dự án thành công và thất bại. Một project áp dụng những nguyên lý này sẽ có code dễ đọc, dễ test, rõ ràng hơn. Và việc quan trọng nhất là việc maintainace code sẽ dễ hơn rất nhiều . Nắm vững những nguyên lý này, đồng thời áp dụng chúng trong việc thiết kế + viết code sẽ giúp bạn tiến thêm 1 bước trên con đường thành senior nhé (1 ông senior bên FPT Software từng bảo mình thế). SOLID bao gồm 5 nguyên lý dưới đây: Giới thiệu Đây là bài viết đầu tiên trong series “SOLID cho thanh niên cứng”. Các nguyên lý SOLID này khá hữu ích, nhưng mình không thấy được dạy ở các trường . Ở mỗi bài viết, mình sẽ phân tích rõ hơn về các nguyên lý này, kèm theo code minh họa. Hi vọng chúng sẽ giúp các bạn hiểu rõ hơn và áp dụng nguyên lý này vào code. Ở bài viết đầu tiên, mình sẽ nói về Single Responsibility Principle – Nguyên lý Đơn Trách Nhiệm. Nội dung nguyên lý: Giải thích nguyên lý Ta có thể tạm hiểu “trách nhiệm” ở đây tương đương với “chức năng”. Tại sao một class chỉ nên giữ một chức năng duy nhất?? Để hiểu điều này, hãy nhìn vào hình dưới. Hãy xem con dao trong hình như một class với rất nhiều chức năng. Con dao này “có vẻ” khá là tiện dụng, nhưng lại cồng kềnh và nặng nề. Đặc biệt, khi có một bộ phận bị hư hỏng, ta phải tháo nguyên con dao ra để sửa. Việc sửa chữa và cải tiến rất phức tạp, có thể ảnh hưởng tới nhiều bộ phận khác nhau. Một class có quá nhiều chức năng cũng sẽ trở nên cồng kềnh và phức tạp . Trong ngành IT, requirement rất hay thay đổi , dẫn tới sự thay đổi code. Nếu một class có quá nhiều chức năng, quá cồng kềnh, việc thay đổi code sẽ rất khó khăn , mất nhiều thời gian, còn dễ gây ảnh hưởng tới các module đang hoạt động khác. Áp dụng SRP vào con dao phía trên, ta có thể tách nó ra làm kéo, dao, mở nút chai,… riêng biệt là xong, cái gì hư chỉ cần sửa cái đấy. Với code cũng vậy, ta chỉ cần thiết kế các module sao cho đơn giản, một module chỉ có 1 chức năng duy nhất là xong (Nói vậy chứ việc xác định, gom nhóm chức năng không hề dễ đâu nhé). Ví dụ minh họa Đoạn code dưới đây là ví dụ cho việc vi phạm SRP. Lỗi này hồi mới học code mình cũng hay mắc phải. Class Student có quá nhiều chức năng: chứa thông tin học sinh, format hiển thị thông tin, lưu trữ thông tin. Code như thế thì có làm sao không? Hiện tại thì không sao cả, nhưng khi code lớn dần, thêm chức năng nhiều hơn, class Student sẽ bị phình to ra. Chưa kể, nếu như có thêm các class khác như Person, Teacher v…v, đoạn code hiển thị/lưu trữ thông tin sẽ nằm rải rác ở nhiều class, rất khó sửa chữa và nâng cấp. Để giải quyết, ta chỉ cần tách ra làm nhiều class, mỗi class có một chức năng riêng là xong. Khi cần nâng cấp, sửa chữa, sẽ diễn ra ở từng class, không ảnh hưởng tới các class còn lại. Lưu ý: Không phải lúc nào cũng nên áp dụng nguyên lý này vào code. Một trường hợp hay gặp là các class dạng Helper hay Utilities – các class này vi phạm SRP 1 cách trắng trợn. Nếu số lượng hàm ít, ta vẫn có thể cho tất cả các hàm này vào 1 class, xét cho cùng, toàn bộ các hàm trong helper đều có chức năng xử lý các tác vụ nho nhỏ . Tuy nhiên, khi Helper có thêm nhiều chức năng, nó trở nên phức tạp và cồng kềnh hơn (Bạn mình từng gặp trường hợp một class có tới gần 10000 dòng code). Lúc này, ta cần áp dụng SRP để chia nó thành các module nho nhỏ để dễ quản lý. Lưu ý và kết luận Về bản chất, nguyên lý chỉ là nguyên lý, nó chỉ là hướng dẫn chứ không phải là quy tắc tuyệt đối bất di bất dịch . Nếu tìm hiểu kĩ, các bạn sẽ thấy vẫn có vài lập trình viên mổ xẻ, phản đối, chỉ ra những chỗ chưa ổn của các nguyên lý này. Tuy vậy, việc hiểu rõ chúng vẫn giúp code ta viết ra dễ đọc, dễ hiểu, dễ quản lý hơn. SRP là nguyên lý đơn giản dễ hiểu nhất, nhưng cũng khó áp dụng đúng nhất. Sự khác nhau giữa dev giỏi và dev bình thường là ở chỗ, cả 2 cùng biết về các qui tắc và nguyên lý, nhưng dev giỏi sẽ biết khi nào cần áp dụng, khi nào không . Những nguyên tắc còn lại của SOLID sẽ được giới thiệu ở những bài viết sau nhé. Có thắc mắc hay góp ý gì các bạn cứ thoải mái nêu ra trong phần comment, mình sẽ cố gắng giải đáp. Một số tài liệu để tham khảo thêm: Rate this: Like this: Related
A long time ago, I wrote a general article about SOLID Principle, OOP design principles. A little reminder for those of you who have forgotten. These are the principles summarized by the blood and bones of countless developers, drawn from thousands of successful and failed projects. A project that applies these principles will have code that is easier to read, easier to test, and clearer. And the most important thing is that maintaining the code will be much easier. Mastering these principles and applying them in designing + writing code will help you take one more step on the path to becoming a senior (a senior man at FPT Software once told me so). SOLID includes the following 5 principles: Introduction This is the first article in the series "SOLID for tough young people". These SOLID principles are quite useful, but I don't see them taught in schools. In each article, I will analyze these principles more clearly, accompanied by illustrative code. Hopefully they will help you better understand and apply this principle to code. In the first article, I will talk about the Single Responsibility Principle. Principle content: Explain the principle We can temporarily understand that "responsibility" here is equivalent to "function". Why should a class only hold a single function?? To understand this, look at the picture below. Consider the knife in the picture as a class with many functions. This knife “seems” quite handy, but it is bulky and heavy. In particular, when a part is damaged, we must remove the entire knife to repair it. Repairs and improvements are very complex and can affect many different parts. A class with too many functions will also become cumbersome and complicated. In the IT industry, requirements often change, leading to code changes. If a class has too many functions and is too cumbersome, changing the code will be very difficult, take a lot of time, and can easily affect other active modules. Applying SRP to the knife above, we can separate it into scissors, a knife, a corkscrew,... separately and that's it, whatever is broken just needs to be fixed. The same goes for code, we just need to design the modules to be simple, a module has only one function and that's it (That said, identifying and grouping functions is not easy). Illustrative example The code below is an example of an SRP violation. I often made this mistake when I first learned to code. The Student class has too many functions: containing student information, information display format, and information storage. Is it okay to code like that? Currently, it's okay, but as the code grows larger and adds more functionality, the Student class will expand. Not to mention, if there are other classes such as Person, Teacher, etc., the code displaying/storing information will be scattered across many classes, making it very difficult to repair and upgrade. To solve it, we just need to split it into many classes, each class has its own function and that's it. When upgrading or repairing is needed, it will take place in each class, without affecting the remaining classes. Note: This principle should not always be applied to code. A common case is Helper or Utilities classes - these classes blatantly violate SRP. If the number of functions is small, we can still put all of these functions in one class. After all, all helper functions have the function of handling small tasks. However, when Helper has more functions, it becomes more complicated and cumbersome (My friend once encountered a case where a class had nearly 10,000 lines of code). At this point, we need to apply SRP to divide it into small modules for easy management. Notes and conclusions In essence, a principle is just a principle, it is only a guide, not an absolute, immutable rule. If you look carefully, you will see that there are still some programmers dissecting, objecting, and pointing out the inadequacies of these principles. However, understanding them still helps the code we write to be easier to read, understand, and manage. SRP is the simplest principle to understand, but also the most difficult to apply correctly. The difference between a good dev and an ordinary dev is that both know the rules and principles, but a good dev will know when to apply and when not to apply. The remaining principles of SOLID will be introduced in the following articles. If you have any questions or suggestions, please feel free to ask them in the comment section, I will try to answer. Some documents for further reference: Rate this: Like this: Related
Như mình đã giới thiệu ở một số bài viết trước, lập trình ứng dụng di động đang là một lĩnh vực khá hot mà các lập trình viên nên quan tâm. Theo cách truyền thống (hoặc khi viết native app), bạn cần phải học Java, Objective-C, C# để viết ứng dụng cho Android, iOS, Windows-Phone. Tuy nhiên, nếu viết ứng dụng theo hướng hybrid app , sử dụng một số framework như Cordova, Phonegap, … bạn có thể viết 1 ứng dụng hoàn toàn bằng HTML, CSS và Javascript , chạy được trên cả iOS, Android và Window Phone . Các bạn web developer có thể dễ dàng nhảy qua mảng mobile mà không cần tốn quá nhiều công sức để học ngôn ngữ mới . Trong phạm vi bài viết này, mình sẽ hướng dẫn các bạn tạo, viết và chạy ứng dụng trực tiếp trên di động một cách nhanh và đơn giản với IonicFramework – một framework xây dựng dựa trên AngularJS và Cordova. Ưu điểm của IonicFramework là: Cài đặt rất nhanh và nhẹ. Thay vì phải tải IDE như Android Studio, Xcode cùng với bộ SDK nặng nề, ta chỉ cần tải NodeJS và dùng command prompt để cài ionic và cordova, rất nhanh và tiện lợi. Ta có thể dùng Notepad++ hoặc Sublime Text để code. Chỉ cần biết HTML, CSS, JS và AngularJS . Nếu muốn thêm 1 số chức năng như rung, camera, chỉ cần bỏ 5p để xem API ngCordova là làm được ngay. Tích hợp sẵn IonicViewer, cho phép ta test app vừa viết ngay trên di động , không cần cắm dây hay kết nối phức tạp (Việc debug thì còn hơi phức tạp đôi chút…). Kết hợp với Phonegap Build, ta có thể xuất file apk ngay và luôn. Bắt tay vào làm thôi nào! Nếu chưa biết về AngularJS, bạn có thể google và tìm một số bài viết tiếng Việt, hoặc đọc tutorial trên blog của bạn mình để ủng hộ: 1. Cài đặt Ionic Đầu tiên, bạn vào để tải nodeJS về và cài đặt, nhớ dùng bản 4 nhé , bản 5 chưa hỗ trợ Ionic. Sau khi cài xong, bạn mở cửa sổ console lên, nhập vào: Chờ khoảng 10p, việc cài đặt đã xong rồi đấy. Rất nhanh gọn lẹ phải không nào, chúng ta có thể bắt đầu viết ứng dụng rồi. 2. Tạo ứng dụng đầu tiên Ở đây, mình sẽ tạo ứng dụng vào 1 folder có tên ionicApp. Để tạo ứng dụng, bạn cd vào thư mục, dùng câu lệnh phía dưới để tạo 1 ứng dụng có sẵn tabs. Chờ một chút, ứng dụng sẽ được tạo. Các bạn có thể đọc thêm ở đây: . Để chạy thử, ta chỉ cần cd vào thư mục sampleApp, gõ câu lệnh “ ionic serve” để chạy thử ứng dụng trên nền web . Ta có thể thu nhỏ trình duyệt , hoặc dùng Chrome Developer Tool để xem thử ứng dụng hiển trị như thế nào trên mobile. Nhớ thử touch các tab và scroll lên xuống thử nhé. 3. Chỉnh sửa ứng dụng Toàn bộ code của ứng dụng sẽ nằm trong thư mục . Trông quen quá nhỉ, chỉ có HTML, CSS, Javascript thôi. Mình khuyên các bạn nên dùng Sublime Text để mở toàn bộ thư mục, dễ chỉnh sửa hơn. Do AngularJS sử dụng routing và template, một vài màn hình sẽ được lưu trong thư mục templates . Bạn thử chỉnh sửa file tab-dash.html trong thư mục templates và save lại nhé. Ionic hỗ trợ live reload , khi ta sửa một file, app sẽ tự refresh lại, không cần phải F5 gì cả. 4. Chạy ứng dụng trên di động Tiếp tục ở cửa sổ console thần thánh, ta sử dụng câu lệnh sau để upload app lên server của ionic. Nếu là lần đầu, bạn cần phải tạo một tài khoản và đăng nhập. Ở các lần sau ionic sẽ tự nhớ các thông tin này, bạn chỉ cần sửa app và bấm ionic upload thôi. Sau đó, bạn lên AppStore và tải IonicView về (IOS hay Android đều có cả). Cài đặt app và đăng nhập bằng tài khoản bạn vừa đăng kí nhé. Bạn sẽ thấy app của mình nằm ngay đó sau khi đăng nhập. Click vào và chịch… nhầm, nghịch thôi. Chúc mừng bạn đã hoàn thành bài hướng dẫn này. Ngoài ra, nếu muốn build ứng dụng thành file apk để đăng lên mạng, đưa bạn bè, bạn có 2 lựa chọn: Sử dụng ionic build android , cách này nhanh và đơn giản, nhưng bạn sẽ phải cài 1 đống SDK android khá nặng nề. Sử dụng Git để đưa project lên github , sau đó sử dụng Adobe Phonegap Build để build online. Cách này hơi lòng vòng, nhưng không cần cài đặt làm nặng máy. Đây là một ứng dụng game nhỏ nhỏ mà mình đã viết bằng Ionic, sử dụng Phonegap Build để build ra file apk: Bài viết tới đây là hết. Nếu có thắc mắc hay khó khăn gì, bạn có thể đặt câu hỏi trong phần comment nhé. Chúc các bạn may mắn. Rate this: Like this: Related
As I introduced in some previous articles, mobile application programming is a quite hot field that programmers should pay attention to. Traditionally (or when writing native apps), you need to learn Java, Objective-C, C# to write applications for Android, iOS, Windows-Phone. However, if you write an application in the direction of hybrid app, using some frameworks such as Cordova, Phonegap, ... you can write an application entirely in HTML, CSS and Javascript, running on both iOS, Android and Window Phone. Web developers can easily jump to the mobile segment without spending too much effort learning a new language. Within the scope of this article, I will guide you to create, write and run applications directly on mobile quickly and simply with IonicFramework - a framework built on AngularJS and Cordova. The advantages of IonicFramework are: Installation is very fast and lightweight. Instead of having to download IDEs like Android Studio, Xcode along with a heavy SDK, we just need to download NodeJS and use the command prompt to install ionic and cordova, very fast and convenient. We can use Notepad++ or Sublime Text to code. Just need to know HTML, CSS, JS and AngularJS. If you want to add some functions such as vibration or camera, just spend 5 minutes to view the ngCordova API and you can do it right away. Built-in IonicViewer, allowing us to test the app we just wrote right on the mobile, without needing to plug in wires or complicated connections (Debugging is a bit complicated...). Combined with Phonegap Build, we can export the apk file immediately. Let's get to work! If you don't know about AngularJS, you can google and find some Vietnamese articles, or read the tutorial on your friend's blog to support: 1. Install Ionic First, go to download nodeJS and install, remember Please use version 4, version 5 does not support Ionic yet. After installation is complete, open the console window and enter: Wait about 10 minutes, the installation is complete. Very quick, right? We can start writing applications. 2. Create the first application Here, I will create the application in a folder called ionicApp. To create an application, cd into the folder, use the command below to create an application with tabs available. Wait a moment, the application will be created. You can read more here: . To test run, we just need to cd to the sampleApp folder, type the command “ionic serve” to test the web-based application. We can minimize the browser, or use Chrome Developer Tool to see how the application displays on mobile. Remember to try touching the tabs and scrolling up and down. 3. Edit the application All application code will be in the . It looks so familiar, it's just HTML, CSS, Javascript. I recommend that you use Sublime Text to open the entire folder, making it easier to edit. Since AngularJS uses routing and templates, some screens will be saved in the templates folder. Try editing the tab-dash.html file in the templates folder and save it. Ionic supports live reload, when we edit a file, the app will refresh itself, no need to F5 anything. 4. Run the mobile application. Continuing in the console window, we use the following command to upload the app to ionic's server. If it's your first time, you'll need to create an account and log in. Next time ionic will automatically remember this information, you just need to edit the app and click ionic upload. Then, go to AppStore and download IonicView (both available for iOS or Android). Install the app and log in with the account you just registered. You will see your app right there after logging in. Click and fuck... wrong, just play around. Congratulations on completing this tutorial. In addition, if you want to build the application into an apk file to post online or share with friends, you have 2 options: Use ionic build android, this method is fast and simple, but you will have to install a bunch of Android SDKs which is quite heavy. Use Git to upload the project to github, then use Adobe Phonegap Build to build online. This method is a bit roundabout, but it doesn't require heavy settings. This is a small game application that I wrote in Ionic, using Phonegap Build to build the apk file: This article ends here. If you have any questions or difficulties, you can ask in the comment section. Good luck. Rate this: Like this: Related
Kế từ lúc mình đăng bài viết mừng blog đạt mốc 100k view ,tính ra đã được hơn nửa năm rồi. Nhờ sự ủng hộ của các bạn đọc gần xa, nay blog đã đạt mốc 500k view sau hơn 1 năm tính từ ngày bắt đầu (Và khoảng 70k lượt view mỗi tháng). Bài viết này là lời cảm ơn mình gửi đến mọi người, cũng như chia sẻ một số định hướng sau này của bản thân và blog. Lời cảm ơn từ Tôi Đi Code Dạo Từ tháng 10, mình thành lập trang fanpage để đưa blog đến nhiều độc giả hơn, đồng thời tạo kênh giao lưu và giải đáp thắc mắc cho các bạn: .Hiện tại, fanpage cũng đã đạt 2k5 lượt like. Mỗi ngày mình đều chọn lựa 1 bài viết hay và đăng trên fanpage nên các bạn chỉ cần nhấn Like trang có thể xem được bài viết hay mỗi ngày nhé. Mình xin chân thành cảm ơn mọi người , nếu không có sự quan tâm theo dõi cũng như góp ý của các bạn đọc, blog và fanpage sẽ không thể phát triển nhanh như hiện tại. Mục đích ban đầu của mình là chia sẻ những kinh nghiệm technical , cũng như phát triển sự nghiệp . Blog lớn mạnh hơn đồng nghĩa với việc kiến thức mình chia sẻ đến được với nhiều bạn hơn. Hi vọng rằng trong tương lai các bạn vẫn sẽ tiếp tục quan tâm blog, chia sẻ những bài viết trên blog. Mong rằng bài viết của mình + sự chia sẻ của các bạn sẽ tiếp tục có ích cho các bạn sinh viên, cũng như giúp nâng cao nhận thức cho các developer khác (Có bài này hay này, các bạn share để mọi người hiểu ngành mình hơn nhe: Thay lời muốn nói – gởi tới những người thân yêu của mỗi lập trình viên ). Định hướng phát triển blog Như mình đã chia sẻ vào cuối năm ngoái, năm nay mình sẽ tập trung hơn vào phát triển kĩ năng front-end . Do đó, mình có viết một số bài về Javascript , chia sẻ kiến thức về sự sida của nó: JavaScript sida . Cũng khá may mắn là từ tháng 2, sau khi phỏng vấn thì mình cũng xin được việc code dạo bên này. Hiện tại team đang phát triển một ứng dụng mobile, sử dụng Nodejs, React và một số công nghệ front-end như Gulp, Webpack. Cũng nhờ vậy mà kiến thức front end của mình cũng được cập nhật khá đầy đủ, không bị lạc hậu. Hiện tại thì blog vẫn giữ nguyên tiến độ 2 bài/tuần vào thứ 3 và thứ 5. Để cân bằng giữa technical và nghề nghiệp , thứ 3 sẽ là bài viết về kĩ thuật, thứ 5 sẽ là bài viết về nghề nghiệp/phát triển bản thân. Sắp tới, blog sẽ tăng tính tương tác với bạn đọc bằng một số event mới: Live trên Facebook để chia sẻ kinh nghiệm/giải đáp thắc mắc (Có khách mời là 1 số senior developer của các công ty khác), tổ chức một số khóa học online miễn phí (dạy bởi Tôidicodedao, số lượng có hạn). Mong các bạn tiếp tục đón xem và ủng hộ blog nhé. Đôi lời tâm sự và chia sẻ Từ khi bắt đầu gõ những dòng đầu tiên, mình chỉ muốn tạo dựng một blog nho nhỏ để chia sẻ những kiến thức nho nhỏ có được trong quá trình học tập và làm việc. Mình không nghĩ rằng một ngày nào đó blog sẽ có 1 lượng độc giả trung thành và đông đảo như hôm nay. Một lần nữa, xin cảm ơn tất cả các bạn . Những góp ý, phản hồi của các bạn đã giúp mình định hướng blog, giúp nó trở nên có ích đến nhiều độc giả hơn. Những lời động viên, khích lệ của mọi người cũng giúp mình rất nhiều, làm mình tự tin hơn trên con đường mình chọn. Trong khoảng thời gian sắp tới, mình sẽ hơi bận rộn do phải tập trung làm luận văn + project . Tuy vậy mình vẫn sẽ cố gắng giữ tiến độ 2 bài viết/tuần để đáp ứng nhu cầu của các bạn đọc nhé, thương các bạn nhiều ;). Để những lời cảm ơn không chỉ là nói suông, blog sẽ tăng cường việc tiếp nhận góp ý để phát triển. Các bạn hãy đánh giá, góp ý cho blog, chia sẻ những thay đổi mình muốn thấy và những công nghệ mình đang muốn học qua link sau: Góp ý . Mình sẽ xem xét toàn bộ những góp ý này để nâng cao chất lượng bài viết, giúp các bạn có những bài viết hay hơn để đọc, để chia sẻ với bạn bè nhé. Rate this: Like this: Related
Since I posted the article celebrating the blog reaching the milestone of 100k views, it has been more than half a year. Thanks to the support of readers near and far, the blog has now reached the milestone of 500k views after more than 1 year from the start date (And about 70k views per month). This article is a thank you to everyone, as well as sharing some future directions for myself and the blog. Thank you from Toi Go Coding Since October, I established a fanpage to bring the blog to more readers, and create a channel to exchange and answer questions for you: .Currently, the fanpage has also reached 2k5 likes. Every day I choose a good article and post it on the fanpage, so you just need to click Like on the page to see the good article every day. I would like to sincerely thank everyone, without the attention and comments from readers, the blog and fanpage would not be able to develop as quickly as they are now. My initial purpose is to share technical experiences, as well as develop my career. A bigger blog means the knowledge I share can reach more people. Hopefully in the future you will continue to pay attention to the blog and share articles on the blog. I hope that my article + your sharing will continue to be useful for students, as well as help raise awareness for other developers (There is this good article, please share so everyone can understand the industry. I'm better: Instead of saying this - send it to the loved ones of every programmer. Blog development orientation As I shared at the end of last year, this year I will focus more on developing front-end skills. Therefore, I have written some articles about Javascript, sharing knowledge about its benefits: JavaScript benefits. Luckily, in February, after the interview, I also got a coding job here. Currently the team is developing a mobile application, using Nodejs, React and some front-end technologies such as Gulp, Webpack. Thanks to that, my front end knowledge is also fully updated and not outdated. Currently, the blog still maintains the same schedule of 2 articles/week on Tuesday and Thursday. To balance technical and career, Tuesday will be technical articles, Thursday will be career/development articles. develop yourself. In the near future, the blog will increase interaction with readers with a number of new events: Live on Facebook to share experiences/answer questions (There are guests who are some senior developers from other companies), organize a Number of free online courses (taught by Idicodedao, limited quantity). Hope you continue to watch and support the blog. A few words of confidence and sharing Since I started typing the first lines, I just wanted to create a small blog to share the little knowledge I have gained during the process of studying and working. I didn't think that one day the blog would have a loyal and large number of readers like today. Once again, thank you all. Your comments and feedback have helped me orient the blog, making it more useful to more readers. Everyone's words of encouragement also help me a lot, making me more confident on the path I choose. In the near future, I will be a bit busy because I have to focus on writing my thesis + project. However, I will still try to keep the schedule of 2 articles/week to meet the needs of readers, I love you very much ;). So that the words of thanks are not just empty words, the blog will increase the reception of comments for development. Please rate and comment on the blog, share the changes you want to see and the technologies you want to learn through the following link: Comment. I will consider all of these suggestions to improve the quality of the article, helping you have better articles to read and share with friends. Rate this: Like this: Related
Ý tưởng viết bài này chợt nảy sinh khi mình đang xem mấy bé Idol Nhật mặc quần tam giác uốn éo khoe dáng trong hồ bơi, … nhầm, khi đang xem một khóa học ngắn mà hay về phát triển bản thân/xây dựng hình ảnh cho developer trên Pluralsight . Qua bài viết, bạn sẽ rút ra được cho mình hướng xây dựng phát triển hình ảnh bản thân nhé. Từ Tam Giác Nhanh Rẻ Tốt Trước tiên, ta hãy cùng nhìn lại một chút về Tam Giác Nhanh Rẻ Tốt . Tam giác này mô tả 3 khía cạnh của một dịch vụ/sản phẩm. Ba khía cạnh này liên quan và đối nghịch với nhau, không thể để đạt được cùng lúc 3 yếu tố. Nếu Nhanh và Rẻ thì chất lượng không được Tốt Nếu Nhanh và Tốt thì giá cả không được Rẻ Nếu Tốt và Rẻ thì tốc độ không được Nhanh Cho tới quần Tam Giác của Developer Dựa theo tam giác trên, ta có thể dựng nên một tam giác tương tự về hình tượng bản thân của một developer (Developer Image Triangle). Tam giác này gồm 3 cạnh như sau: Hòa đồng với nhóm, kĩ năng ngoại giao tốt Đảm bảo chất lượng công việc + kĩ năng technical Hoàn thành công việc đúng hạn Cũng như tam giác Nhanh Rẻ Tốt, rất khó để tập trung phát triển cả 3 khía cạnh này vì đôi khi chúng đối lập với nhau (VD như khi deadline gần đến, cần hoàn thành công việc nhanh thì chất lượng code không thể đảm bảo được). Thế nhưng để dễ dàng phát triển bản thân, thăng tiến trên sự nghiệp , bạn cần cân bằng cả 3, thay vì chỉ tập trung vào 2 khía cạnh . Cùng phân tích thử nếu bạn chỉ tập trung vào 2 khía cạnh thì sẽ như thế nào nhé: Hòa đồng với team + chất lượng công việc : Trong mắt các thành viên trong team, bạn là người hòa đồng vui vẻ. Với kĩ năng code cứng , lại thân thiện, bạn được mọi người nể trọng và là người bạn, người thầy để mọi người học hỏi kiến thức và kinh nghiệm . Tuy nhiên, do không đảm bảo được công việc đúng hạn, bạn thường khó nhận được đánh giá cao từ các cụ quản lý. Chất lượng công việc + hoàn thành đúng hạn : Sở hữu kĩ năng technical siêu đẳng, tập trung hoàn thành công việc đúng hạn, bạn là người lèo lái và gánh team . Tuy nhiên, do không có kĩ năng ngoại giao, hòa đồng nên bạn khó làm việc nhóm (Dù mọi người vẫn sẽ nể bạn vì khả năng technical và năng suất làm việc). Quản lý vẫn đánh giá cao bạn, nhưng sẽ khuyên bạn phấn đấu cho các vị trí thiên về kĩ thuật nhiều hơn. Một ví dụ điển hình là bạn K trong bài viết code là cách ngu nhất để giải quyết vấn đề . Hòa đồng với team + hoàn thành đúng hạn : Quản lý sẽ rất khoái bạn vì bạn luôn hoàn thành công việc đúng hạn, lại giỏi ngoại giao và hòa đồng. Bạn cũng được lòng các thành viên trong nhóm. Tuy nhiên, do chất lượng không được đảm bảo, về lâu dài bạn sẽ làm chất lượng code của dự án đi xuống, mấy lão technical cứng cũng sẽ không ưa bạn . Nhắc lại một lần nữa điều mình muốn nói nhé Một số bạn junior vừa ra trường , thiếu kinh nghiệm thường phạm phải sai lầm là chỉ tập trung vào 1 khía cạnh (quá tập trung vào technical, hoặc chỉ chăm chăm làm cho xong để hoàn thành tiến độ công việc). Trong mắt thành viên nhóm, bạn sẽ dễ trở thành một thợ code hoặc coder nhanh nhảu đoảng . Dĩ nhiên, việc cân bằng cả 3 khía cạnh là chuyện nói dễ hơn làm. Một developer giỏi sẽ biết những lúc nào cần hi sinh khía cạnh này để bổ sung vào khía cạnh khác. Ví dụ: Khi dự án đang cần release gấp, ta phải giảm chất lượng code để tập trung vào làm việc đúng hạn. Khi có thành viên mới vào team, ta phải giảm tốc độ để hướng dẫn thành viên mới, giữ chất lượng code. Khi cần đưa ra một quyết định khẩn cấp trong dự án, đôi khi ta phải bỏ qua ý kiến của thành viên khác. Trên đây là những điều bản mình rút ra được sau khi xem xong khóa học trên, các bác developer lâu năm có thể vào góp ý bổ sung thêm. Nếu muốn xem toàn bộ khóa học, các bạn có thể đăng 1 tài khoản Microsoft để lấy 6 tháng Pluralsight miễn phí nhé! Bản gốc khóa học ở đây: Rate this: Like this: Related
The idea of ​​writing this article suddenly arose when I was watching some Japanese Idols wearing triangle pants flexing and showing off their figures in the swimming pool,... mistakenly, while watching a short but interesting course on self-development/image building. for developers on Pluralsight. Through the article, you will learn for yourself the direction to build and develop your self-image. From the Fast Cheap Cheap Good Triangle First, let's look back a bit at the Fast Cheap Cheap Good Triangle. This triangle describes 3 aspects of a service/product. These three aspects are related and opposed to each other, it is impossible to achieve all three elements at the same time. If it's Fast and Cheap, the quality isn't Good If it's fast and good, the price won't be cheap If it's Good and Cheap, the speed isn't Fast Until the Developer's Triangle Based on the above triangle, we can build a similar triangle about the self-image of a developer (Developer Image Triangle). This triangle consists of 3 sides as follows: Get along well with the team, good diplomacy skills Ensuring work quality + technical skills Complete work on time Just like the Fast, Cheap, and Good triangle, it is difficult to focus on developing all three aspects because sometimes they contradict each other (for example, when the deadline is near and you need to complete the work quickly, code quality cannot be guaranteed). Okay). However, to easily develop yourself and advance your career, you need to balance all three, instead of just focusing on two aspects. Let's analyze what it would look like if you only focused on 2 aspects: Get along with the team + quality of work: In the eyes of team members, you are a happy, sociable person. With hard coding skills and friendliness, you are respected by everyone and are a friend and teacher for everyone to learn from knowledge and experience. However, because you cannot ensure the work is done on time, it is often difficult for you to receive high evaluations from managers. Quality of work + completion on time: Possessing superior technical skills, focusing on completing work on time, you are the one who drives and carries the team. However, because you do not have diplomatic or sociable skills, it is difficult for you to work in groups (although people will still respect you for your technical ability and productivity). Management still appreciates you, but will advise you to strive for more technical positions. A typical example is K in the article code is the stupidest way to solve a problem. Get along with the team + complete on time: Your manager will really like you because you always complete your work on time and are good at diplomacy and sociability. You are also popular with group members. However, because quality is not guaranteed, in the long run you will make the project's code quality go down, and even the hard-core technical guys will not like you. Let me repeat what I want to say. Some juniors who have just graduated and lack experience often make the mistake of focusing on only one aspect (too focused on technical skills, or just focusing on getting things done to complete the task). into work progress). In the eyes of team members, you will easily become a coder or a fast-talking coder. Of course, balancing all three aspects is easier said than done. A good developer will know when to sacrifice one aspect to add to another. For example: When the project needs to be released urgently, we have to reduce code quality to focus on working on time. When a new member joins the team, we have to slow down to guide new members and maintain code quality. When we need to make an urgent decision in a project, sometimes we have to ignore the opinions of other members. Above are the things I learned after watching the above course. Veteran developers can comment and add more. If you want to watch the entire course, you can register a Microsoft account to get 6 months of Pluralsight for free! The original course is here: Rate this: Like this: Related
Tóm tắt nội dung bài viết Phần 2 – Lựa chọn thật ra không quan trọng, học một ngôn ngữ mới là chuyện đơn giản Đọc tới đây, có lẽ nhiều bạn sẽ quăng bom, ném gạch mình tới tấp “dám chắc thằng chủ thớt không phải coder, phán như thánh”. Trước khi ném đá, mong các đồng chí bình tĩnh nghe Hoàng giải thích trình bày. Mình cũng từng là sinh viên IT như các bạn. Môn đầu tiên về lập trình mình học khi vào Đại Học là: “Cơ bản lập trình với C”. Mình từng điên đầu với khai báo biến, tách hàm, điều kiện, vòng lặp ,IO…. Môn tiếp theo là “Lập trình hướng đối tượng với C++”. Phải thú thật C++ không phải là ngôn ngữ phù hợp để học hướng đối tượng (Lẽ ra nên dùng Java hay C#). Mình từng nhầm lẫn trước các khái niệm “tính bao đóng, tính kế thừa”. Do đó, bản thân mình cũng biết sự khó khăn gặp phải khi học 1 ngôn ngữ. Tuy vậy, mình vẫn khẳng định học một ngôn ngữ mới là chuyện đơn giản. Vì sao? Hãy tự xem lại kiến thức lập trình bạn có được khi vừa ra trường: Học qua 1,2 ngôn ngữ gì đó Cấu trúc dữ liệu và thuật toán Thiết kế, truy vấn cơ sở dữ liệu Design pattern (Có thể) Khả năng design front end ….. Khi mới tiếp cận lập trình, chúng ta cảm thấy khó khăn vì phải làm quen với vô số khái niệm mới. Tuy nhiên, khi đã có kiến thức cơ bản, việc tiếp cận ngôn ngữ mới trở nên rất dễ dàng . Bạn có thể tự hỏi, mình học gì khi học 1 ngôn ngữ mới? Đây là câu trả lời: Cách khai báo hàm, biến Cách khai báo vòng lặp, điều kiện if/else Các kiểu cấu trúc dữ liệu: list, set, tuple, … IO, multi-thread, delegate, event IDE phù hợp, cách build, debug Các framework, cách sử dụng, …. Nếu bạn đã biết cách viết for, if/else, while … trong Java, khi chuyển qua học C# hoặc javascript, cấu trúc hàm for, if/else… vẫn giữ nguyên. Kiến thức của bạn được kế thừa từ ngôn ngữ lập trình trước, do đó việc học sẽ diễn ra nhanh hơn. Hoặc khi bạn đã rõ cơ chế làm việc của ASP.NET RestAPI, việc học cách xây dựng RestAPI bằng Spring của Java cũng không quá khác biệt. Mình từng tự học Python mất 1 tuần, và học framework Django mất khoảng 2 tuần nữa. Lý do mình học nhanh vậy là vì: Mình đã có kiến thức cơ bản về lập trình (class, data structure ….) Mình biết những gì mình cần học. Khi mới lập trình, bạn không biết mình cần học gì. Tuy nhiên nếu đã có kiến thức nói chung về lập trình, bạn sẽ biết mình tập trung học những gì, điều này tiết kiệm rất nhiều thời gian. Mình biết là mình làm được. Khi mình hỏi bạn bè chung ngành “Học 1 ngôn ngữ mới mất bao lâu”, hầu hết đều trả lời “1 tháng hoặc hơn”. Vì thấy tốn nhiều thời gian + khó khăn như vậy nên hầu như họ rất “ngại” học ngôn ngữ mới . Điều mình muốn nhắn nhủ với các bạn qua bài viết này: Đừng sợ mình sẽ chọn nhầm ngôn ngữ, cứ học đi. Việc học 1 ngôn ngữ mới khi bạn đó có kiến thức cơ sở khá đơn giản, không hề khó khăn và mất thời gian như bạn nghĩ. Thêm vào đó, việc biết nhiều ngôn ngữ sẽ giúp bạn có lợi thế hơn khi xin việc =)). Hẹn gặp lại các bạn trong phần cuối : Lời khuyên của bản thân Hoàng. Rate this: Like this: Related
Summary of the article's content Part 2 - The choice is not really important, learning a new language is simple. Reading this, many of you will probably bomb and criticize me "are you sure the OP isn't?" must coder, speak like a saint". Before throwing stones, please calmly listen to Hoang's explanation. I was also an IT student like you. The first programming subject I learned when entering University was: "Basic programming with C". I used to be crazy about variable declarations, function separation, conditions, loops, IO... The next subject is "Object-oriented programming with C++". Admittedly, C++ is not a suitable language to learn object orientation (Should have used Java or C#). I used to be confused by the concepts of "encapsulation and inheritance". Therefore, I myself also know the difficulty I encounter when learning a language. However, I still affirm that learning a new language is simple. Why? Take a look at the programming knowledge you gained when you just graduated: Learn 1 or 2 languages Data structures and algorithms Design and query the database Design pattern (Possible) Ability to design front end….. When we first approach programming, we find it difficult because we have to get used to countless new concepts. However, once you have basic knowledge, accessing a new language becomes very easy. You may wonder, what do I learn when I learn a new language? Here is the answer: How to declare functions and variables How to declare loops and if/else conditions Data structure types: list, set, tuple, ... IO, multi-thread, delegate, event Suitable IDE, how to build and debug Frameworks, how to use, .... If you already know how to write for, if/else, while... in Java, when you switch to learning C# or javascript, the function structure for, if/else... remains the same. Your knowledge is inherited from the previous programming language, so learning will happen faster. Or once you understand the working mechanism of ASP.NET RestAPI, learning how to build RestAPI using Java's Spring is not too different. I once taught myself Python in 1 week, and learning the Django framework took about 2 weeks. The reason I learn so quickly is because: I have basic knowledge of programming (class, data structure...) I know what I need to learn. When you're new to programming, you don't know what you need to learn. However, if you already have general knowledge about programming, you will know what to focus on learning, which saves a lot of time. I know I can do it. When I asked my friends in the same industry, "How long does it take to learn a new language", most of them answered "1 month or more". Because they find it so time consuming + difficult, they are almost "afraid" to learn a new language. What I want to tell you through this article: Don't be afraid that you will choose the wrong language, just keep learning. Learning a new language once you have basic knowledge is quite simple, not as difficult or time-consuming as you think. In addition, knowing multiple languages ​​will give you an advantage when applying for a job =)). See you in the final part: Advice from Hoang himself. Rate this: Like this: Related
Gần đây, do mình bận việc học hành và làm thêm nên không có thời gian rảnh để lên stackoverflow farm rep nữa. Tuy vậy mình vẫn giữ thói quen vào quora để theo dõi những bài hỏi đáp về Software Engineer và Computer Science . Khác với stackoverflow chủ yếu tập trung vào code, những câu hỏi trên quora có phạm vi rộng hơn rất nhiều, bao gồm đủ mọi lĩnh vực đời sống. Bản thân mình khuyên các bạn nên ít lướt facebook lại để chuyển qua đọc quora. Thay vì xem gái xinh, clip 18+, xem các thanh niên cãi nhau về việc Trấn Thành dắt Tiến Đạt vào nhà nghỉ, việc đọc các câu hỏi trên quora bổ ích và thú vị hơn nhiều. Thành viên trong quora thuộc đủ mọi thành phần, từ Junior Developer cho tới Software Architect , CTO. Những câu trả lời, lời khuyên của họ vô cùng chi tiết và hữu ích, đôi khi còn dí dóm nữa (Điển hình là 2 bài viết về “ Mánh khóe không bao giờ tiết lộ của dev trùm ” và “ comment bá đạo “). Bài viết hôm nay sẽ nói về những sai lầm ta hay phạm phải khi bước những bước đầu tiên trên con đường lập trình . Để trưởng thành hơn trên con đường phát triển bản thân , phát triển sự nghiệp, ta cần phải học hỏi không ngừng. Có một câu danh ngôn khá hay là: “Hãy học từ sai lầm của người khác. Bạn sẽ không bao giờ sống đủ lâu để phạm phải tất cả sai lầm.” Những sai lầm này được chia sẻ bởi các lập trình viên trên quora, cùng với một phần trải nghiệm cá nhân mình. Hi vọng chúng sẽ là hành trang có ích cho những bạn lập trình viên còn “non trẻ”. Về chuyên môn lập trình Có thể tóm gọn các sai lầm này trong “ 5 chữ Éo ” và “ 4 chữ Thích “. Éo quan tâm đến tên hàm, tên biến : Giữ thói quen từ khi ra trường , nhiều bạn chỉ đặt tên biến kiểu x1, x2. Rất ngắn gọn và dễ hiểu nhưng đọc … éo hiểu gì. Éo quan tâm đến cấu trúc code : Code chỉ cần chạy được là xong, còn cấu trúc code rối như đống giẻ lau cũng mặc. Éo quan tâm đến bảo mật: Nghĩ rằng bảo mật là chuyện của bọn hạ tầng IT, mình chỉ lo code tính năng thôi. (Điển hình là các bạn coder bên Lotte Cinema ). Éo quan tâm đến testing : Code chạy đúng một trường hợp chính là được, mấy case còn lại thì kệ nó, không cần phải test thử, cho bọn tester làm. Éo quan tâm đến performance : Không sử dụng cấu trúc dữ liệu hợp lý, không optimize code. Thích code theo phong cách phức tạp lòng vòng, hoặc thông minh nhưng … khó hiểu. Thích cắm đầu ngay vào code cả khi chưa biết rõ requirement hay business logic: Chưa xác định được vấn đề đã cắm đầu code tìm hướng giải quyết. Thích một ngôn ngữ / công nghệ đến mức mù quáng , lúc nào cũng nghĩ nó là nhất . Thích code lại từ đầu , tạo ra cái mới mà không quan tâm đến những cái đã có để tiết kiệm thời gian, công sức, tiền bạc. Về định hướng phát triển Có thể tóm gọn các sai lầm này trong “ 5 chữ Không ” và “ 4 chữ Luôn “. Không bao giờ đọc sách technical hoặc tìm hiểu ngôn ngữ/công nghệ mới. Không bao giờ đọc blog lập trình để học hỏi, tìm hiểu các xu thế mới. Không quan tâm đến sức khỏe bản thân : Cày game, uống rượu, code thâu đêm suốt sáng. Không bao giờ đào sâu nghiên cứu , chỉ học hời hợt những thứ bề mặt để hoàn thành công việc. Không quan tâm tới việc xây dựng quan hệ , tạo dựng hình ảnh , hay phát triển sự nghiệp . Luôn tập trung vào chỉ project của mình làm, không quan tâm đến tình hình công ty hay các team khác. Luôn trông chờ vào việc team leader/quản lý sẽ định hướng nghề nghiệp, cất nhắc mình: Quản lý có nhiều việc phải làm và nhiều nhân viên cần quản lý, rất khó để học có thời gian chăm chút định hướng cho một cá nhân. Luôn thích làm việc với những đứa “dốt” hơn mình để dễ cầm đầu: Muốn giỏi hơn, cần phải làm việc với những người giỏi hơn mình, bị ăn chửi hàng ngày mới khá lên được. Luôn sống trong “comfort zone” , chỉ làm những việc mình đã giỏi/đã biết, không muốn mở rộng những kĩ năng đã có. (Xưa mình từng nghe có 1 chị senior C# 6 năm maintainance WinForm, phỏng vấn vào ASWIG và rớt vì… không biết MVC). Về thái độ làm việc Giữ thái độ cao ngạo và biết tuốt : Có thể gặp ở các bạn sinh viên trường ngon, tốt nghiệp loại giỏi (Mình chỉ nghe 1 số bác kể lại thôi, bạn nào sinh viên trường ngon, tốt nghiệp loại giỏi mà không có thái độ này thì cứ nghĩ “chắc thằng code dạo nó chừa mình ra”). Tỏ thái độ khi có người góp ý cho design/code của mình: Tương tự cái ở trên. Kĩ năng code chỉ là một phần, quan trọng phải là “thái độ”. Giữ bo bo kiến thức cho mình , không chia sẻ vì sợ bọn đồng nghiệp sẽ giỏi hơn: Hồi xưa đi học mình cũng hay thế, giờ đi làm đỡ rồi, nên các bạn mới có blog này mà đọc đấy :)). Luôn trông chờ được giao việc tận tay , chỉ làm những việc được giao cho làm: Để thăng tiến, bạn cần năng nổ, active hơn. Ví dụ nếu xong task sớm có thể chủ động bảo anh leader “để em phụ anh senior refactor và đưa code lên CI sau này dễ build”…. Luôn tuân thủ tuyệt đối mệnh lệnh của quản lý, team leader, senior mà không hỏi nguyên do: Cấp trên, senior chưa chắc lúc nào cũng đúng. Tranh luận, phản bác đúng cách sẽ làm họ coi trọng mình hơn (Nhưng nhớ để ý thái độ, đừng tỏ ra hổ báo hay thể hiện). Khi đi hỏi người khác, không xác định được vấn đề cần hỏi mà chỉ đặt câu hỏi mơ hồ chung chung , gây khó khăn cho cả người hỏi lẫn người trả lời. Chỉ chăm chăm nhờ người khác làm giúp, trả lời giúp : Gặp chút khó khăn là lên facebook để nhờ người khác Team Viewer giải giùm. Quá bi quan/lạc quan/chủ quan khi đánh giá thời hạn hoàn thành công việc: Câu nói hay gặp “Task này em làm 1 ngày là xong “. Một tuần sau: “Anh ơi do nó có bug ẩn nên em làm mới được có 30% hà :'(“. Tự hào vì mình làm việc chăm ch ỉ: Nếu đồng nghiệp chỉ làm 8 tiếng/ngày mà bạn phải làm việc tới 10 tiếng/ngày, đừng tự hào là mình chăm chỉ, mà hãy tự hỏi: Do mình dốt, làm chậm hay do lão leader bóc lột giao việc cho mình nhiều quá??? Nếu đọc hết danh sách mà các bạn thấy bản thân mình dính hơi bị nhiều “sai lầm” thì cũng đừng lo nhé, cứ từ từ mà sửa. Kể cả những lập trình viên giỏi nhất cũng từng mắc phải những sai lầm như vậy, huống chi chúng ta. Điểm khác biệt là ở chỗ: những người giỏi nhận thấy được mình đang mắc sai lầm, từ đó phấn đấu và cải thiện bản thân hơn. Chúc các bạn may mắn trên con đường lập trình mình đã chọn. Một số nguồn hay mà các bạn nên tham khảo: Rate this: Like this: Related
Recently, because I'm busy with studies and part-time work, I don't have any free time to go to stackoverflow farm rep anymore. However, I still keep the habit of going to Quora to follow questions and answers about Software Engineer and Computer Science. Unlike stackoverflow which mainly focuses on code, questions on quora have a much broader scope, covering all areas of life. I personally advise you to stop surfing Facebook and switch to reading Quora. Instead of watching pretty girls, 18+ clips, watching young men arguing about Tran Thanh taking Tien Dat to a motel, reading questions on quora is much more useful and interesting. Quora members come from all backgrounds, from Junior Developer to Software Architect and CTO. Their answers and advice are extremely detailed and useful, sometimes even humorous (Typically 2 articles about "Tricks never revealed by the boss dev" and "Heavy comments") . Today's article will talk about the mistakes we often make when taking the first steps on the programming path. To become more mature on the path of personal development and career development, we need to constantly learn. There is a pretty good quote: “Learn from the mistakes of others. You will never live long enough to make all the mistakes.” These mistakes are shared by programmers on quora, along with a part of my personal experience. Hopefully they will be a useful tool for "young" programmers. Regarding programming expertise, these mistakes can be summarized in "5 words of Eo" and "4 words of Like". Eo cares about function names and variable names: Keeping the habit since graduating from school, many of you only name variables like x1, x2. Very concise and easy to understand but reading... makes no sense. Don't care about code structure: The code just needs to run, but the code structure is as messy as a pile of rags. I don't care about security: I think security is a matter of IT infrastructure, I only worry about feature code. (Typically the coders at Lotte Cinema). Don't care about testing: If the code runs correctly in one case, it's fine, leave the rest alone, there's no need to test it, let the testers do it. Eo cares about performance: Does not use reasonable data structures, does not optimize code. Like to code in a complicated, roundabout style, or smart but... difficult to understand. Likes to dive right into the code even when they don't know the requirements or business logic clearly: Having not yet identified the problem, they dive into the code to find a solution. Liking a language/technology to the point of blindness, always thinking it is the best. Like to code from scratch, create new things without paying attention to existing ones to save time, effort, and money. Regarding development orientation, these mistakes can be summarized in "5 No's" and "4 Always". Never read technical books or learn new languages/technologies. Never read programming blogs to learn or learn about new trends. Not caring about your health: Playing games, drinking alcohol, coding all night long. Never delve deeply into research, only superficially learn surface things to complete the job. Not interested in building relationships, creating an image, or developing a career. Always focus on just your project, regardless of the situation of the company or other teams. Always rely on the team leader/manager to guide your career and remind you: Managers have a lot of work to do and many employees to manage, it's very difficult to find time to care for an individual. . Always like to work with people who are "ignorant" than me so it's easier to take the lead: If you want to be better, you need to work with people who are better than you, and get scolded every day to get better. Always living in the "comfort zone", only doing things you are good at/already know, not wanting to expand the skills you already have. (Once upon a time, I heard there was a senior C# woman with 6 years of WinForm maintenance, who interviewed for ASWIG and failed because... she didn't know MVC). About working attitude Maintaining an arrogant and know-it-all attitude: Can be found in students from good schools, graduating with excellent grades (I've only heard from a few doctors, students from good schools, graduating with excellent grades, but without attitude. At this point, I keep thinking, "Maybe the code guy left me alone"). Express your attitude when someone comments on your design/code: Similar to the one above. Coding skills are only one part, the important thing is "attitude". Keep your knowledge to yourself, don't share it because you're afraid your colleagues will be better at it: In the past, I was good at school, but now I'm better at working, so you guys have this blog to read :)). Always expect to be assigned tasks, only do what you are assigned to do: To advance, you need to be more aggressive and active. For example, if you finish the task early, you can proactively tell the leader "let me help you senior refactor and put the code on CI so it will be easier to build later".... Always strictly obey orders from managers, team leaders, and seniors without asking why: Superiors and seniors may not always be right. Arguing and refuting properly will make them value you more (But remember to pay attention to your attitude, don't be aggressive or show off). When asking others, you cannot identify the problem you need to ask but only ask vague general questions, causing difficulties for both the questioner and the answerer. Just focus on asking others to help you and answer: If you have some difficulty, go to Facebook to ask someone else from Team Viewer to help you solve the problem. Too pessimistic/optimistic/subjective when evaluating task completion deadlines: Common saying "I'll do this task in 1 day and finish it". A week later: "Dude, because it has a hidden bug, I can only do 30% :'(". Be proud of your hard work: If your co-workers only work 8 hours/day but you have to work 10 hours/day, don't be proud that you work hard, but ask yourself: Is it because I'm stupid, slow, or Because the leader exploited me and gave me too much work??? If you read the entire list and find yourself making a lot of "mistakes", don't worry, just slowly correct it. Even the best programmers make mistakes like this, let alone us. The difference is that good people realize they are making mistakes, thereby striving and improving themselves. Wishing you good luck on the programming path you have chosen. Some good sources that you should refer to: Rate this: Like this: Related
Tại sao phải dùng IDE trên mây??? Đã bao giờ các bạn gặp trường hợp muốn code mà… không code được chưa? Để có thể code đàng hoàng, ta cần một máy tính bàn (hoặc laptop) code cài đầy đủ tool và có code. Bạn nghĩ rằng để code được cần cài gì? Xin thưa, máy của một developer thường có các đủ thứ hầm bà lằng sau: IDE (Eclipse, Visual Studio), SVN, Notepad++, Git, Node.js, Database (SQL, MongoDB), …. Đấy mới chỉ là IDE, chưa nói đến code! Code để trong máy thì đi đâu cũng phải cầm máy theo. Bạn nào cẩn thận thì code xong commit lên github rồi mượn máy khác code. Tuy nhiên, khi có máy mới, ta cũng phải ráng cài đặt đầy đủ mấy thứ hầm bà lằng phía trên, rồi mới lấy code về code tiếp được. Thuở mới học lập trình, mình ước mơ có 1 cái IDE chạy được trên trình duyệt , chứa toàn bộ code và cài đặt trong đó, đi đâu chỉ cần log in vào rồi code là xong. Ngày đó, các công nghệ AJAX, web real-time còn chưa phát triển, điều ước đó chỉ là mơ mộng viễn vông. Với các đoạn code HTML CSS nho nhỏ, ta có thể bỏ lên fiddle để code và test được, nhưng với các dự án lớn nhiều code thì đành chịu bó tay. May thay, nhờ sự phát triển của điện toán “đám mây”, ước mơ của mình đã thành sự thật. Giờ đây chỉ cần 1 con laptop cùi, cài chrome vào là bạn có thể nhanh chóng “bắt tay vào code” mọi lúc, mọi nơi, không cần cài đặt hay lưu trữ code gì cả !!! Giới thiệu Cloud 9 Như đã giới thiệu, Cloud 9 là một IDE “trên mây”. Với Cloud 9, mỗi khi bạn khởi tạo 1 dự án mới, cl9 sẽ cung cấp cho bạn 1 workspace (tạm hiểu là 1 không gian làm việc) chạy trên 1 máy ảo ubuntu, đã cài đặt sẵn toàn bộ những thứ bạn cần cho việc code (java, git , nodejs, …). Bạn chỉ việc ngồi vào và gõ code, sau đó bấm run để chạy, không cần quan tâm gì tới việc cài đặt máy móc v…v gì cả. Toàn bộ code và cấu hình được lưu trữ trên server của cloud9, do đó bạn không cần cài đặt gì vào máy, chỉ việc mở trình duyệt lên là xong. Bạn có thể thoái mái mượn laptop người khác, dùng vi tính ngoài quán net để code. Quá tiện phải không nào??? Cl9 hỗ trợ tận 40 ngôn ngữ ; với những thằng hot như Ruby, Javascript , PHP, NodeJS, việc code và deploy được hỗ trợ tận răng. Cùng làm quen với Cloud9 Ở bài này, mình sẽ hướng dẫn các bạn làm quen với Cloud9 IDE để có thể nhanh chóng bắt tay vào việc code nhé. Đây là giao diện trang chủ Cloud 9 tại: . Các bạn có thể đăng ký bằng email nhưng mình khuyên nên dùng account github , việc lấy code từ github về sẽ dễ dàng hơn. Sau khi đăng nhập, bạn sẽ có 1 danh sách các workspace hiện tại. Bấm nút + để tạo workspace mới nhé. Bắt đầu tạo workspace mới nào, ở đây mình chọn html5 để làm web tĩnh thôi nhé. Sau khi workspace được tạo, bạn chờ khoảng 30s để cloud9 active nó. Sau khoảng 24 tiếng không được sử dụng, workspace sẽ tạm deactive để tiết kiệm tài nguyên hệ thống. Nếu các bạn thường xuyên code thì không cần chờ 30s mỗi lần vào đâu. Đây là giao diện IDE sau khi đã mở. Bạn có thể bắt đầu ngồi xuống và code được rồi đấy. Nếu muốn xem thành phẩm, chỉ cần bấm nút Run phía trên. Cl9 sẽ deploy nhanh lên 1 host riêng, bạn có thể test và gửi link này cho bạn bè test phụ, quá nhanh quá tiện phải không nào!! Bản thân Cloud 9 còn có một số tính năng khá hay ho như chatbox trong project, rủ bạn bè code chung real time , mình để lại cho các bạn tự tìm hiểu nhé ;). Đánh giá ưu khuyết điểm Tiện dụng không cần cài đặt Code nhanh deploy nhanh, chỉ phẹt phẹt vài phát là có cái web gửi bạn bè coi ngay, chả cần kiếm host gì cả nên rất tiện Debug khá ngon (Node.js để debug phải cài đủ thứ khá cực, tuy nhiên dùng cloud 9 xử ok hết). Tích hợp đủ thứ công cụ: database, git, npm, gem… đỡ phải cài lại lằng nhằng. Rất thích hợp để làm việc nhóm nhờ tính năng code chung: có thể code cùng lúc với bạn bè, vừa code vừa chat. Nếu dùng IDE thường thì ta phải teamviewer. Với cloud 9, khi nhờ vả ai đó chữa code , chỉ cần gửi link workspace cho họ vào xem là xong. Vẫn có cảm giác hơi chậm khi compile (IDE cloud thì dĩ nhiên lúc compile code này nọ không mượt bằng IDE local). Hệ thống plug-in vẫn còn hơi ít, đôi khi không cảm thấy sướng bằng dùng IDE local. Nếu là công ty, muốn code bảo mật thì phải trả tiền mua gói premium, muốn tăng tốc độ cũng phải trả tiền (Với developer như mình thì gói free đáp ứng đủ nhu cầu rồi). Kết Tuy vẫn còn một số khuyết điểm nhỏ, nói chung Cloud 9 đã đáp ứng được hầu hết những yêu cầu về 1 IDE “trên mây” cho một developer thông thường. Không cần sắm máy mạnh hay cài đặt đủ thứ linh tinh, chỉ cần vào “tầng mây thứ chín”, đăng nhập, mở workspace lên và code thôi. Còn chờ gì nữa mà không thử nào? (Nhớ tầng mây thứ chín ở đây là Cloud 9 IDE chứ không phải là cái web đen từ thời ông cố nội nào đâu nhé). À quên, ngoài cloud9 ra, hiện tại còn 1 số Cloud IDE khác cũng khá nổi là Codeenvy và Codeanywhere . Bạn nào đã từng dùng qua 2 IDE này rồi thì vào review chia sẻ với mọi người nhé. Rate this: Like this: Related
Why use an IDE on the cloud??? Have you ever encountered a situation where you wanted to code but... couldn't code? To be able to code properly, we need a desktop computer (or laptop) with all the tools and code installed. What do you think you need to install to code? Please tell me, a developer's computer usually has all the following tools: IDE (Eclipse, Visual Studio), SVN, Notepad++, Git, Node.js, Database (SQL, MongoDB), .... That's just the IDE, not to mention the code! If the code is in the device, you have to take it with you wherever you go. If you are careful, commit the code to github and then borrow another machine to code. However, when we get a new computer, we have to try to fully install all the crazy things above, then we can get the code to continue coding. When I first learned programming, I dreamed of having an IDE that could run in a browser, containing all the code and settings in it. Wherever I went, I just needed to log in and code and it was done. At that time, AJAX and real-time web technologies were not yet developed, that wish was just a pipe dream. With small pieces of HTML and CSS code, we can put it on a fiddle to code and test, but with large projects with lots of code, we have to give up. Fortunately, thanks to the development of "cloud" computing, my dream has come true. Now you only need a laptop, install Chrome, and you can quickly "start coding" anytime, anywhere, without needing to install or store any code!!! Introducing Cloud 9 As introduced, Cloud 9 is an IDE "in the cloud". With Cloud 9, every time you create a new project, cl9 will provide you with a workspace (temporarily understood as a working space) running on an Ubuntu virtual machine, with everything you need pre-installed. coding (java, git, nodejs, ...). You just need to sit down and type the code, then press run to run, no need to worry about installing machines etc. All code and configuration are stored on cloud9's server, so you don't need to install anything on your device, just open the browser and you're done. You can freely borrow other people's laptops and use computers outside internet cafes to code. Too convenient, right??? Cl9 supports up to 40 languages; With hot guys like Ruby, Javascript, PHP, NodeJS, coding and deployment are fully supported. Let's get acquainted with Cloud9 In this article, I will guide you to get acquainted with Cloud9 IDE so you can quickly start coding. This is the interface of the Cloud 9 homepage at: . You can register by email but I recommend using a github account, it will be easier to get the code from github. After logging in, you will have a list of current workspaces. Click the + button to create a new workspace. Let's start creating a new workspace, here I choose html5 to make a static website. After the workspace is created, wait about 30 seconds for cloud9 to activate it. After about 24 hours of not being used, the workspace will be temporarily deactivated to save system resources. If you often code, you don't need to wait 30 seconds each time. This is the IDE interface after opening. You can start sitting down and coding now. If you want to see the finished product, just click the Run button above. Cl9 will quickly deploy to a separate host, you can test and send this link to your friends for secondary testing, too fast and convenient, right!! Cloud 9 itself also has some pretty cool features such as chatboxes in projects, inviting friends to code together in real time, I'll leave it for you to find out for yourself ;). Evaluate pros and cons Convenient, no installation required Quick code and quick deployment, just a few clicks and you have a website to send to your friends right away, no need to find a host so it's very convenient Debugging is quite good (Node.js to debug requires quite a lot of things to be installed, but using cloud 9 works fine). Integrates all kinds of tools: database, git, npm, gems... to avoid having to reinstall. Very suitable for group work thanks to the shared coding feature: you can code at the same time with friends, code while chatting. If we use a regular IDE, we must use teamviewer. With cloud 9, when asking someone to fix your code, just send them the workspace link to see and they're done. It still feels a bit slow when compiling (the cloud IDE, of course, is not as smooth as the local IDE when compiling this and that code). The plug-in system is still a bit small, sometimes it doesn't feel as good as using a local IDE. If you are a company and want secure code, you have to pay for the premium package. If you want to increase speed, you also have to pay (For developers like me, the free package meets all needs). Conclusion Although there are still some minor shortcomings, in general Cloud 9 has met most of the requirements for a "cloud" IDE for a regular developer. No need to buy a powerful machine or install all kinds of junk, just go to "cloud nine", log in, open the workspace and code. What are you waiting for? Why not try it? (Remember that the ninth cloud here is Cloud 9 IDE, not the dark web from your great-grandfather's era). Oh, I forgot, besides cloud9, there are currently some other Cloud IDEs that are quite popular: Codeenvy and Codeanywhere. If you have ever used these two IDEs, please review and share with everyone. Rate this: Like this: Related
Như mình đã kể ở vài bài trước, hiện mình đang là UX Developer cho team iLancaster, chịu trách nhiệm phát triển app di động cho Đại học Lancaster. Dạo gần đây, app này đang mở rộng đối tượng người dùng, không chỉ phục vụ cho sinh viên/học sinh mà còn hướng tới toàn bộ dân cư của khu Lancaster nho nhỏ này nữa. Thế là, bác Brian trưởng nhóm liên hệ với đội “Campus in the City”, đội quảng cáo/PR của trường để tổ chức 1 cái event nho nhỏ nhằm giới thiệu app và lấy ý kiến của người dùng. Event bắt đầu lúc 9h sáng tới hơn 4h chiều. Lúc ra đến nơi, chưa thấy ai giao việc nên mình nhảy vào sắp xếp dọn dẹp phụ luôn. Event nhỏ mà họ chuẩn bị cũng khá kĩ càng, nào poster, banner, slide, rồi cả leaflet mang về nữa. Tới 9h30, khi mọi người đã tụ tập đông đủ, công việc bắt đầu. Bé Alice và 2,3 bạn nữa trong team chịu trách nhiệm… quảng cáo, cầm tablet đứng trước cửa để giới thiệu app với người đi đường. Anh da đen bạn mình (từng nhắc ở bài trước ) cũng tham gia. Lâu lâu có vài người đi vào tham quan thì các bạn ấy cũng vào giải thích, hướng dẫn luôn (cứ như bán sản phẩm ấy). Về phần mình và anh Liam “đập chai” , không biết là do code giỏi hay… giao tiếp dở mà được phân công làm team code. Đây là team “code dạo” theo đúng nghĩa đen. Bác Brian sẽ lọc góp ý của người dùng, chọn ra một vài ý tưởng khá thi, đơn giản (có thể code được nhanh) để team thực hiện ngay tại chỗ. Nhiệm vụ của team là ngồi code trực tiếp ngay tại đấy, code trước con mắt của bàn dân thiên hạ đi ngang qua để “người dùng có thể thấy app được tạo ra như thế nào”. Chức năng tụi mình phải làm tên là “How do you feel” cũng khá đơn giản: Hiển thị khoảng 5, 6 cái emo cho người dùng lựa chọn cảm xúc của mình trong ngày. Sau khi chọn, hiển thị số lượng người có cùng cảm xúc với họ. Cảm xúc và location của người dùng sẽ được lưu lại trên server để sau này thống kê thống kiếc gì đó. App cũng đơn giản nhưng do cái API back-end bị gì đấy nên mình và anh Liam phải mất hơn 2 tiếng mới làm xong. Chức năng nhanh chóng được đưa lên live và cho người dùng sử dụng thử. Mục tiêu chính của buổi event vẫn là giới thiệu và lấy ý kiến của khách hàng. Rất may là ở đây dân tình có vẻ khá nhiệt tình góp ý và ủng hộ, mình nhớ có 3, 4 cụ già vào góp ý chém gió khí thế với bác Brian. Nghe thống kê của bác thì hình như event thu hút được tới tổng cộng 280 khách tham gia thì phải. Đến cuối buổi, cả team thu dọn ra về. Tính ra cũng khá vui vì đây là lần đầu tiên mình thấy cách người nước ngoài họ tiếp cận người dùng. Sau event này, chắc sẽ có nhiều thêm requirement mới, chức năng mới, công việc của mình có vẻ cũng nhiều hơn. Tuần sau bên này đang là hè, mình cũng đi du lịch nhưng cũng ráng có bài đầy đủ để phục vụ các bạn đọc nhé. Rate this: Like this: Related
As I mentioned in a few previous articles, I am currently a UX Developer for the iLancaster team, responsible for developing mobile apps for Lancaster University. Recently, this app is expanding its user base, not only serving students but also targeting the entire population of this small Lancaster area. So, team leader Brian contacted the "Campus in the City" team, the school's advertising/PR team to organize a small event to introduce the app and get users' opinions. Event starts at 9am until 4pm. When I got there, I didn't see anyone assigning work, so I jumped in to help arrange cleaning. The small event they prepared was quite thorough, including posters, banners, slides, and even leaflets brought home. At 9:30, when everyone had gathered, work began. Little Alice and 2 or 3 other people in the team are responsible for... advertising, holding the tablet and standing in front of the door to introduce the app to passersby. My black friend (mentioned in the previous post) also participated. Occasionally, when a few people come in to visit, they also come in to explain and guide (as if selling a product). As for me and Liam, I don't know if it's because we're good at coding or... because we're bad at communication that we were assigned to be on the coding team. This is a team that literally "codes around". Uncle Brian will filter user comments, select a few quite feasible and simple ideas (can be coded quickly) for the team to implement on the spot. The team's mission is to code live right there, coding in front of the eyes of people passing by so that "users can see how the app is created". The function we have to do is called "How do you feel" and is quite simple: Display about 5 or 6 emojis for users to choose their emotions for the day. Once selected, displays the number of people who have the same sentiment as them. The user's emotions and location will be saved on the server for future statistics. The app is also simple, but due to something wrong with the back-end API, it took Liam and I more than 2 hours to complete. The function was quickly brought live and allowed for users to try. The main goal of the event is still to introduce and get customers' opinions. Fortunately, people here seem to be quite enthusiastic in their comments and support. I remember 3 or 4 old people came in to comment and chat with Uncle Brian. Listening to your statistics, it seems like the event attracted a total of 280 participants. At the end of the session, the whole team packed up and left. It's quite fun because this is the first time I've seen how foreigners approach users. After this event, there will probably be many new requirements, new functions, and my work seems to be more. Next week it will be summer here, I will also be traveling but I will try to have a full article to serve readers. Rate this: Like this: Related
Bài viết này sẽ giới thiệu về khái niệm promise và các ứng dụng của nó trong javascript . Promise được sử dụng khá nhiều ở cả front-end (AngularJS) và back-end(NodeJS), do đó nắm vững khái niệm này sẽ giúp bạn rất nhiều trong việc code và … trả lời phỏng vấn . Lưu ý : Bài viết sử dụng nhiều ngôn ngữ 16+, khuyến phụ nữ dưới 18 tuổi và trẻ em có thai không nên đọc. Lập trình bất đồng bộ trong Javascript Bạn nào từng làm AJAX đều biết rằng Javascript kết nối với server theo cơ chế bất đồng bộ, các hàm phía sau không đợi hàm AJAX chạy xong mà tiếp tục chạy luôn. Do đó, để lấy kết quả của hàm ajax, ta phải truyền cho nó 1 callback . Sau khi hàm AJAX lấy được kết quả, nó sẽ gọi hàm callback với kết quả thu được. Cách làm này có gì không ổn? Sử dụng callback chồng chéo sẽ làm code trở nên rối rắm, khó đọc; việc bắt exception, hiển thị lỗi trở cũng nên phức tạp. Để giải quyết vấn đề này, các bác developer đã sáng tạo ra một khái niệm gọi là promise . Promise là chi? Promise là… lời hứa! Khái niệm promise được MDN giải thích một cách khá mù mờ và hơi… khó hiểu: Để dễ hiểu, mình gọi Promise là lời hứa . Tương tự như trong thực tế, có người hứa rồi làm, có người hứa rồi … thất hứa. Một lời hứa có 3 trạng thái sau: pending : Hiện lời hứa chỉ là lời hứa suông, còn đang chờ người khác thực hiện fulfilled : Lời hứa đã được thực hiện reject : Bạn đã bị thất hứa, hay còn gọi là bị “xù” Khi xưa, để dụ bạn cố gắng học hành, bố mẹ bảo “Ráng đậu đại học bố mẹ sẽ mua cho con BMW đi học cho bằng bạn bằng bè”. Lúc này, thứ bạn nhận được là một lời hứa , chứ không phải xe BMW . Khi lời hứa được thực hiện, promise sẽ gọi callback trong hàm then . Ngược lại, khi bị thất hứa, promise sẽ gọi callback trong hàm catch . Quay lại với ví dụ ở đầu bài. Lúc này hàm ajax sẽ trả ra một lời hứa. Hàm này hứa là “Nếu lấy ảnh XXX, ta sẽ đưa cho mày”. Lúc này kết quả của hàm là một promise, chứ không phải là ảnh XXX. Ủa, cũng là dùng callback thôi mà?? Ừ, hồi mới tìm hiểu về promise mình cũng nghĩ tương tự như các bạn vậy đó. Vậy thì promise có gì hay mà phải dùng? Promise hay ở các điểm sau: Cùng phân tích các điểm hay của Promise nhé. Giá trị trả về của hàm then là 1 promise khác. Do vậy ta có thể dùng promise gọi liên tiếp các hàm bất đồng bộ. Có thể viết lại hàm phía trên như sau: Trong ví dụ trên, ta gọi lần lượt 3 hàm: xin_mẹ_mua_xe , chở_gái_đi_chơi , chở_gái_vào_hotel . Chỉ cần một trong 3 hàm này bị lỗi , promise sẽ chuyển qua trạng thái reject. Lúc này callback trong hàm catch sẽ được gọi. Việc bắt lỗi trở nên dễ dàng rất nhiều Giả sử bạn muốn 3 hàm AJAX khác nhau. Bạn cần kết quả trả về của 3 hàm này trước khi tiếp tục chạy. Với callback, việc này sẽ khá khó thực hiện. Tuy nhiên, promise hỗ trợ hàm Promise.all , cho phép gộp kết quả của nhiều promise lại với nhau. Tổng kết Với các ưu điểm của mình, promise đang dần dần thay thế cho callback. Dĩ nhiên là không thay thế hoàn toàn đâu. Với các hàm đơn giản thì dùng callback sẽ ngắn và dễ hiểu hơn promise. Promise được sử dụng nhiều trong AngularJS và một số module của NodeJS. Nắm vững khái niệm promise sẽ giúp bạn code đỡ cực hơn nhiều. Hiện tại, các bạn có thể dùng Promise trong trình duyệt Chrome và các bản NodeJS mới nhất. Với các trình duyệt khác, các bạn phải thêm thư viện promise-polyfill thì mới sử dụng được. Vì khái niệm promise khá là khó tiêu hóa, mình khuyên các bạn nên đọc lại nhiều lần, kết hợp với xem những bài viết khác liên quan tới nó nhé: Promise là khỉ gì Tìm hiểu về JavaScript promise Rate this: Like this: Related
This article will introduce the concept of promises and its applications in javascript. Promises are used quite a lot in both front-end (AngularJS) and back-end (NodeJS), so mastering this concept will help you a lot in coding and... answering interviews. Note: The article uses many 16+ languages, and is recommended for women under 18 years old and pregnant children not to read. Asynchronous programming in Javascript Anyone who has ever done AJAX knows that Javascript connects to the server asynchronously, the functions behind do not wait for the AJAX function to finish running but continue to run immediately. Therefore, to get the result of the ajax function, we must pass it a callback. After the AJAX function gets the results, it will call the callback function with the results. What's wrong with this approach? Using overlapping callbacks will make the code confusing and difficult to read; Catching exceptions and displaying errors becomes complicated. To solve this problem, developers created a concept called promises. What is Promise? Promise is... a promise! The concept of promise is explained by MDN in a rather vague and somewhat... confusing way: To make it easier to understand, I call Promise a promise. Similar to reality, some people promise and then do it, some people promise and then... break their promise. A promise has the following 3 states: pending : The promise is currently just an empty promise, still waiting for someone else to fulfill it fulfilled : The promise has been fulfilled reject : You have broken your promise, also known as "scratched" In the past, to entice you to study hard, your parents said, "If you try to get into college, we will buy you a BMW to go to school so you can be equal to your friends." At this point, what you get is a promise, not a BMW car. When the promise is fulfilled, the promise calls a callback in the then function. Conversely, when a promise is broken, the promise will call a callback in the catch function. Return to the example at the beginning of the article. Now the ajax function will return a promise. This function promises "If I take XXX photos, I will give them to you". Now the result of the function is a promise, not an XXX image. Oh, it's just using callbacks right?? Yes, when I first learned about promises, I thought the same as you guys. So what is so good about promises that we have to use them? Promise is good at the following points: Let's analyze the good points of Promise. The return value of the then function is another promise. Therefore, we can use promises to consecutively call asynchronous functions. The above function can be rewritten as follows: In the above example, we call three functions in turn: ask_mom_to_buy_a car, take_girl_out, take_girl_to_hotel. As long as one of these 3 functions fails, the promise will enter the reject state. Now the callback in the catch function will be called. Catching errors becomes much easier Let's say you want 3 different AJAX functions. You need the return results of these 3 functions before continuing to run. With callbacks, this will be quite difficult to do. However, promises support the Promise.all function, which allows combining the results of multiple promises together. Summary With its advantages, promises are gradually replacing callbacks. Of course it's not a complete replacement. With simple functions, using callbacks will be shorter and easier to understand than promises. Promises are used a lot in AngularJS and some NodeJS modules. Mastering the concept of promises will help you code much less difficult. Currently, you can use Promises in Chrome browser and the latest NodeJS versions. With other browsers, you must add the promise-polyfill library to use it. Because the promise concept is quite difficult to digest, I recommend that you read it many times, combined with viewing other articles related to it: What the hell is Promise? Learn about JavaScript promises Rate this: Like this: Related
Lời tựa Cách đây 2 ngày, bác giám đốc đối ngoại nhà máy Formosa đã phát ngôn một câu xanh rờn: Không thể được cả 2, phải chọn hoặc nhà máy, hoặc cá tôm!! Cả cộng đồng mạng dậy sóng, người thì tức tối, kẻ thì phẫn nộ, có đứa chỉ cười nhạt. Tuy thế, câu phát ngôn trên lại làm mình nhớ tới một câu danh ngôn đọc được đã lâu: Cuộc sống là một chuỗi những đánh đổi và lựa chọn. Câu danh ngôn đó đã thôi thúc mình viết bài viết này. Trong cuộc sống nói chung cũng như trong sự nghiệp nói riêng, đôi khi bạn phải đưa ra lựa chọn và chấp nhận đánh đổi , vì ta không thể có được tất cả những thứ ta muốn. Trong phạm vi bài viết, mình sẽ nêu một số đánh đổi các bạn sẽ gặp phải và phân tích những lợi/hại của nó. Từ lúc chọn trường và đi học Có thể nói, quãng đường lập trình của bạn đã bắt đầu ngay từ lúc bạn bước chân vào cổng trường Đại Học . Có thể bạn sẽ phân viên giữa việc nên học đại học nhà nước (Bách Khoa, KHTN) hay tư nhân (FPT, RMIT). Cùng phân tích nhé: Học phí trong ĐH công không cao lắm nên sẽ tiết kiệm được về kinh tế cho gia đình bạn. Theo mặt bằng chung, sinh viên vào ĐH công có điểm cao hơn nên có thể sẽ chăm và giỏi hơn, bạn sẽ có môi trường để cạnh tranh học tập. Tốt nghiệp ĐH tiếng tăm cũng làm CV bạn đẹp hơn khi xin việc , xin du học . Tuy nhiên, khuyết điểm là chương trình học các ĐH công thường nặng về đại cương và lý thuyết , cạnh tranh cao trong học tập nên dễ đuối. Học phí trong ĐH tư nhân (FPT, RMIT) khá cao . Vào ĐH tư thì bạn sẽ đỡ được các môn đại cương, triết học nhàm chán. Cơ sở vật chất cũng hiện đại tân tiến hơn. (Ngày xưa mình nghĩ FPT toàn bọn giàu mà dốt nên mới vào học để làm thủ khoa đấy chứ, ai ngờ… chỉ được á khoa 😥 ). Kiến thức của bạn cũng sẽ mới hơn bên ĐH nhà nước chút đỉnh. Tuy nhiên, bằng ĐH tư nhân đôi khi thường không được coi trọng (Lúc mới ra trường thôi, có kinh nghiệm thì bằng gì cũng xin việc được cả). Tới năm cuối, bạn sẽ phải phải lựa chọn giữa việc đi thực tập, đi làm hay tập trung học để ra trường . Việc thực tập, đi làm sẽ giúp bạn có nhiều kinh nghiệm hơn, CV đẹp hơn , tuy nhiên nó có thể ảnh hướng tới kết quả học tập và bảng điểm. Trường mình có vài ông vì mải mê đi làm nên ra trường trễ tận 2 năm cơ! Không thể được cả 2, phải chọn đi học, hoặc đi làm! Về việc so sánh giữa các Đại học, mình sẽ viết 1 bài khác nói rõ hơn nhé. Dù gì cũng sắp tới mùa tuyển sinh rồi, viết cho các em sắp thi đại học luôn. Đến lúc ra trường đi làm Đến lúc ra trường, bạn sẽ gặp khó khăn khi lựa chọn ngôn ngữ cần học, nên theo hướng web hay di động, những kĩ năng gì cần có để dễ xin việc . Mình đã phân tích kĩ những điều này qua một số bài viết trên blog, các bạn bấm vào để xem nhé: Học ngôn ngữ lập trình gì bây giờ Tổng quan về lập trình ứng dụng di động Những kĩ năng cần có của web developer Một điều phải lựa chọn nữa là việc chọn công ty: công ty to, nhỏ hay startup. Vào một công ty outsource lớn (FPT, KMS), bạn sẽ học hỏi được nhiều thứ về qui trình phát triển , học hỏi về kĩ năng code từ các bác senior . Vào một công ty nhỏ, bạn sẽ được tiếp xúc với các bộ phận khác của công ty (sales, marketing , chăm sóc khách hàng), hiểu về qui trình làm việc của 1 doanh nghiệp. Vào một công ty startup, bạn sẽ được mở rộng tầm nhìn về cách phát triển một sản phẩm, nhưng phải cháy hết mình, vắt kiệt bản thân cho dự án. Tất cả đều là đánh đổi , có lợi/hại riêng, hãy nhớ nhé! Rồi phát triển bản thân và sự nghiệp Để có giá trên thị trường , bạn có thể chọn tập trung chuyên môn vào một ngôn ngữ, hoặc mở rộng kiến thức sang nhiều ngôn ngữ . Bạn cũng có thể chọn giữa việc trở thành full-stack developer , hoặc chỉ tập trung chuyên môn vào một khía cạnh để trở thành chuyên gia. Lựa chọn giữa hướng quản lý hay kĩ thuật cũng là một hướng khiến nhiều bạn đau đầu. Bạn không thể chọn cả hai! Ở những vị trí quản lý cấp cao, bạn sẽ phải họp hành liên miên, lo đủ mọi chuyện từ nhân sự cho đến đánh giá performance nhân viên. Không có thời gian để ngồi code , kiến thức về code của bạn sẽ đi xuống. Mình từng nghe kể về nhiều ông code rất khủng nhưng bị đẩy lên làm quản lý, làm ngành IT mất đi 1 ông code giỏi , thêm 1 lão manager tồi. Nghề lập trình cũng thường đi kèm với những tháng ngày OT liên miên, do đó đôi khi ta phải đánh đổi giữa công việc và gia đình, người thân. Ở Fsoft, mình từng nghe chuyện về 1 bác coder huyền thoại . Quá mệt mỏi sau khi hoàn thành xuất sắc một dự án dài hơi, bác đã chọn không tập trung vào code nữa mà chuyển qua training và huấn luyện, thưởng ít hơn một tí nhưng có nhiều thời gian cho gia đình và vợ con. Các bạn nhớ lưu ý điều này nhé! Kết Hi vọng rằng thông qua bài viết, bạn sẽ có thêm thông tin để đưa ra những lựa chọn cần thiết trên con đường sự nghiệp của mình. Hãy cùng chia sẻ những lựa chọn, trải nghiệm của mình trên con đường lập trình trong phần comment nhé. Tái bút : Mình ra chợ mua 2 con cá còn tươi rói về bỏ vào dầu sôi thì cả 2 con chết nhăn răng sau 30 giây. Kết luận rút ra được là dầu ăn độc hại gấp 4 lần nước biển Vũng Áng, do đó các bạn đừng nên ăn nhé !!! (Món cá chiên xoài xanh mình làm cũng khá ngon, các bạn nhìn hình là biết). Rate this: Like this: Related
Preface 2 days ago, the foreign affairs director of the Formosa factory made a bold statement: You can't have both, you have to choose either the factory, or fish and shrimp!! The entire online community was in uproar, some were angry, some were indignant, some just smiled faintly. However, the above statement reminds me of a quote I read a long time ago: Life is a series of trade-offs and choices. That quote inspired me to write this article. In life in general and in career in particular, sometimes you have to make choices and accept trade-offs, because we cannot have everything we want. Within the scope of this article, I will outline some of the trade-offs you will encounter and analyze their benefits/disadvantages. From the moment you choose a school and go to school, it can be said that your programming journey begins from the moment you step foot into the University gate. Maybe you will decide between studying at a state university (Bach Khoa, KHTN) or a private university (FPT, RMIT). Let's analyze: Tuition fees at public universities are not very high, so it will save your family money. According to general standards, students entering public universities have higher scores, so they will probably work harder and be more talented, and you will have an environment to compete in studying. Graduating from a reputable university also makes your CV look better when applying for a job or studying abroad. However, the disadvantage is that public university programs are often heavy on general outlines and theories, and highly competitive in learning, so it's easy to get discouraged. Tuition fees at private universities (FPT, RMIT) are quite high. Going to a private university will help you avoid boring general and philosophy subjects. The facilities are also more modern and advanced. (In the past, I thought FPT was full of rich but ignorant people, so they entered the school to be valedictorian. Who would have thought... they would only be salutatorian 😥). Your knowledge will also be a little newer than the state university. However, private university degrees are sometimes not taken seriously (when you first graduate, if you have experience, you can apply for a job with any degree). In your final year, you will have to choose between interning, working, or focusing on studying to graduate. Interning and working will help you gain more experience and a more beautiful CV, but it can affect your academic results and transcripts. At my school, there were a few men who were so busy working that they graduated 2 years late! You can't have both, you have to choose to go to school or work! Regarding the comparison between Universities, I will write another article to explain it more clearly. Anyway, it's almost admission season, I'm writing for those who are about to take the university entrance exam. When you graduate and go to work, when you graduate, you will have difficulty choosing which language to learn, whether you should go for web or mobile, and what skills you need to easily get a job. I have analyzed these things carefully through a number of blog posts, please click to see: What programming language should I learn now? Overview of mobile application programming Necessary skills of web developers Another thing to choose is choosing a company: large, small or startup. Joining a large outsourcing company (FPT, KMS), you will learn a lot about the development process and learn about coding skills from senior staff. Entering a small company, you will be exposed to other departments of the company (sales, marketing, customer care), and understand the working process of a business. Entering a startup company, you will have an expanded vision of how to develop a product, but you must burn your heart out and exhaust yourself for the project. Everything is a trade-off, with its own benefits/disadvantages, remember! Then develop yourself and your career To be valuable in the market, you can choose to focus on one language, or expand your knowledge to many languages. You can also choose between becoming a full-stack developer, or specializing in just one aspect to become an expert. Choosing between management or technical direction is also a direction that gives many people headaches. You can't choose both! In senior management positions, you will have to meet constantly, taking care of everything from human resources to evaluating employee performance. Without time to sit and code, your coding knowledge will decline. I've heard stories about many great coders who were pushed to become managers, causing the IT industry to lose a good coder and another bad manager. Programming career also often comes with continuous OT days, so sometimes we have to trade off between work and family and relatives. At Fsoft, I once heard a story about a legendary coder. Too tired after successfully completing a long-term project, he chose not to focus on coding anymore but switched to training and coaching, with a little less reward but more time for his family and wife and children. Please remember to note this! Conclusion We hope that through this article, you will have more information to make the necessary choices on your career path. Please share your choices and experiences on the programming path in the comment section. PS: I went to the market and bought 2 fresh fish and put them in boiling oil and both of them died within 30 seconds. The conclusion is that cooking oil is 4 times more toxic than Vung Ang seawater, so you should not eat it!!! (The green mango fried fish dish I made is also quite delicious, you can see from the picture). Rate this: Like this: Related
Hỏi thật nhé, có bao giờ bạn thấy lập trình một ứng dụng Web là chuyện khó không? Chúng ta phải học cơ man đủ thứ: Từ front-end như HTML, CSS, JS, cho tới back-end như Java/ C# /Ruby, SQL, …. Nếu muốn làm thêm ứng dụng bản trên di động , ta phải học Objective C, Java, … Sau khi code, ta còn phải tìm hiểu về hosting, về domain, về appstore để đưa web/ứng dụng của mình lên Internet, phiền phức nhiều khê quá nhỉ? Có cách nào để học ít ngôn ngữ , nhưng lại mau chóng đưa ra thành phẩm không? Nếu chỉ là web đơn giản/e-commerce thì bạn có thể xây dựng với Joomla, Drupal, WordPress,… còn với những yêu cầu phức tạp thì không có cách nào đâu . À, mà thật ra là có đấy . Chỉ cần bạn chịu khó học javascript , sau đó học Meteor là xong. Chỉ cần chút kiến thức về HTML, JS, CSS và MongoDB, bạn có thể xây dựng 1 ứng dụng web và mobile realtime trong 1 tiếng. (Nhanh gấp 5-10 lần Java, C#, PHP hay Rail để làm chuyện tương tự). Không tin à? Hãy đọc bài viết để biết Meteor là gì, tại sao nó lại “bá đạo” như vậy nhé. Meteor là gì? Một số bạn hiểu lầm Meteor chỉ là một thư viện /framework như jQuery, AngularJS. Thật ra không phải vậy, Meteor không chỉ là 1 Javascript framework mà là cả 1 hệ sinh thái (ecosystem). Meteor cũng cấp cho ta “gần như” toàn bộ những thứ để làm một ứng dụng web/mobile: Phần front-end sử dụng framework Blaze để bind dữ liệu. Phần back-end sử dụng NodeJS và Express để làm server, MongoDB là database chính. Bạn không cần biết gì về NodeJS hay Express, chỉ cần code Meteor bằng javascript thôi. Một hệ thống thư viện/module tương tự npm, Maven, Nuget. Một số tool để build/deploy web site và mobile app . Chỉ cần code một lần, bạn có thể deploy nó thành một web app , hoặc build nó thành một mobile app trên Android, IOS. Meteor có gì hot? Vậy tại sao Meteor lại trở nên hot như vậy? Sử dụng Meteor, việc phát triển một ứng dụng sẽ trở nên dễ dàng, nhanh chóng hơn. Meteor được tạo ra không phải chỉ cho developer, mà cho những người “bình dân” như anh Ba bán cháo lòng, chị Bảy chủ tiệm nail, anh Sáu chủ quán cafe có thể tự làm trang web/ứng dụng cho doanh nghiệp của mình. Trên thực tế, có khá nhiều bài viết về chuyện sinh viên đại học , chủ tiệm nail, thợ xăm,… xây dựng ứng dụng bằng Meteor. Các lý do Meteor được ưa chuộng: Không cần quá nhiều kiến thức lập trình , chỉ cần HTML, CSS, javascript, chút kiến thức về OOP và database là được. Mọi thao tác tới database đều thông qua các API của Meteor, viết bằng javascript, chả cần phải biết SQL là gì. Meteor hướng tới các đối tượng không giỏi lập trình . Do đó, Meteor rất dễ học dễ làm, tài liệu về Meteor cũng rất phong phú và dễ tìm. Nhanh chóng tạo ra sản phẩm , được các công ty start-up, các doanh nghiệp nhỏ ưu chuộng (Ngày xưa Ruby on Rail cũng nổi tiếng nhờ lý do này). Có vô số module đã viết sẵn , chỉ cần gắn vào và sử dụng. Ví dụ việc đăng nhập, phân quyền khá phức tạp trong C#, Java, … trong Meteor chỉ cần gắn module vào, chỉnh sửa một chút là được. Dân Developer cũng thích Meteor, vì nó tích hợp đủ thứ công nghệ : Node.js, Express, MongoDB , WebSocket, Phonegap, …. Trời ơi, lại còn realtime nữa. Code ít, được nhiều, Deploy rất nhanh. Vừa code xong và muốn đưa lên web, chỉ cần “ meteor deploy . Muốn có ứng dụng di động , chỉ cần “ meteor build android” là xong. Mình có làm thử một cái to-do-list real-time bằng Meteor. Việc sign-in chỉ cần khoảng 3 dòng code (Mới đăng nhập thông thường và google, facebook mình chưa đăng ký). Việc deploy cũng rất nhanh, việc phát triển toàn bộ ứng dụng chỉ mất 1 tiếng vừa học vừa làm. Edit (02/05/2016): Hiện tại do nhiều người dùng nên thằng Meteor không còn hỗ trợ deploy free như ngày xưa nữa nhé, phải trả phí cơ 😥 ). Vẫn còn vài khuyết điểm Đoạn đầu bài mình hơi quảng cáo quá mức cho Meteor. Thật ra, có một số mặt nó làm không tốt bằng các phương thức lập trình cũ với C#, Java, Ruby, … Nó vẫn còn một số khuyết điểm dưới đây: Chỉ mới hỗ trợ MongoDB làm database engine. View Engine Blaze khá cùi bắp. May là hiện tại ta có thể thay thế bằng AngularJS . SEO cũng chưa tốt, do Meteor tập trung vào phát triển ứng dụng real time, tương tác cao. Nếu cần làm web bán hàng, blog, trang tin tức, PHP & Joomla hay WordPress vẫn là lựa chọn hàng đầu nhé. Module nhiều nhưng document không rõ ràng (Tình trạng tương tự như npm của Nodejs, có rất nhiều module nhưng document rất mơ hồ, khó sử dụng). Có nên thử sức với Meteor? Thật ra mình vẫn chỉ giữ thái độ dè chừng, chỉ sử dụng Meteor để xây dựng các ứng dụng nhỏ, vừa học vừa chơi vì nó còn khá non trẻ. Các công ty cũng hơi dè chừng khi sử dụng Meteor. Tuy nhiên, theo mình tìm hiểu thì tương lai của Meteor khá tươi sáng, đội ngũ phát triển Meteor được tài trợ hơn 11 triệu $ . Cộng đồng Meteor cũng rất đông đúc và ngày càng phát triển. Nếu bạn là lập trình viên, muốn mở rộng kiến thức, hãy thử học Meteor xem. Biết đâu 1,2 năm nữa nó sẽ trở thành trào lưu thì sao, các công ty thi nhau tuyển Meteor thì sao? Nếu bạn mới học lập trình web, Meteor cũng là một lựa chọn không tồi. Chỉ cần chút kiến thức HTML/CSS/JS, bạn có thể build một website, một ứng dụng di động, đâu có gì khó phải không nào. Một số tài liệu khá hay cho bạn nào muốn tìm hiểu thêm: Rate this: Like this: Related
Seriously, have you ever found programming a Web application difficult? We have to learn a lot of things: From front-end like HTML, CSS, JS, to back-end like Java/ C# /Ruby, SQL, .... If you want to make more mobile applications, you have to learn Objective C, Java, etc. After coding, you also have to learn about hosting, domain, and appstore to put your web/application on the Internet, which is annoying. Is it too much? Is there a way to learn less language, but deliver a finished product quickly? If it's just a simple website/e-commerce, you can build it with Joomla, Drupal, WordPress,... but for complex requirements, there's no way. Ah, but actually there is. You just need to work hard to learn javascript, then learn Meteor and you're done. With just a little knowledge of HTML, JS, CSS and MongoDB, you can build a realtime web and mobile application in 1 hour. (5-10 times faster than Java, C#, PHP or Rail to do the same thing). Don't believe it? Please read the article to know what Meteor is and why it is so "powerful". What is meteor? Some people misunderstand that Meteor is just a library/framework like jQuery, AngularJS. Actually that's not true, Meteor is not just a Javascript framework but an entire ecosystem. Meteor also gives us "almost" everything to make a web/mobile application: The front-end uses the Blaze framework to bind data. The back-end uses NodeJS and Express as the server, MongoDB is the main database. You don't need to know anything about NodeJS or Express, just code Meteor with javascript. A library/module system similar to npm, Maven, Nuget. Some tools to build/deploy web sites and mobile apps. Just code it once, you can deploy it into a web app, or build it into a mobile app on Android, IOS. What's hot about Meteor? So why has Meteor become so hot? Using Meteor, developing an application will become easier and faster. Meteor was created not only for developers, but for "ordinary" people like Mr. Ba who sells porridge, Ms. Bay who owns a nail salon, and Mr. Sau who owns a cafe can make their own website/application for their business. . In fact, there are quite a few articles about college students, nail salon owners, tattoo artists, etc. building applications using Meteor. Reasons why Meteor is popular: Don't need too much programming knowledge, just HTML, CSS, javascript, a little knowledge of OOP and database. All operations to the database go through Meteor's APIs, written in javascript, no need to know what SQL is. Meteor is aimed at people who are not good at programming. Therefore, Meteor is very easy to learn and do, and Meteor documentation is also very rich and easy to find. Quickly create products, favored by start-up companies and small businesses (In the past, Ruby on Rail was also famous for this reason). There are countless pre-written modules, just plug in and use. For example, logging in and decentralizing permissions is quite complicated in C#, Java, etc. In Meteor, you just need to attach the module and edit it a little. Developers also like Meteor, because it integrates all kinds of technologies: Node.js, Express, MongoDB, WebSocket, Phonegap, .... Oh my god, it's realtime again. Code less, do more, Deploy very quickly. Just finished coding and want to post it on the web, just “ meteor deploy . If you want a mobile application, just "meteor build android" and you're done. I tried making a real-time to-do-list using Meteor. Sign-in only requires about 3 lines of code (Just logged in normally and I haven't registered with Google or Facebook yet). Deploying is also very fast, developing the entire application only takes 1 hour to learn and do. Edit (May 2, 2016): Currently, due to many users, Meteor no longer supports free deployment like before, you have to pay a fee 😥). There are still some shortcomings. In the beginning of the article, I slightly over-advertised Meteor. Actually, there are some aspects it does not do as well as old programming methods with C#, Java, Ruby, etc. It still has some shortcomings below: Only supports MongoDB as a database engine. View Engine Blaze is quite corny. Luckily, we can now replace it with AngularJS. SEO is also not good, because Meteor focuses on developing real-time, highly interactive applications. If you need to make a sales website, blog, news site, PHP & Joomla or WordPress is still the top choice. There are many modules but the documentation is not clear (The situation is similar to Nodejs's npm, there are many modules but the documentation is very vague and difficult to use). Should I try Meteor? Actually, I still just keep a cautious attitude, only use Meteor to build small applications, learn and play because it is still quite young. Companies are also a bit wary of using Meteor. However, according to my research, Meteor's future is quite bright, the Meteor development team is funded with more than $11 million. The Meteor community is also very crowded and growing. If you are a programmer and want to expand your knowledge, try learning Meteor. Who knows, maybe in 1 or 2 years it will become a trend, what if companies compete to recruit Meteor? If you are new to web programming, Meteor is also not a bad choice. With just a little knowledge of HTML/CSS/JS, you can build a website, a mobile application, it's not difficult, right? Some pretty good documents for those who want to learn more: Rate this: Like this: Related
Series gồm 3 phần: Thấy các bạn test hộ nhiều quá, mình rất cảm động nên đã thêm chức năng “đàm luận nhân sinh” vào bot để các bạn có người chém gió nhe. Các bạn có thể tiếp tục trò chuyện với bot tại m.me/toidicodedao nhé Ở phần trước , mình đã giới thiệu cơ chế hoạt động của bot Faceobok, cùng với một số khái niệm các bạn cần nắm rõ. Ở bài này, chúng ta sẽ bắt tay vào tạo fanpage và code nhé. Lần này mình hướng dẫn bằng video, các bạn bật phụ đề lên xem nhé. Bước 1 – Tạo Fanpage, thêm chức năng Messenger Các bạn làm theo clip dưới để tạo fanpage nhé. Với bạn nào đã có Fanpage thì xem đoạn sau để tích hợp chức năng Messenger vào fanpage. Tính mình thích ngắn gọn, không muốn lê thê dài dòng nên video cũng rất ngắn gọn, chỉ khoảng 1-2 phút để không lãng phí thời gian của mọi người. Bước 2 – Tạo Webhook và kết nối với Fanpage Như mình đã nói ở bài trước, viết bot bằng ngôn ngữ gì cũng được, chỉ tạo được webhook và gọi được RestAPI là ok. Tuy nhiên, Facebook sẽ check Webhook của bạn, đòi hỏi webhook phải là Việc code và deploy webhook sẽ khá phiền phức, do đó chúng ta sử dụng Cloud9 – IDE trên mây . Các bạn xem lại bài cũ để biết sơ cách sử dụng nhé. Sau khi đăng nhập vào cloud9, bạn làm theo các bước sau nhé. Link Github chứa code là Bạn đã thành công trong việc tạo Webhook và kết nối nó với fanpage. Mỗi khi có người nhắn tin cho fanpage, bot server sẽ nhận được tin nhắn. Bắt đầu viết code xử lý tin nhắn thôi nào. Bước 3 – Xử lý tin nhắn và trả lời Mỗi khi có tin nhắn, facebook sẽ POST một request như sau lên Webhook của chúng ta (Thông tin chi tiết về webhook ở đây ). Ta đọc trường messaging.message.text , xử lý và gửi chuỗi JSON sau đến RestAPI của facebook để trả lời (Thông tin chi tiết về API ở đây ). Các bạn tiếp tục làm theo video nhé Đây là file server.js thành quả cho các bạn ko đọc được code. Nhớ gắn token của bạn vào để chạy! Hiện giờ bạn có thể test và viết thêm chức năng cho bot của mình được rồi đấy. Ở phần 3 mình sẽ hướng dẫn cách deploy bot lên server và submit cho Facebook duyệt nhé. Rate this: Like this: Related
The series consists of 3 parts: Seeing that you guys tested so much for me, I was so touched that I added the "life discussion" function to the bot so that you guys have someone to chat with. You can continue chatting with the bot at m.me/toidicodedao. In the previous part, I introduced the operating mechanism of the Faceobok bot, along with some concepts you need to understand. In this article, we will start creating a fanpage and code. This time I will guide you with a video, please turn on the subtitles to watch. Step 1 - Create Fanpage, add Messenger function. Follow the clip below to create a fanpage. For those of you who already have a Fanpage, see the following paragraph to integrate the Messenger function into your fanpage. I like to be concise and don't want to be long-winded, so the video is also very brief, only about 1-2 minutes so as not to waste everyone's time. Step 2 - Create Webhook and connect to Fanpage As I said in the previous article, writing a bot in any language is okay, just creating a webhook and calling RestAPI is ok. However, Facebook will check your Webhook, requiring the webhook to be. Coding and deploying webhook will be quite troublesome, so we use Cloud9 - IDE on the cloud. Please review the old article to learn how to use it. After logging in to cloud9, follow these steps. The Github link containing the code is You have successfully created a Webhook and connected it to the fanpage. Every time someone messages the fanpage, the bot server will receive the message. Let's start writing code to handle messages. Step 3 - Processing messages and replying Every time there is a message, Facebook will POST a request as follows to our Webhook (Detailed information about webhooks here). We read the messaging.message.text field, process it, and send the following JSON string to facebook's RestAPI for a response (Detailed information about the API here). Please continue following the video. This is the resulting server.js file for those who cannot read the code. Remember to attach your token to run! Now you can test and write additional functions for your bot. In part 3, I will show you how to deploy the bot to the server and submit it to Facebook for approval. Rate this: Like this: Related
Chuyện ngày xưa Đã từng có thời, code là một việc cực kỳ mệt nhọc và nhàm chán. Đã từng có thời, lập trình việc phải làm việc với từng byte từng bit một. Đã từng có thời, code phải được viết ra giấy, đóng thành thẻ rồi đút vào máy. Đã từng có thời, ta phải mất cả năm trời để tạo giao diện, quản lý bộ nhớ, viết một chương trình đơn giản. Chuyện ngày nay Tuy nhiên, những ngày tháng đó đã chìm vào quá khứ. Như mình đã nhắc tới ở bài trước , lập trình là việc kế thừa những nền tảng được xây dựng bởi những người đi trước. Hàng loạt thư viện/framework ra đời, giúp việc code trở nên nhàn hạ dễ dàng hơn. Ngày xưa, để làm một website, ta phải học HTML/CSS , viết từng dòng code bằng tay, sau đó hì hục up lên mạng. Giờ đây, chỉ cần 1, 2 ngày với WordPress, Zoomla, Wix… ta đã có một website lung linh chễm chệ trên mạng. Với ứng dụng phức tạp hơn, ta cũng có thể viết nhanh chóng bằng Ruby on Rail, NodeJS, Meteor , … Thế nhưng, cuộc đời rất công bằng, có được thì cũng có mất. Những thư viện /framework này làm cuộc sống của bạn dễ dàng hơn nhưng cũng là trở ngại đường bạn trên con đường truy cầu đỉnh cao “code đạo”. Các framework này giúp bạn làm được nhiều thứ một cách nhanh chóng, nhưng cũng làm bạn trở nên “lười biếng” và “ngu ngốc” hơn. Hiện đại hay… hại điện??? Hiện nay, đa phần việc lập trình đều dựa trên thư viện/framework, do sự mạnh mẽ và tiện dụng của nó. Có thể nói, sự xuất hiện tràn lan của các thư viện/framework đã sinh ra một thế hệ developer làm biếng (Trong đó cũng có mình, ngại quá :”>), suốt ngày chỉ biết gọi API, dùng framework. Họ có thể học lướt, nắm được cách dùng của một framework rất nhanh, và nghĩ rằng mình đã “thành thạo” ngôn ngữ /framework đó. Tiếc thay, đời đâu có đơn giản như thế. Nếu một đứa trẻ lớn lên trong chăn ấm nệm êm, chỉ biết ăn sung mặc sướng thì nó sẽ không biết việc kiếm tiền cực khổ thế nào. Lập trình viên cũng thế, đôi khi ta mải hì hục cắm đầu vào viết code cho chạy mà không hiểu được nó làm những gì. Mình đã gặp vài bạn có dùng Unity, StructureMap mà không hiểu IoC là gì, tại sao phải dùng . Mình cũng từng làm chung nhóm với vài bạn sử dụng Entity Framework nhoay nhoáy nhưng không biết lambda expression là gì, không hiểu câu SQL được sinh ra thế nào, mapping object ra sao, tại sao câu query viết ra lại chậm. Nếu không thật sự hiểu cách một framework hoạt động, không hiểu tường tận một ngôn ngữ, bạn sẽ không bao giờ đạt tới đỉnh cao , mãi mãi chỉ là thằng thợ code , cầm bàn phím đi code dạo (như mình) mà thôi. Những thứ thuộc về bề mặt như cú pháp, cách gọi hàm ,… có thể dễ dàng học được một cách nhanh chóng. Nhưng những thứ sâu xa hơn như: cơ chế hoạt động của framework, xử lý asynchronous, performance, tổ chức/thiết kế code và file hợp lý,… không thể học được trong một sớm một chiều. Những kiến thức dạng này chỉ có thể đạt được sau một quá trình Những kiến thức dạng này chỉ có thể đạt được sau một quá trình ăn dầm nằm dề lâu dài với ngôn ngữ/framework đó. Ví dụ như trong đoạn code dưới đây, javascript senior dev chỉ cần 10-30s là có thể nhìn ra vấn đề, trong khi nhiều developer có thể phải mất cả 15-30p hoặc hơn để tìm hiểu và fix lỗi. Con đường nào tới đỉnh cao “code đạo” Trong một bài viết khác, mình đã từng nói rằng đôi khi code là cách ngu nhất để giải quyết vấn đề “. Thế nhưng, sẽ có nhiều khi bạn gặp phải trường gặp “code là cách duy nhất để giải quyết vấn đề”. Đôi khi, có vấn đề rất khó nhằn: cần optimize tốc độ, bug nằm trong framework. Để giải quyết những vấn đề này, ta phải có một nền tảng kiến thức vững, một cái nhìn thông suốt về bản chất framework/ngôn ngữ – thứ chỉ có thể đạt được thông qua quá trình tiếp xúc lâu dài. Các bậc cao nhân xưa cũng từng nói: Không có đường tắt để đi tới đỉnh cao võ đạo (Đường tắt tới đỉnh Phan-xi-păng thì có, vì người ta vừa xây cáp treo xong). Các cụ nước ngoài cũng khuyên là: Để giỏi lập trình, hãy học trong 10 năm. Kiến thức có thể nhồi nhét vào đầu thông qua video hoặc sách vở. Song để biến nó thành kĩ năng , thành kinh nghiệm, bạn cần bỏ thời gian để tự mình tiêu hóa, trải nghiệm. Tổng kết lại, điều mình muốn gửi gắm tới các bạn là: các thư viện/framework có thể giúp bạn làm việc nhanh chóng và hiệu quả hơn nhiều; dùng chúng thì dễ, nhưng để thật sự thông thạo chúng, bạn phải cố gắng tìm hiểu cơ chế hoạt động, bản chất thực sự , các best practice,… của chúng. Nhớ đừng tự cho là mình giỏi, mình đã biết hết mà hãy luôn giữ thái độ hoài nghi, tò mò “tại sao code chạy được, tại sao lại được API thiết kế như vậy, …”. Nhớ theo dõi series phản phác qui chân này để trau dồi thêm các vấn đề cơ bản nhé. Xin kết bài bằng lời khuyên của thầy Khánh , một người thầy tại Đại học FPT mà mình khá kính trọng: Cái quan trọng nhất là phải nắm rõ bản chất vấn đề . Các ông có thể dùng thư viện, dùng framework gì cũng được, nhưng phải hiểu rõ code tụi nó làm gì trong đó ! Rate this: Like this: Related
Once upon a time, coding was an extremely tiring and boring job. There was a time when programming had to work with bytes bit by bit. There was a time when code had to be written down on paper, made into cards, and then inserted into the machine. There was a time when it took us a year to create an interface, manage memory, and write a simple program. Today's story However, those days have sunk into the past. As I mentioned in the previous article, programming is about inheriting the foundations built by predecessors. A series of libraries/frameworks were born, making coding easier and more leisurely. In the past, to make a website, we had to learn HTML/CSS, write each line of code by hand, then upload it online. Now, in just 1 or 2 days with WordPress, Zoomla, Wix... we have a sparkling website on the internet. With more complex applications, we can also write quickly with Ruby on Rail, NodeJS, Meteor, etc. However, life is very fair, there are also losses. These libraries/frameworks make your life easier, but they are also obstacles in your pursuit of "virtuous coding". These frameworks help you do many things quickly, but also make you "lazier" and "stupid". Modern or... harmful to electricity??? Currently, most programming is based on libraries/frameworks, due to its power and convenience. It can be said that the widespread presence of libraries/frameworks has given birth to a generation of lazy developers (including me, so shy :”>), who only know how to call APIs and use frameworks all day long. They can learn quickly, grasp how to use a framework very quickly, and think they have "mastered" that language/framework. Unfortunately, life is not that simple. If a child grows up in warm blankets and soft mattresses, knowing only how to eat and wear well, he or she will not know how hard it is to make money. Programmers are the same, sometimes we are so busy writing code to run that we don't understand what it does. I've met a few people who use Unity and StructureMap but don't understand what IoC is or why they have to use . I also worked in a group with a few people who used Entity Framework but didn't know what a lambda expression was, didn't understand how SQL statements were generated, how objects were mapped, and why the written queries were slow. If you don't really understand how a framework works, if you don't understand a language thoroughly, you will never reach the top, forever just a coder, holding a keyboard and coding (like me). Surface things like syntax, function calls, etc. can be easily learned quickly. But deeper things such as: the framework's operating mechanism, asynchronous processing, performance, proper organization/design of code and files, etc. cannot be learned overnight. This type of knowledge can only be achieved after a process. This type of knowledge can only be achieved after a long process of working with that language/framework. For example, in the code below, javascript senior dev only needs 10-30 seconds to see the problem, while many developers may take 15-30 minutes or more to learn and fix the error. Which way to the peak of "code ethics" In another article, I once said that sometimes coding is the stupidest way to solve problems. However, there will be many times when you encounter a situation where "code is the only way to solve the problem". Sometimes, there are very difficult problems: need to optimize speed, bugs are in the framework. To solve these problems, we must have a solid knowledge base, a clear view of the nature of the framework/language - something that can only be achieved through long-term exposure. Ancient masters also said: There is no shortcut to reach the pinnacle of martial arts (There is a shortcut to Fansipan peak, because people have just finished building the cable car). Foreign experts also advise: To be good at programming, study for 10 years. Knowledge can be crammed into your head through videos or books. But to turn it into a skill, into experience, you need to take the time to digest and experience it yourself. To summarize, what I want to convey to you is: libraries/frameworks can help you work much faster and more efficiently; Using them is easy, but to truly master them, you must try to understand their mechanism of operation, true nature, best practices, etc. Remember not to think that you are good or that you know everything, but always keep a skeptical and curious attitude "why does the code work, why is the API designed like that,...". Remember to follow this series of reflections on the truth to hone more basic issues. I would like to end the article with advice from Mr. Khanh, a teacher at FPT University that I respect quite a bit: The most important thing is to clearly understand the nature of the problem. You can use any library or framework, but you must clearly understand what the code does in it! Rate this: Like this: Related
Dạo này vì lo viết bài technical và chém gió về nghề nghiệp dữ quá nên lâu rồi cũng chưa viết bài nào review sách . Từ đầu tháng 1 tới giờ mình cũng đọc được khoảng 5,6 cuốn nhưng không phải sách lập trình nên không review chém gió được. Cuốn sách này mình đọc xong hồi tháng 12 năm ngoái , kể về một dự án thất bại nổi đình nổi đám. Thôi thì đầu năm đầu tháng lôi tháng lôi thất bại của người khác ra review để rút kinh nghiệm vậy…. Giới thiệu – Tóm tắt Tên đầy đủ của cuốn sách là: Dreaming in Code – Two dozen programmers, three years, 4732 bugs, and one quest for transcendent software (Tạm dịch: Nửa đêm mơ code – 2 tá lập trình viên, 3 năm, 4 nghìn 7 trăm 32 con bug, và 1 hành trình truy cầu phần mềm siêu việt ). Mình tình cờ đọc được review của cuốn này trên blog Joel on Software (Ai theo dõi blog mình chắc cũng biết lão này là cựu nhân viên Microsoft, người sáng lập StackOverflow ). Tuy chưa tới mức thuộc dạng sách gối đầu giường như Code Complete, The Mythical Man-Month, Peopleware,… nhưng nó cũng được nhiều người khuyên đọc. Cuốn sách kể về một dự án …. thất bại . Ối dzời! Dự án trong ngành phần mềm thì thất bại là chuyện thường ngày : có thể là do kinh phí không đầy đủ, thời gian quá gấp gáp, do xung đột giữa thành viên và quản lý , hoặc do trình độ lập trình viên quá thấp, không đủ khá năng để hoàn thành công việc…. Tuy nhiên, dự án trong sách, với cái tên xinh đẹp là Chandler, lại hoàn toàn không gặp phải những vấn đề trên. Product Owner của dự án là Mitch Kapor , người tạo ra Visicalc và Lotus – cha đẻ của Excel thần thánh, do đó không cần bàn về khả năng technical của ổng. Dự án được đầu tư một nguồn vốn khổng lồ, thu hút khá nhiều lập trình viên tài năng /gạo cội trong giới open-source. Ấy thế mà, nó vẫn cứ… thất bại , muốn biết vì sao à, tải ebook về đọc đi nhé :)). Nhận xét Dream in Code sẽ kể bạn nghe câu chuyện thất bại của dự án Chandler, từ giai đoạn trong trứng nước cho tới lúc release ra mắt công chúng. Lối kể chuyện của sách khá hấp dẫn và cuốn hút, tuy không gây nghiện như Harry Potter hay Eragon nhưng cũng làm bạn dán mắt vào sách, không dứt ra được khi dõi theo những bước đi của dự án. Do dựa trên một câu chuyện có thật, ta hoàn toàn có thể cảm thông và thấu hiểu với những nhân vật trong sách – những người cũng cắm đầu vào code cả ngày như chúng ta. Sau những tháng đầu tiên đầy lửa nhiệt huyết và đam mê , những tháng sau dự án bắt đầu sa lầy do các vấn đề kĩ thuật, requirement, quản lý, làm việc nhóm , … đọc vừa bực mình vừa ức chế: “Hóa ra bọn nước ngoài tuy chuyên nghiệp, team toàn người giỏi mà cũng phạm mấy cái lỗi lầm cơ bản thế à”. Sách khá dễ hiểu và dễ đọc, do chỉ toàn là kể chuyện nên đọc sách cũng giống như đọc hồi kí vậy thui. Với các bạn sinh viên hoặc mới ra trường thì mình không khuyến khích đọc cuốn này, sẽ cảm thấy khó hiểu vì không mường tượng môi trường làm việc/quá trình phát triển của một dự án, đi làm một thời gian hẵng đọc. Nói một cách khách quan, cuốn sách cũng không có ích mấy cho các bạn lập trình viên, vì nó không giúp các bạn code giỏi hơn hay làm việc hiệu quả hơn. Song với các bác ở cấp quản lý thì cuốn sách này lại khá là đáng đọc . Sách đầy những sai lầm về tổ chức/quản lý, cụ Mác đã nói “Hãy học từ sai lầm của người khác. Bạn sẽ không bao giờ sống đủ lâu để phạm phải tất cả sai lầm”. Các bác quản lý nếu chịu khó đọc cuốn này chắc cũng rút ra được nhiều điều. Kết luận : Nói sách không có ích không có nghĩa là nó không hay. Nếu bạn nào có đam mê đọc sách , muốn tìm hiểu thêm về ngành mình đang làm thì cứ thoải mái lên amazon đặt mua hoặc tải cuốn này về đọc nhé. Sách chỉ khoảng hơn 350 trang thôi, văn phong ngắn gọn đơn giản nên đọc 2 ngày cuối tuần với vài hôm là xong ngay. Rate this: Like this: Related
Lately, because I'm so worried about writing technical articles and gossiping about my career, I haven't written any book review articles for a long time. Since the beginning of January until now, I have read about 5 or 6 books, but they are not programming books, so I cannot review them to gossip. I finished reading this book last December, telling about a famous failed project. Well, at the beginning of the year, at the beginning of the month, I drag out the month and month to review other people's failures to learn from experience... Introduction - Summary The full name of the book is: Dreaming in Code – Two dozen programmers, three years, 4732 bugs, and one quest for transcendent software (Temporarily translated: Midnight dreaming of code – 2 dozen programmers, 3 years , 4 thousand 7 hundred 32 bugs, and a journey in pursuit of superior software). I accidentally read a review of this book on the blog Joel on Software (Those who follow my blog probably know that this guy is a former Microsoft employee and founder of StackOverflow). Although it is not at the level of a bedside book like Code Complete, The Mythical Man-Month, Peopleware,... but it is still recommended to read by many people. The book is about a project…. failure . Oh my god! Project failure in the software industry is a common occurrence: it can be due to insufficient funding, too tight a schedule, conflicts between members and management, or due to low programmer qualifications. not competent enough to complete the job…. However, the project in the book, with the beautiful name Chandler, does not encounter these problems at all. The Product Owner of the project is Mitch Kapor, the creator of Visicalc and Lotus - the father of the divine Excel, so there is no need to discuss his technical abilities. The project invested a huge amount of capital, attracting many talented/veteran programmers in the open-source world. Yet, it still... fails. If you want to know why, download the ebook and read it :)). Dream in Code reviews will tell you the story of the failure of the Chandler project, from its infancy to its public release. The storytelling style of the book is quite attractive and engaging. Although not as addictive as Harry Potter or Eragon, it still keeps you glued to the book and unable to stop watching the steps of the project. Because it is based on a true story, we can completely sympathize and understand the characters in the book - people who also work on code all day like us. After the first months full of enthusiasm and passion, the following months the project began to get bogged down due to technical issues, requirements, management, teamwork,... reading was both frustrating and frustrating: "It turns out Even though foreigners are professional and have a team full of good people, they still make such basic mistakes." The book is quite easy to understand and read. Because it's all about storytelling, reading the book is like reading a memoir. For students or new graduates, I do not recommend reading this book. You will find it difficult to understand because you cannot imagine the working environment/development process of a project. After working for a while, you will have to read it. Objectively speaking, the book is not very useful for programmers, because it does not help you code better or work more efficiently. But for those at the management level, this book is quite worth reading. The book is full of organizational/management mistakes. Mr. Marx said, "Learn from the mistakes of others. You will never live long enough to make all the mistakes.” Managers, if you take the trouble to read this book, you will probably learn many things. Conclusion: Saying the book is not useful does not mean it is not good. If you are passionate about reading and want to learn more about the industry you are working in, feel free to go to Amazon to order or download this book to read. The book is only about 350 pages, the writing style is short and simple, so you can read it in 2 weekends or a few days and finish it immediately. Rate this: Like this: Related
Hôm trước có vài bạn hỏi về cuộc sống học hành nước ngoài thế nào, sẵn hôm nay rảnh nên mình viết bài miêu tả luôn. Hồi mới qua mình có viết một bài kể sơ sơ rồi, giờ trong bài này mình sẽ giới thiệu/khoe khoang những cái hay hay của trường nước ngoài. Các cụ có câu là “Tốt đẹp khoe ra, xấu xa đậy lại” nên mình không nhắc tới khuyết điểm nhé, chỉ khoe thôi. Trường bự ơi là bự Cảm giác đầu tiên những ngày đầu mình mới vào học là: Trường bự quá =)). Mình sống ở Lancaster, thành phố cũng nho nhỏ nên chắc vì vậy giá đất cũng rẻ. Xem sơbản đồ thì toàn bộ khuôn viên trường dài hơn 1km, rộng gần 1km, tính ra diện tích vào khoảng 1km vuông. Do bự quá nên trường có tận… 9 cái kí túc xá (Chia làm 9 college) rải rác trong khuôn viên trường. Mình ở Graduate College, kí túc xá dành riêng cho dân học thạc sĩ, không đông vui nhộn nhịp như ktx cho các bé Đại Học, lại xa trung tâm trường, được cái là yên tĩnh. Như đã nói, vì rộng nên trường có khá đầy đủ tụ điểm ăn chơi giải trí. Mỗi ktx có 1 cái bar nho nhỏ riêng (Vào chuyện trò uống rượu chứ không quẩy được). Ngoài ra, trong khuôn viên trường còn có 6 sân bóng đá, 1 sân tennis, 1 phòng gym, bể bơi và vài cái sân gì gì đấy. Vốn lười thể thao và lười đi xa nên mình chẳng ghé mấy cái sân này bao giờ!. Đồ ăn bên này thì không ngon, trường có vài tiệm cafe, vài quán ăn mà mình chả vừa miệng món gì, toàn tự nấu. Cơ sở vật chất hiện cmn đại Vì học phí tính ra cũng khá đắt (Cỡ 3-500 triệu/năm), nên dĩ nhiên trường nào cũng phải đầu tư vào trang thiết bị để học sinh thấy đáng tiền (Bọn học sinh mà review thấp là trường tụt hạng nên các trường sợ lắm). Cái sướng đầu tiên mà mình thấy là: Trường có một tòa nhà Learning Zone mở cửa 24/7 , đèn điện sáng choang dù có là 1,2 giờ đêm. Khu Learning Zone này có bàn học, ghế nệm, sofa, đủ cho học sinh nằm vạ vật lăn lóc mà theo đuổi sự nghiệp học hành. Nếu chán Learning Zone, sinh viên có thể mò qua thư viện , cũng mở cửa 24/7 nốt. Cỡ 9-10h tối vào thư viện là các bạn sẽ thấy không khí học tập rất nhộn nhịp, ai cũng ngồi máy tính/laptop với đống sách cùng tài liệu để sẵn (Chẳng bù ngày xưa mình học FPT HCM, thư viện bé tẻo teo, sinh viên vào toàn chơi game ). Thư viện trường mình hơi cổ, sách thì cũng nhiều nhưng thiết kế không được hiện đại cho lắm. Thư viện và Learning Zone khá bự, mỗi tầng có khoảng 10-20 phòng học nhóm, các phòng này chứa được 5, 6 người, có đầy bảng trắng, bút và máy chiếu. Mỗi lần làm việc nhóm cứ đặt trước rồi vào quẩy, không lo bị người xung quanh làm phiền, sướng phải biết! Ngoài ra, các phòng lab để thực hành cũng rất sướng. Trường có khá nhiều vi tính đặt rải rác trong phòng lab, thư viện (Nhẩm sơ chắc phải hơn hơn 200 cái). Dạo này con laptop của mình giở chứng, chạy chậm còn hơn rùa nên mình toàn ra phòng lab ngồi code hoặc viết bài. Event nhiều tá lả Không chỉ về cơ sở vật chất, trường còn chịu khó đầu tư cho các event, seminar, workshop miễn phí để phục vụ cho sinh viên. Mỗi 1,2 tuần trường lại có 1 số workshop hướng dẫn cách viết CV , cách trả lời interview , toàn là những điều mà ngày xưa trường mình không dạy . Cỡ 2,3 tuần, trường lại mời một số bác nổi tiếng về để diễn thuyết, giới thiệu chủ đề. Ngành mình là Computer Science thuộc Computing and Communication School, nhưng course của mình có dính một chút đến Management School nên mình được đi event của cả 2 trường. Mấy buổi event này thường có thức ăn nhẹ, lâu lâu có buffet sandwich nên ăn free cũng khá sướng miệng. Tầm 1, 2 tháng, trường lại có Job Fair , các công ty gần xa về trường để giới thiệu bản thân, tuyển học sinh. Nhờ các Job Fair này, sinh viên ở đây cũng khá dễ tìm chỗ thực tập . Chỉ cần ra đấy hỏi thông tin, nộp đơn apply rồi chờ phỏng vấn là xong. Chẳng bù với Việt Nam, sinh viên tìm chỗ thực tập/làm việc muốn bở cả hơn tai. Bên cạnh các workshop về nghề nghiệp , hàng tuần trường đều có một số workshop về học tập : Hướng dẫn cách viết luận, ôn luyện kiến thức , cách thảo luận, thuyết trình ,… Các workshop này khá hay và bổ ích, giá mà các trường Đại học Việt Nam tham khảo và làm theo nhỉ. Bài đã dài rồi nên mình cũng không muốn khoe thêm nữa. Bạn nào đọc thấy thích thì cứ xem hướng dẫn của mình: chọn trường, nộp đơn rồi tìm học bổng và bay qua đây học nhé, chúc các bạn may mắn ;). Rate this: Like this: Related
The other day, a few people asked about life studying abroad. Since I'm free today, I wrote a descriptive article. Recently, I wrote a brief article, now in this article I will introduce/show off the good things about foreign schools. There's an old saying, "The good things are shown off, the bad things are covered up," so I won't mention the shortcomings, just show them off. The school is so big. My first feeling when I first started school was: The school is so big =)). I live in Lancaster, the city is small so maybe that's why land prices are cheap. Looking at the map, the entire campus is more than 1km long and nearly 1km wide, with an area of ​​about 1km square. Because it's so big, the school has 9 dormitories (divided into 9 colleges) scattered across the campus. I live in Graduate College, a dormitory reserved for people studying for master's degrees, not as crowded and bustling as dormitories for university kids, and far from the center of the school, so it's quiet. As mentioned, because it is large, the school has quite a few entertainment venues. Each dormitory has its own small bar (Go in to chat and drink, not party). In addition, on campus there are 6 soccer fields, 1 tennis court, 1 gym, swimming pool and some other fields. I'm lazy about sports and lazy to go far, so I never visit these stadiums! The food here is not good, the school has a few cafes, a few restaurants, but I don't have anything that I like, they all cook it themselves. Modern facilities Because tuition fees are quite expensive (about 3-500 million/year), of course every school has to invest in equipment to make students feel worth the money (Students review). If it's low, the school will drop in rankings, so schools are very afraid). The first happy thing I saw was: The school has a Learning Zone building open 24/7, the lights are bright even at 1 or 2 o'clock at night. This Learning Zone has desks, chairs, and sofas, enough for students to lie around and pursue their education. If students are bored with the Learning Zone, they can browse the library, also open 24/7. At about 9-10pm when you enter the library, you will see a very bustling learning atmosphere, everyone is sitting on a computer/laptop with piles of books and documents ready (No wonder in the past when I studied at FPT HCM, the library was small). Teo, students only come in to play games). My school's library is a bit old, there are many books but the design is not very modern. The library and Learning Zone are quite large, each floor has about 10-20 group study rooms, these rooms can accommodate 5 or 6 people, and are full of whiteboards, pens and projectors. Every time we work in a group, just book in advance and come in to party, don't worry about being bothered by people around you, it's fun! In addition, the labs for practice are also very nice. The school has quite a few computers scattered throughout the lab and library (I think there must be more than 200). Lately my laptop has been acting up, running slower than a turtle, so I always go to the lab to code or write articles. There are dozens of events. Not only in terms of facilities, the school also invests heavily in free events, seminars, and workshops to serve students. Every 1 or 2 weeks, the school has a number of workshops on how to write a CV, how to answer interviews, all things that in the past our school did not teach. Every 2 or 3 weeks, the school invites some famous doctors to lecture and introduce the topic. My major is Computer Science under Computing and Communication School, but my course has a little connection with Management School so I can go to events of both schools. These events often have light food, and sometimes there is a sandwich buffet, so eating for free is quite satisfying. Every 1 or 2 months, the school has a Job Fair, companies from near and far come to the school to introduce themselves and recruit students. Thanks to these Job Fairs, it is quite easy for students here to find internships. Just go out there and ask for information, submit an application and wait for the interview. It's no wonder that in Vietnam, students looking for internships/jobs want more money than money. Besides career workshops, every week the school has a number of learning workshops: Instructions on how to write essays, review knowledge, how to discuss, present, etc. These workshops are quite good and useful, if only Vietnamese universities should refer and follow. The article is already long so I don't want to brag any further. If you like reading this, just follow my instructions: choose a school, apply, find a scholarship and fly here to study, good luck ;). Rate this: Like this: Related
Hôm trước, mình đã kể chuyện đi phỏng vấn xin… code dạo ở nước ngoài được khá nhiều bạn ủng hộ. Kì này mình sẽ kể về ngày đầu tiên đi code dạo và những đồng nghiệp trong dự án nhé. Hôm đầu ngơ ngác Như mình đã kể, chắc do thiếu người hay dự án đang cần gấp nên quy trình phỏng vấn và tuyển dụng diễn ra rẹt rẹt, mình vừa phỏng vấn sáng thứ 4 hôm 10/2 thì có offer ngay chiều hôm đó, và sáng thứ 5 hôm sau phải xách đít đi làm . Bọn bên này làm ăn cũng đàng hoàng, send sẵn một cái file PDF hướng dẫn cách liên hệ với admin request account, set vào các group. Do team cũng nhỏ nên trong file có ghi đầy đủ tên thành viên, chức vụ, sở thích (chắc để mọi người gần gũi với nhau hơn), đọc cũng khá là vui. Danh sách thành viên trong team. Bé Alice là cái bé PV mình nhắc tới trong bài trước ý Hôm đầu đi làm mình… ngơ ngác không biết gì. Cái tòa nhà ISS của trường khá to nên tới nơi rồi mình vẫn không biết mình làm ở chỗ nào, thế là đành phải nói với lễ tân rồi ngồi chờ người khác xuống dắt mình lên. Team của mình khá nhỏ, chỉ chiếm khoảng 2 dãy bàn. Vì phần lớn thành viên đều là part-time trừ bác Brian Product Owner và anh Liam Lead team Front-end, chỉ có khoảng 4 máy trống, không có máy riêng cho mỗi người người. Có vài hôm thành viên của team đi đông đủ quá, không đủ máy để code thế là đành phải lôi laptop ra code =))). Đồng nghiệp dễ thương Team của mình phát triển ứng dụng di động iLancaster, một ứng dụng hỗ trợ sinh viên của Đại học Lancaster và đang mở rộng ra cho cư dân sử dụng. Vì công việc của mình là code front-end nên mình làm chung team với anh Liam. Anh này khá là đẹp trai, thân thiện và lịch sự. Mình gặp thì anh dắt ngay vào phòng họp để giới thiệu tổng quan về cấu trúc/ công nghệ của project hiện tại (Cái này kể sau nhe). Sau khi về máy ngồi, anh còn tận tình hướng dẫn cách đăng nhập vào Visual Studio Team, lấy code từ TFS về, làm sao để build và chạy trên local, thiệt tận tình hết sức. Anh Liam đang giải thích code cho mình thì bác Brian chen vào, bảo anh Liam là “Cùng là developer cả, code trước sau gì thì cũng show, dắt đi show mấy chỗ khác trước đã”. Thế là bác và anh Liam dẫn mình ra “góc giải trí” nho nhỏ gần đấy. Chỗ này có phích nước, tủ lạnh, trà/cà phê/sữa miễn phí, làm mình nhớ tới những ngày ở ASWIG , sáng này cũng làm gói trà đào, trà chanh hoặc cafe free của công ty. Lần đầu mình hơi lóng ngóng hay sao mà làm rơi vãi cả đống đường, thiệt là mất hình tượng =))). Anh Liam đứng bên trái (Đẹp trai hơn mình xí). Bạn bên phải là ai không nói các bạn cũng biết rồi Đôi lời về văn hóa làm việc của bọn này: Không hiểu có phải do văn hóa Anh hay không mà bọn ở đây cứ lâu lâu lại hỏi “Are you okay? Any problem?” để hỏi mình có gặp khó khăn gì không, cần giúp đỡ gì không. Các bạn ý cũng không có vẻ khó chịu khi bị hỏi (Hoặc có thể khó chịu nhưng không thể hiện ra) mà luôn trả lời/giúp đỡ hết sức nhiệt tình, bản thân mình thấy mình nên học hỏi điều này. Trước giờ nữ hỏi thì mình mới nhẹ nhàng nhiệt tình trả lời , còn nam hỏi thì mình hay tỏ vẻ khó chịu lắm :P. Một điều nữa là có vẻ dân bên này hơi chê tiền. Các cửa hàng, tiệm cafe chỉ mở cửa từ 10-11h sáng… 5-6h chiều, vào T7 CN còn đóng cửa sớm hơn, vào khoảng 4-5h chiều gì đó. Hôm đầu đi làm, vừa đúng 5h là anh Liam nhắc nhớ mình nhìn đồng hồ rồi chuẩn bị đi về (Không có OT ô tiếc gì như VN đâu nhé). Ở chỗ làm còn có một cái chuông “thần thánh”, đúng 12h trưa sẽ có người đánh chuông để mọi người xung quanh biết mà nghỉ trưa. Cái chuông báo nghỉ trưa “thần thánh” Tuy thế, team lại làm việc rất nghiêm túc. Đặc biệt, các bác rất thích hiểu tường tận vấn đề, tập trung vào điều user thật sự cần chứ không đơn thuần chỉ là chức năng. Đơn cử như chuyện nho nhỏ dưới đây: Mình và anh Liam đang làm chức năng Adopt An Animal, cho phép các trung tâm đăng thông tin về chó mèo, người dùng vào nhận nuôi. Bác Liam muốn mỗi trung tâm có thể tạo 1 danh các thông số riêng (Màu lông, tuổi, cân nặng, thuộc giống gì). Mình và anh Liam đề nghị rằng nên có 1 danh sách thông số chung để người dùng có thể dễ dàng tìm kiếm . Đây là nội dung cuộc nói chuyện (Mỗi lần bàn về requirement là bác Brian toàn hỏi Cái gì? Tại sao? =)) ). Liam: Thay vì mỗi trung tâm có 1 danh sách thông số riêng, ta nên có 1 danh sách chung, chuẩn hóa các thông số. Brian: Tại sao lại cần chuẩn hóa các thông số? Mình: Nếu không có các thông số chung thì người dùng không thể search/filter dựa theo thông số được . Brian: Tại sao người dùng cần chức năng search/filter . Liam & mình: … Brian: Với chức năng search/filter, họ chỉ tìm thứ họ muốn, chó mèo có thông số không hợp sẽ không được hiển thị. Mục tiêu của ứng dụng là để người dùng xem càng nhiều động vật càng tốt. Việc filter chỉ nên hỗ trợ một số thông số cơ bản như: Loại (chó/mèo), Kích cỡ (lớn/nhỏ)… mà thôi. Sau một hồi thảo luận thì cuối cùng team cũng thống nhất là chỉ có 4,5 thông số cơ bản là bắt buộc, các thông số khác có thể customised tùy theo trung tâm. Ở đây, mình và anh Liam đã tập trung vào chức năng và quên mất mục đích của ứng dụng, may là có bác Brian nhắc nhở. Định viết một bài thôi mà không ngờ dài quá nên đành phải chia làm 2 phần, thôi các bạn chịu khó đón xem phần 2 nhé. Nội dung phần 2 sẽ chia sẽ một chút về technical của dự án, trải nghiệm của mình khi pair-programming và ăn nhậu với team ;). Rate this: Like this: Related
The other day, I told the story of going for an interview to... code in a foreign country, which was supported by many people. This time I will tell about the first day of coding and my colleagues in the project. The first day, I was confused. As I said, it was probably due to a lack of people or a project that was urgently needed, so the interview and recruitment process went smoothly. I just interviewed on Wednesday morning, February 10, and got an offer that afternoon. , and the next Thursday morning had to go to work. These people do business properly, sending a PDF file with instructions on how to contact the admin request account and set it up in groups. Because the team is small, the file has all members' names, positions, and interests written down (probably to make everyone closer to each other), which is quite fun to read. List of team members. Baby Alice is the PV baby I mentioned in the previous article. On my first day at work, I... was confused and didn't know anything. The school's ISS building is quite big, so when I got there I still didn't know where I was working, so I had to tell the receptionist and wait for someone to come down and take me up. My team is quite small, only occupying about 2 rows of tables. Because most members are part-timers except Mr. Brian Product Owner and Mr. Liam Lead of the Front-end team, there are only about 4 empty machines, no separate machines for each person. There were a few days when the team members were too crowded and there weren't enough computers to code, so we had to pull out our laptops to code =))). My cute colleague Team developed the iLancaster mobile application, an application that supports Lancaster University's students and is expanding it for residents to use. Because my job is front-end coding, I work in the same team as Liam. This guy is quite handsome, friendly and polite. When we met, he immediately took us into the meeting room to give an overview of the structure/technology of the current project (This will be discussed later). After returning to the computer, he also enthusiastically guided me on how to log in to Visual Studio Team, retrieve code from TFS, and how to build and run locally, really enthusiastically. Mr. Liam was explaining the code to me when Mr. Brian interrupted and told Mr. Liam, "We are both developers, we will show the code first, take it to other places first." So uncle and Liam took me to a small "entertainment corner" nearby. This place has a thermos, refrigerator, and free tea/coffee/milk, which reminds me of the days at ASWIG. This morning, we also make packs of peach tea, lemon tea, or free coffee from the company. The first time I was a bit clumsy and spilled a bunch of sugar, it really ruined my image =))). Liam is standing on the left (More handsome than me). Who is the guy on the right? If you don't say anything, you already know. A few words about our working culture: I don't know if it's because of British culture or not, but everyone here keeps asking "Are you okay?" Any problem?” to ask if I'm having any trouble or need any help. They also don't seem uncomfortable when asked (Or maybe uncomfortable but don't show it) but always answer/help enthusiastically. I feel like I should learn this. Before, when women asked, I answered gently and enthusiastically, but when men asked, I often looked very annoyed :P. Another thing is that people here seem to hate money a bit. Shops and cafes only open from 10-11 am... 5-6 pm, on Saturdays and Sundays they close even earlier, around 4-5 pm or so. On the first day of work, just after 5 o'clock, Liam reminded me to look at the clock and prepare to go home (There is no such thing as a regretful OT like Vietnam). At work there is also a "divine" bell. At exactly 12 noon, someone will ring the bell to let everyone around know to take their lunch break. The "divine" lunch bell. However, the team worked very seriously. In particular, they really like to thoroughly understand the problem, focusing on what the user really needs, not just the function. For example, this little story below: Liam and I are working on the Adopt An Animal function, allowing centers to post information about cats and dogs, and users can adopt them. Uncle Liam wants each center to be able to create its own list of parameters (coat color, age, weight, breed). Liam and I suggested that there should be a list of common parameters so that users can easily search. This is the content of the conversation (Every time we discuss requirements, Brian always asks What? Why? =)) ). Liam: Instead of each center having its own list of parameters, we should have a common, standardized list of parameters. Brian: Why is it necessary to standardize the parameters? Me: If there are no common parameters, users cannot search/filter based on parameters. Brian: Why do users need search/filter functionality? Liam & I: … Brian: With the search/filter function, they only find what they want, dogs and cats with inappropriate parameters will not be displayed. The goal of the app is for users to see as many animals as possible. Filtering should only support some basic parameters such as: Type (dog/cat), Size (large/small)... only. After a period of discussion, the team finally agreed that only 4.5 basic parameters are required, other parameters can be customized depending on the center. Here, Liam and I focused on functionality and forgot the purpose of the application, luckily Uncle Brian reminded us. I intended to write just one article but I didn't expect it to be too long so I had to divide it into 2 parts, so please stay tuned for part 2. The content of part 2 will share a bit about the technical aspects of the project, my experience when pair-programming and eating and drinking with the team ;). Rate this: Like this: Related
Định viết một bài thôi mà không ngờ dài quá nên phải chia làm 2 phần luôn. Nội dung phần 2 này sẽ chia sẽ một chút về technical, trải nghiệm khi pair-programming và ăn nhậu với team ;). Đống code như đống *beep* Nói chuyện con người đủ rồi, giờ nói chuyện technical một chút nào. Ứng dụng của team được xây dựng trên framework CampusM . Framework này là cũng tương tự Ionic Framework , hỗ trợ viết app di động kiểu hybrid-app bằng HTML, CSS, JavaScript. Vì nó khá mạnh, tích hợp được nhiều thứ nên được một số trường Đại học ở UK sử dụng, trong đó có trường mình. Ngày xưa, team sử dụng phiên bản 1 của framework (AEK 1) để viết các chức năng. Gần đây, framework ra phiên bản AEK 2 (Tích hợp React , Redux và ES6 khá hầm hố), một số chức năng mới lại viết bằng AEK 2. Thế là code chia ra làm “code cũ” và “code mới”, cái nào cũng đủ chuyện nhức đầu. Ở phiên bản AEK 1, mỗi chức năng được viết trong 1 file duy nhất , chứa hết cả HTML, CSS, JavaScript. Nhìn code rối một cục mà mình chỉ biết lắc đầu thở dài ngao ngán. Chưa kể, các bác developer cũ khá thần thánh khi để HTML trong String, sau đó chơi trò cộng chuỗi HTML trong JavaScript . Do framework AEK có sử dụng dấu {{}} nên các template Javascript như Handlebar bó tay, báo hại mình phải dùng Underscore template để làm code rõ ràng, trong sáng hơn. Qua phiên bản AEK 2, mỗi module có chia folder riêng, tách component rõ ràng, cảm giác sướng hơn hẳn. Khổ nỗi mình trước giờ có biết React là cái khỉ gì đâu, thế là phải lên pluralsight cài gấp 2,3 khóa về React. Cũng may là nhớ có một vài kiến thức nền tảng và kinh nghiệm nên việc học cũng tương đối dễ dàng, mình chỉ mất thứ bảy chủ nhật để xem clip là hiểu và tham gia ngay việc code được. Song có vấn đề khiến mình bực mình: framework mới ra nên bọn này viết document chưa đầy đủ rõ ràng. Nhiều chỗ không biết hỏi ai , lên google cũng không thấy (vì framework ít người dùng), đành phải lục source code để xem bọn nó hoạt động thế nào, vừa lục lôi bọn viết framework ra mà chửi. Do sử dụng framework nên ứng dụng phải chạy được trên cả Android, iOS và Web. Tuy nhiên, căn chỉnh responsive để ứng dụng hiển thị tốt trên toàn bộ thiết bị là một cái chuyện sida và mệt mỏi. Team có nguyên 1 tủ chứa đầy device để test nhưng do lười nên mình chưa lấy device ra test bao giờ, chụp tấm hình làm cảnh thôi. Tuy nhiên, mình học được vài điều khá thú vị thông qua dự án, đó là phải “đặt mình vào vị trí của user”. Mỗi người thường implement đầu đủ một chức năng từ đầu tới cuối. Mỗi khi viết code xong, admin (bé Alice) sẽ xem xét và đưa lên môi trường production để người dùng có thể dùng ngay, nhận feedback và cải tiến. Nhờ vậy, mình có cảm giác là “Thứ mình code ra có người dùng , phải code có lương tâm, từ UI/UX cho đến function”, chứ không chỉ là viết mấy dòng code xong để đó như ngày xưa nữa. Lần đầu pair programming Thế rồi một sáng t6 nọ, khi mình ngơ ngác chuẩn bị đi làm thì nhận được mail từ bác Brian – product owner. Mail bảo rằng hôm này có một thằng cu mới tên Geogre gia nhập team, buổi sáng nó sẽ được training sơ và framework, chiều thì pair programming với mình để học hỏi. Trước giờ mình có pair-programming đâu mà biết, mà “sếp” bảo thế thì thôi cứ làm đại vậy. Lên tới chỗ làm mới thấy Geogre là 1 thằng mập mập, học năm nhất ngành CS. Cơ mà thằng này cũng khá trâu so với tuổi, ngồi vừa pair-programming vừa nói chuyện mới biết nó code từ năm lớp 9, đã kinh qua VB, PHP, Java, JavaScript hết cả. Bố khỉ! Anh mày mới ra trường đi làm được 2 năm mà mày code đã được 3 năm rồi :v. Pair-programming tính ra cũng vui, mỗi người code nửa tiếng, người bên cạnh xem và góp ý, sau đó đổi lượt. Thằng Geogre tính ra cũng khá thông minh sáng dạ, suy nghĩ logic tốt, chỉ gì hiểu nấy, không biết là hỏi liền. Ban đầu mình cứ nghĩ là vừa code vừa giải thích sẽ mệt và mất thời gian, không ngờ việc suy nghĩ, tìm cách giải thích cho nó lại giúp mình suy xét vấn đề cẩn thận hơn, nghĩ ra cách giải quyết tốt hơn. Tuy nhiên để không mất mặt đàn anh, có vài lần mình dùng hotkey, viết JavaScript cú pháp ES6, dùng code đặt debugger, làm thằng ku ngơ ngác phải hỏi “How can you do that?”, tính ra mấy trò lòe thiên hạ này cũng hữu dụng vãi. Trước mình cứ nghĩ trò này tốn thời gian mà không ngờ hiệu suất lại cao phết, code 1 mình nhiều lúc mệt mệt lười lười lại code chậm, có thêm người nữa suy nghĩ cùng vừa vui lại vừa nhanh. Quẩy – hay còn gọi là Social Ngày trước, team chỉ có khoảng 5-6 thành viên. Dạo gần đây, do tuyển thêm vài người nên team trở nên “hơi bự”. Do đó, bé Alice tổ chức một bữa social (bên này gọi là social, ở VN mình gọi là nhậu hoặc teambulding). Ở bên này dân nó uống bia còn khiếp hơn cả mình, toàn uống bia cốc bự và không thèm uống đá, uống nhiều mà chẳng thấy say hay đỏ mặt. Team toàn dân kĩ thuật nên các bạn cũng ít chém gió, hầu như chỉ có bác Brian và anh Liam nói nhiều (mình thì mải ngắm vòng 1 bé Alice thôi :v). Đồ ăn bên này cũng chả có gì ngon nên mình cũng không thèm chụp hình đăng facebook. Sau bữa ăn, các bạn còn ra làm thêm chầu bia trước khi chuyển qua pub quẩy. Vì tuổi già sức yếu, tửu lượng có hạn nên mình đành ngậm ngùi về sớm, không đi tiếp tăng 2 với team được. Chụp tấm hình tự sướng kỉ niệm sẵn giới thiệu bác Brian, anh Liam đập chai và bé Alice cho các bạn luôn. Rate this: Like this: Related
I intended to write just one article but I didn't expect it to be too long so I had to divide it into 2 parts. The content of this part 2 will share a bit about technique, experience when pair-programming and eating and drinking with the team ;). The pile of code is like a pile *beep* Enough talking about people, let's talk a little technical. The team's application is built on the CampusM framework. This framework is similar to Ionic Framework, supporting writing hybrid-app mobile apps using HTML, CSS, JavaScript. Because it is quite powerful and integrates many things, it is used by a number of universities in the UK, including ours. In the old days, the team used version 1 of the framework (AEK 1) to write functions. Recently, the framework released version AEK 2 (Integrating React, Redux and ES6 is quite powerful), some new functions are written in AEK 2. So the code is divided into "old code" and "new code". It's enough of a headache. In AEK version 1, each function is written in a single file, containing all HTML, CSS, and JavaScript. Looking at the confusing code, I could only shake my head and sigh in frustration. Not to mention, the old developers were quite genius when it came to putting HTML in String, then playing the game of adding HTML strings in JavaScript. Because the AEK framework uses {{}}, Javascript templates like Handlebar give up, forcing me to use Underscore template to make the code clearer and cleaner. Through AEK version 2, each module has its own folder, clearly separating components, feeling much better. Unfortunately, I never knew what React was, so I had to go to Pluralism and download 2 or 3 React courses. Fortunately, I remember having some background knowledge and experience so learning is relatively easy. It only took me Saturday and Sunday to watch the clip to understand and immediately participate in coding. But there's a problem that makes me angry: the framework has just been released, so we haven't written clear enough documentation yet. There are many places where I don't know who to ask, I can't find anything when I go to Google (because the framework has few users), so I have to search the source code to see how it works, and at the same time drag out the framework writers and curse them. Because of using a framework, the application must run on both Android, iOS and Web. However, aligning responsive so that the application displays well on all devices is a complicated and tiring matter. The team has a whole cabinet full of devices to test, but because I'm lazy, I've never taken the device out to test, just took a picture for show. However, I learned a few interesting things through the project, which is to "put yourself in the user's shoes". Each person usually implements a full function from start to finish. Every time the code is written, the admin (Alice) will review it and post it to the production environment so users can use it immediately, receive feedback and make improvements. Thanks to that, I have the feeling that "What I code has users, I have to code with conscience, from UI/UX to function", not just writing a few lines of code and leaving it there like in the past. First time pair programming Then one Friday morning, when I was confused and preparing to go to work, I received an email from Mr. Brian - product owner. The mail said that today a new guy named George joined the team. In the morning he will receive basic training and frameworks, and in the afternoon he will pair programming with me to learn. I didn't know about pair-programming before, but if my "boss" said so, I'd just do it. When I got to work, I saw that George was a chubby guy, a first-year CS student. But this guy is quite mature for his age. Sitting and talking while pair-programming, I learned that he has been coding since 9th grade, and has experienced VB, PHP, Java, and JavaScript all. Monkey dad! Your brother just graduated and has been working for 2 years, but you've been coding for 3 years already :v. Pair-programming is also fun, each person codes for half an hour, the person next to them watches and comments, then takes turns. George is also quite smart and bright, has good logical thinking, he understands everything, if he doesn't know, he immediately asks. At first, I thought that coding and explaining would be tiring and time-consuming. I didn't expect that thinking and finding ways to explain it would help me consider the problem more carefully and think of a better solution. However, in order not to lose face to my seniors, there were a few times when I used hotkeys, wrote JavaScript with ES6 syntax, used code to set the debugger, making the guy bewildered and ask "How can you do that?", calculating some crazy tricks. This is also very useful. Before, I thought this game was a waste of time, but I didn't expect the efficiency to be so high. There are times when I'm tired and lazy and slow to code alone. Having other people think at the same time is both fun and fast. Quay – also known as Social In the past, the team only had about 5-6 members. Recently, due to recruiting a few more people, the team has become "a bit big". Therefore, little Alice organized a social party (this side is called social, in Vietnam we call it drinking or teambulding). People here drink beer even more horribly than us, they only drink big beer mugs and don't even bother to drink ice, they drink a lot without getting drunk or blushing. The team is full of technical people so they don't gossip much, mostly only Uncle Brian and Liam talk a lot (I'm just busy looking at baby Alice's bust :v). The food here isn't any good, so I didn't bother taking pictures to post on Facebook. After the meal, you guys went out for more beer before moving to the pub to party. Because of my old age, weak health and limited alcohol tolerance, I had to regret leaving early and not being able to continue raising 2 with the team. Take a commemorative selfie to introduce Brian, Liam, and baby Alice to you. Rate this: Like this: Related
Mình rất vui khi biết một số bạn đã lập blog cá nhân và bắt đầu viết những bài đầu tiên cho blog của mình (Điển hình là thằng Hoàng bạn mình tại: Codeaholicguy ). Một Blog IT cá nhân không chỉ giúp bạn trau dồi kĩ năng viết, kĩ năng diễn đạt mà còn cũng như tạo điểm nhấn cho CV khi xin việc . Khi mới lập blog, hẳn bạn nào cũng tràn đầy nhiệt huyết đam mê , cùng với vô vàn ý tưởng viết hoài không hết. Tuy nhiên, sau một hai tuần, đam mê sẽ tàn lụi dần, các bạn sẽ bắt đầu thấy hơi mệt, bực mình, bí ý tưởng. Đừng lo, không chỉ có các bạn đâu, hầu hết dân viết lách đều gặp phải tình huống này (kể cả mình). Trong bài viết này, mình sẽ chia sẻ một số cách mình thường làm khi … bí đề tài viết blog, hi vọng chúng sẽ có ích cho các bạn. Những điều nên làm khi bí đề tài Việc đầu tiên, đó là hãy ngồi vào bàn viết, bật laptop lên, bắt đầu viết một bài với tựa đề “ Phải làm sao khi viết blog mà … bí đề tài ” như mình đang làm đây, ít ra các bạn sẽ có thêm một bài viết =))). Nhớ lại xem gần đây có học được gì mới, đọc được bài viết gì hay hay không. Nếu có hãy đọc/học lại cho kĩ, sau đó tìm tư liệu và bắt đầu viết bài mới. Việc đọc lại, diễn giải lại sẽ làm bạn thấu hiểu vấn đề hơn. Muốn viết hay phải chịu khó đọc nhiều , đọc đủ thứ . Ngoài sách ra, bạn có thể đọc thêm một số blog IT , hoặc tham gia trả lời câu hỏi trên stackoverflow . Mỗi khi bí, mình thường lang thang webtretho, nhầm, stackoverflow và code project để tìm ý tưởng, sẵn học kiến thức mới. Điều quan trọng nhất là: phải viết . Có thể lúc mới ngồi vào máy, bạn sẽ thấy bức bối, khó chịu, ngồi cả nửa tiếng mà tâm trí cứ quanh quẩn đâu đâu không viết được. Đừng lo, hãy kiên trì và ép mình viết , chỉ cần viết được khoảng 10 phút, bạn sẽ mải mê viết cho hết bài luôn cho xem. Nếu vẫn không có ý tưởng và không muốn viết, hãy tạm bỏ qua, bật IDE lên code hoặc giải trí, làm việc khác khoảng 10-20 phút (Đừng Dota hoặc Lol nhé, mất cả tiếng đấy >.<). Có mấy tuần mình lo học và mệt không viết được, cuối tuần viết bù 2 bài mệt nghỉ luôn. Nếu bí quá, bạn có thể dịch một bài viết nào đó, nhưng mình khuyến khích các bạn chỉ nên lọc một số ý tưởng hay, rồi thêm ý tưởng hoặc kiến giải của mình vào. Bê nguyên xi một bài viết từ tiếng Anh sang tiếng Việt chỉ giúp bạn tăng khả năng dịch thuật . Đọc hiểu, phân tích và thêm ý kiến mới giúp bạn dễ “tiêu hóa” những điều tác giả muốn nói. Những thói quen cần có để duy trì blog Mỗi khi có ý tưởng viết bài, hãy tạo một bài viết mới, viết một vài ý chính, lưu vào mục draft của wordpress. Khi nào có thời gian rảnh hãy hoàn thành bài viết sau. Có khi cả 2, 3 tuần mình không có ý tưởng nào, có hôm lại có tới 3, 4 ý tưởng trong một ngày. Việc lưu draft lại sẽ khiến bạn không bỏ lỡ ý tưởng hay nào. Nên có một lịch đăng bài nhất định, và có sẵn vài bài viết dự phòng . Mình luôn dự trữ sẵn 6,7 bài viết để có thể đều đặn đăng bài vào thứ 3, thứ 5. Tối thứ 3, thứ 5 rãnh rỗi mình mới viết bài mới. Nhờ có bài dự phòng, bạn không bị áp lực khi viết, lúc không có tâm trạng có thể delay tới 1, 2 hôm sau vẫn được Tạo cho mình một thói quen viết lách, như mình bây giờ đã có thói quen 2 bài/tuần, không bỏ được. Viết nhiều thành quen, ngày xưa mỗi lần mình chỉ viết được khoảng 2-300 chữ là bí, giờ có khi ngồi cả tiếng viết bài gần 7-800 chữ mà vẫn không sao. Sau khi viết xong một bài, hãy cho nó vào mục Pending Review, trước khi đăng nhớ rà soát lỗi chính tả, lỗi diễn đạt và chỉnh sửa lại, việc làm này sẽ gia tăng chất lượng bài viết lên đáng kể đấy ;). Thêm một số hình ảnh vào sẽ làm bài viết bắt mắt, sống động, dễ hiểu hơn. Nói cho cùng, việc viết blog không phải là một mục tiêu, mà là cả một quá trình, không có kết thúc. Để theo đuổi quá trình này, bạn phải tìm ra niềm vui khi viết. Đối với mình, đó là niềm vui khi hoàn thành một bài viết, đăng một bài viết mới, vui khi có nhiều người bạn xem, comment, hoặc có người đọc blog nên lên facebook kết bạn với mình. Nếu chưa có blog, bạn hãy thử ngồi xuống và viết những dòng đầu tiên đi nào, biết đâu bạn sẽ tìm thấy những niềm vui như mình thì sao. Nếu có khó khăn hay thắc mắc gì trong quá trình viết, cứ thoải mái nhắn tin hoặc gửi mail chia sẻ với mình nhé. Rate this: Like this: Related
I'm very happy to know that some of you have set up personal blogs and started writing the first articles for your blog (A typical example is my friend Hoang at: Codeaholicguy). A personal IT Blog not only helps you hone your writing and expression skills but also creates a highlight for your CV when applying for a job. When you first start a blog, everyone is probably full of enthusiasm and passion, with countless ideas to write about all the time. However, after a week or two, the passion will gradually fade, you will start to feel a bit tired, annoyed, and stuck for ideas. Don't worry, you're not the only one, most writers encounter this situation (including me). In this article, I will share some ways I often do when... stuck on blogging topics, hope they will be useful to you. Things to do when stuck on topic The first thing is to sit down at your writing desk, turn on your laptop, and start writing an article titled "What to do when blogging but... stuck on topic" like I'm doing here, at least you will have more an article =))). Think back to see if you have learned anything new recently or read any interesting articles. If so, read/study again carefully, then find materials and start writing a new article. Re-reading and re-interpreting will help you understand the problem better. If you want to write well, you have to work hard to read a lot, read everything. Besides books, you can read some IT blogs, or participate in answering questions on stackoverflow. Whenever I'm stuck, I often wander around webtretho, sai, stackoverflow and code project to find ideas and learn new knowledge. The most important thing is: write. Maybe when you first sit on the computer, you will feel frustrated and uncomfortable, sitting for half an hour with your mind wandering somewhere and not being able to write. Don't worry, be persistent and force yourself to write. Just write for about 10 minutes and you'll be engrossed in writing the entire article. If you still have no ideas and don't want to write, skip it temporarily, turn on the IDE to code or have fun, do something else for about 10-20 minutes (Don't do Dota or Lol, it takes an hour >.<). There were a few weeks when I worried about studying and was too tired to write. On the weekends, I wrote 2 extra articles and was tired and took a break. If you're too stuck, you can translate an article, but I encourage you to just filter a few good ideas, then add your own ideas or opinions. Translating an entire article from English to Vietnamese only helps you increase your translation ability. Reading, analyzing and adding new opinions helps you easily "digest" what the author wants to say. Habits needed to maintain a blog Every time you have an idea to write an article, create a new article, write a few main ideas, and save it in the draft section of WordPress. When you have free time, please complete the following article. Sometimes I don't have any ideas for 2 or 3 weeks, and other days I have up to 3 or 4 ideas in one day. Saving your draft will help you not miss any good ideas. You should have a certain posting schedule, and have a few backup articles available. I always reserve 6 or 7 articles so I can regularly post on Tuesdays and Thursdays. When I have free time on Tuesday and Thursday evenings, I write new articles. Thanks to the backup article, you don't have to feel pressured when writing. When you're not in the mood, you can delay it until 1 or 2 days later. Create a writing habit for yourself, like I now have the habit of writing 2 articles/week, I can't give up. Writing a lot has become a habit. In the past, I could only write about 2-300 words at a time, but now I can sit for an hour and write nearly 7-800 words and it's still okay. After writing an article, put it in the Pending Review section. Before posting, remember to check for spelling and expression errors and edit, this will significantly increase the quality of the article ;). Adding some images will make the article more eye-catching, lively, and easier to understand. After all, blogging is not a goal, but a process, without end. To pursue this process, you must find joy in writing. For me, it's the joy of completing an article, posting a new article, the joy of having many friends viewing, commenting, or having someone read the blog and become friends with me on Facebook. If you don't have a blog yet, try sitting down and writing your first lines, who knows, maybe you'll find the same joy as me. If you have any difficulties or questions during the writing process, please feel free to text or email to share with me. Rate this: Like this: Related
Năm nay Tết ta được nghỉ khá nhiều, tận 9 ngày. Do thấy số lượng người xem cũng ít nên blog cũng tạm “nghỉ Tết” cho các bạn đọc có thời gian giải lao, vui chơi quây quần bên người thân và bạn bè. Mình vẫn đang ở nước ngoài nên chả có Tết nhất gì, chỉ có 1 bữa ăn nho nhỏ với các bạn VN, may là gặp được 1 vài bé SV năm nhất khá xinh. Sau hai tuần nghỉ Tết, chắc sức ỳ sau 10 ngày nghỉ vẫn còn nên bài đầu tiên này mình sẽ không viết về technical nhức đầu mà xin kể một câu chuyện nho nhỏ đầu năm mới. Tựa đề khác của câu chuyện là “Tôi đã đi code dạo ở nước ngoài như thế nào”. Đây là câu chuyện về quá trình xin việc (xin đi code dạo), cũng như lần đầu mình đi phỏng vấn nơi xứ lạ quê người . Duyên trời đưa đẩy Mình qua UK học Computer Science từ hồi tháng 9, trừ 1 tháng nghỉ hè ra thì cũng được hơn 4 tháng rồi. Ở giai đoạn đầu, do phải tập làm quen với cuộc sống và việc học nên mình không có thời gian rảnh để đi làm thêm (Vả lại có học bổng 500 củ cũng đủ tiền ăn tiền nhà rồi, cũng không cần xin gia đình gửi tiền qua). Qua học kì mới, thấy các môn có vẻ nhẹ, ít bài tập nên mình cũng khá rảnh rỗi. Đang định đú vài series dang dở trên pluralsight thì nghe thằng bạn da đen cùng lớp nói “Phòng IT của trường (Infomation Systems Services), chỗ tao thực tập đang tuyển developer hay sao ấy, mài đăng ký thử đi, mài apply thì chắc là đậu”. Nói về anh da đen này một chút (anh bên phải trong hình dưới). Cha này cũng học Computer Science nhưng mà code không giỏi, lại mất căn bản Java. Do duyên trời đưa đẩy, ngồi cạnh mình trong phòng Lab môn Distributed System, lại còn chung nhóm với môn Advanced HCI. Chắc do thấy mình làm nhóm thì toàn hổ báo chỉ đạo phân việc , làm bài Lab thì lúc nào cũng hổ báo hỏi giáo viên nên anh có vẻ nể mình lắm. Thấy tội tội nên lâu lâu nhờ hướng dẫn mình cũng chịu khó giảng, có điều chắc ảnh không có khiếu code. UX Developer là cái chi chi??? Quay lại chuyện xin việc. Mình lên trang rao việc xem thử thì thấy vị trí tuyển dụng là UX developer (part-time). Nghe cái title lạ hoắc lạ huơ, xem đến phần yêu cầu công việc thì Essential Desirable Hóa ra là tuyển người làm UI/UX . Chắc là ông trời biết mình từ đầu năm đến giờ mình tập trung vào mảng front-end đây mà. Mình đã từng chém ở bài trước là r ành cả front-end và back-end thì quăng đi đâu cũng sống được cả , không ngờ linh nghiệm thật. Nộp CV và chờ mòn mỏi Khổ thay, bên này xin việc nó không chỉ cần CV mà còn cần cả thư xin việc (cover letter) đính kèm. Trước giờ mình có viết cái cover letter này bao giờ đâu, thế là phải lên google tìm một mẫu hay hay, chế lại thành của mình rồi gửi. Chờ 1 ngày, 2 ngày, 1 tuần rồi mà vẫn chưa thấy đâu. Mình tưởng là rớt rồi nên chửi thầm “Mẹ, mình từng viết series hướng dẫn xin việc – phỏng vấn mà giờ lại trượt ngay vòng gửi CV, nhục vl”. May thay, sau 3-4 ngày, cuối cùng mình cũng nhận được cái email định mệnh . Công việc chỉ là developer bán thời gian thôi mà có test, lại còn phỏng vấn , sao mà rắc rối dài dòng thế không biết. Do trong mail không nói rõ nội dung test là gì, mình dành ngồi lục và ôn dần đống tài liệu HTML/CSS/ Javascript , jQuery, REST, API, thôi thì đủ thứ. Thế rồi, cái ngày định mệnh ấy cũng đến. Liệu Hoàng sẽ phải làm bài test như thế nào, trả lời phỏng vấn ra sao? Liệu Hoàng có nhận được công việc “code dạo” mà anh hằng mong ước? Mời các bạn đón đọc trong phần 2 của bài viết =))). Troll đầu năm các bạn đừng chửi nhé. Rate this: Like this: Related
This year we have a lot of holidays, up to 9 days. Due to the small number of viewers, the blog also temporarily took a "Tet break" so that readers could have time to relax and have fun with relatives and friends. I'm still abroad so I don't have much Tet, just a small meal with my Vietnamese friends, luckily I met a few pretty first year students. After two weeks of Tet holiday, the inertia after 10 days off is probably still there, so in this first article I will not write about technical headaches but would like to tell a small story at the beginning of the new year. The other title of the story is "How I coded abroad". This is a story about the job application process (asking for a coding walk), as well as my first interview in a foreign country. Fate brought me to the UK to study Computer Science in September. Except for 1 month of summer vacation, it's been more than 4 months. In the early stages, because I had to get used to life and studying, I didn't have free time to work part-time (Besides, the 500-dollar scholarship was enough to pay for housing, and I didn't need to ask my family to send me money). money through). After the new semester, I saw that the subjects seemed light, with little homework, so I had quite a bit of free time. I was about to read some unfinished series on pluralsight when I heard a black classmate say, "The school's IT department (Infomation Systems Services), where I'm interning, is hiring developers or something, you should try signing up, maybe you should apply." are beans". Let's talk about this black guy a bit (the guy on the right in the picture below). This father also studied Computer Science but was not good at coding and lost the basics of Java. By fate, he sat next to me in the Distributed System lab, and was in the same group as the Advanced HCI subject. Probably because when he saw me working in a group, he was always shy about directing and assigning tasks, and when doing lab work, he was always shy about asking the teacher, so he seemed to respect me a lot. Seeing how guilty I was, I took the trouble to teach him every once in a while, but he probably didn't have the talent to code. What is a UX Developer??? Back to applying for a job. I went to the job advertisement page and saw that the vacancy was UX developer (part-time). Listening to the strange title, looking at the job requirements, Essential Desirable turns out to be recruiting people to do UI/UX. Surely God knows that I've been focusing on the front-end since the beginning of the year. I once said in a previous post that if you know both the front-end and the back-end, you can throw it anywhere and survive. I didn't expect it to be so effective. Submit your CV and wait patiently. Unfortunately, when applying for a job, you not only need a CV but also a cover letter attached. I've never written a cover letter like this before, so I had to go to Google to find a good sample, make it my own, and send it. Waited 1 day, 2 days, 1 week and still haven't seen it. I thought I had failed, so I cursed under my breath, "Mom, I once wrote a series of job application and interview instructions, but now I failed the CV sending round, so humiliating." Luckily, after 3-4 days, I finally received the fateful email. The job is only a part-time developer, but there is testing and interviews, so I don't know why it's so complicated. Since the email didn't clearly state what the test content was, I spent time searching and gradually reviewing the HTML/CSS/Javascript, jQuery, REST, API documents, everything. Then, that fateful day came. How will Hoang have to take the test and answer the interview? Will Hoang get the "walking code" job he always dreamed of? We invite you to read part 2 of the article =))). Trolls at the beginning of the year, please don't curse. Rate this: Like this: Related
Nối tiếp phần 1 , bài viết này sẽ kể về quá trình làm bài test và phỏng vấn, xin việc code dạo của chàng coder xấu số tên Hoàng. Diện đồ nghiêm túc, lên đường Mồng 3 Tết, ngày 10/2/2015, trong khi bạn bè ở Việt Nam đang vui vẻ ăn Tết, thoải mái vui chơi đập phá ăn nhậu thì mình phải đi phỏng vấn . Do tối hôm trước ôn kiến thức tới khuya, lại lo lắng hồi hộp nên đến tận 2h mình mới ngủ được. Cũng may buổi sáng mình dậy sớm nổi, chẳng muốn ăn nhưng cũng ráng nuốt để buổi trưa khỏi đói. Nghe nói bọn bên này formal lắm nên mình cũng không dám mặc style Steve Job áo thun quần jean như thường lệ để đi phỏng vấn . May mà có mang theo 1 bộ vest với đôi giày Tây nên mình cũng có mặc được bộ đồ khá tươm tất. Lịch hẹn là 10h30, mình ra đến tòa nhà ISS lúc 10h25 rồi báo với lễ tân. Chả hiểu các bạn ấy bận hay sao mà tới 10h35 hơn mới có 1 thằng ku xuống dắt mình lên làm test. Ku này cũng khá trẻ nhưng trộng hơi dị. Dáng cao, người thon gầy, đeo kính, mặt ngô ngố, đúng kiểu nerd/otaku thường gặp (Lớp mình cũng có một thằng tương tự). Thằng ku dắt mình lên tầng 3, vào 1 căn phòng nhỏ cũng khá xinh, có 2 cái laptop đặt đối diện nhau. Chẳng lẽ đề test là solo mid Dota hay Lol với nó, có 20 phút làm sao đủ? Hóa ra không phải, bài test cũng khá phù hợp với yêu cầu công việc Cho một trang web khá đơn giản với html, css, jquery (Sublime Text mở sẵn, muốn dùng IDE gì cũng được). Hãy hiển thị thêm các trường trong dữ liệu, tinh chỉnh giao điện/chọn font cho đẹp mắt, thêm các hiệu ứng animation ( UX developer nên yêu cầu phải có khả năng thẩm mĩ). Đề bài không quá khó, nhưng chắc người ra đề sợ các bạn trẻ hồi hộp làm không kịp nên còn có vài dòng comment gợi ý code chỗ nào, lấy trường gì. Mình đi phỏng vấn đi làm ở VN chưa lần nào bị bắt phải code, thế mà qua đây xin làm code dạo lại bị bắt viết code mới vui chứ. Sau 20 phút làm bài, chưa thấy ai vào nên mình chém gió với thằng otaku ngồi đối diện. Hóa ra nó là sinh viên năm nhất ngành Computer Science, hiện đang code back-end cho dự án, đúng là tuổi trẻ tài cao. Ngồi một hồi thì bé Alice (người gửi thư mời interview cho mình) bước vào phòng và dắt mình vào phòng khác phỏng vấn (Kết quả bài test sẽ được check sau, mình cứ tưởng rớt technical là khỏi phỏng vấn chứ). Bé này dáng cao, bưởi khủng nhưng vì sợ xâm phạm riêng tư cá nhân nên mình không up hình nhé. Phỏng vấn gian truân như đánh đố Bé Alice dắt mình đi lòng vòng gần 3 phút mới tới được phòng phỏng vấn. Team hình như không lớn(Chỉ 8,9 người) mà có tới tận 3 người phỏng vấn mình. Bé Alice là Administrator kiêm BA, chuyên lo các vấn đề về account và business. Bác Brian (hơi già) là Product Owner, kiêm luôn quản lý group, từng code back-end . Anh Liam (khá trẻ) là front-end developer , người chịu trách nhiệm cho mảng front-end của dự án. Cảm giác đầu tiên của mình là hơi hố. Mình chơi nguyên bộ vest sơ mi quần tây nghiêm túc, còn 2 lão phỏng vấn mình thì… chơi style áo thun quần jean, thiệt là hố không nói nên lời. Mở đầu phỏng vấn cũng khá nhẹ nhàng, không có cảm giác căng thẳng mấy (may mà hồi xưa PV Aswig mình cũng phải dùng tiếng Anh nên giờ không bỡ ngỡ). Sau vài câu hỏi giới thiệu bản thân, vì sao em học trường này, ngành có gì hay, sở thích là gì (mình chém từ stackoverflow cho đến blog ), các bác bắt đầu hỏi nghiêm túc. Có vẻ là do bài test đã đánh giá được khả năng technical rồi, nên khi phỏng vấn họ không hỏi technical mà tập trung vào khả năng tư duy + giải quyết vấn đề hơn. Format khác hoàn toàn với khi mình phỏng vấn ở Việt Nam. Sau đây là một số câu hỏi xoáy đáp xoay và những câu trả lời chém gió của mình. Anh Liam (Front-end developer) Bạn có góp ý gì về bài test? Theo em nó không khó nhưng nên bỏ những phần comment gợi ý, nếu là developer thì sẽ biết viết code ở đâu, như thế nào. Bạn hoàn thành bài test như thế nào? Dựa theo đề, em xác định những task cần làm, sắp xếp theo độ ưu tiên. Task nào ưu tiên cao thì làm trước, làm dân dần cho đến hết… Bạn có kinh nghiệm với jQuery hay framework gì ko? Chém về quá trình tự học jQuery, AngularJS, ionicFramework . Thấy các bác gật gù khí thế. Bạn ấn tượng bởi thiết kế của những trang web nào? Vì sao? Chém trang của Apple vì nó tao nhã, nhiều khoảng trắng, đơn giản và 1 vài trang. Câu này không chuẩn bị, trả lời ko ok lắm. Bé Alice (Administrator) Trong quá trình làm việc, làm sao bạn đảm bảo hoàn thành được mục tiêu? Vì dùng Scrum nên mình không cắm đầu code từ đầu tới cuối mà được 4-50% sẽ confirm lại với team leader hoặc.. Điều này giúp mình không bị chệch hướng, hoặc hoàn thành sai mục tiêu. Là 1 UX developer, nếu có thể cải thiện UI của Facebook, bạn sẽ làm gì? Câu này rõ là đánh đố, mình xin 20s xuy nghĩ, ông Product Owner cũng ngồi suy nghĩ. Sau đó mình đành chém là content trên Facebook quá nhiều, đôi khi phải xem những content không muốn xem. Do đó nên có chế độ summary, chỉ hiện cái mình muốn xem. Việc này giúp scroll đỡ mệt. Ông Product Owner cũng gật gù coi như ok. Bác Brian (Product Owner) Kể về một project mà bạn cảm thấy tự hào? Lôi cái project Claimbook từ thời làm ở ASWIG ra chém, mình dựng nguyên đống UI/ đưa ý tưởng, từ giai đoạn mock-up cho tới demo. Team đang làm ứng dụng iLancaster. Theo bạn cần thêm những chức năng/cải tiến gì? Câu này thì 2 bên hỏi qua hỏi lại, mình thì chém là phải tìm hiểu người dùng cần gì trước, bên đấy lại đòi nghĩ ra chức năng suống. Chém một hồi thì mình kêu dưới góc độ học sinh, em cần cái A,B,C vì nó sẽ có ích. Một hồi sau mình cũng được nghe câu “Bạn có câu hỏi gì không?”, mình chỉ hỏi sơ về quy trình làm việc, công việc thường ngày, quy mô team v…v để thể hiện sự nhiệt tình năng nổ thôi. Nhớ lời các cụ dạy, sau khi phỏng vấn mình gởi mail cảm ơn , hẹn liên lạc lại sau. Kết quả Chắc do thiếu người nên bên này làm ăn khá nhanh gọn “Sau buổi phỏng vấn, chúng tôi sẽ xem kết quả bài test và thông báo kết quả cho bạn trong vòng chiều nay hoặc ngày mai”. Cũng may, sau một hồi mong ngóng thì chiều hôm đó mình cũng nhận được một cái email định mệnh khác. Chắc do ít ứng viên nên quy trình làm việc diễn ra rẹt rẹt. Sáng ngày 10 mình phỏng vấn, chiều ngày 10 có kết quả, gửi mail xác nhận rồi ngay chiều hôm sau xách đít qua ISS đi làm hôm đầu tiên. Hôm đầu đi làm cũng có vài chuyện khá vui nên mình sẽ review ở bài khác nhé. (Trả lời lun cho các bạn tò mò về lương bổng, mình làm part time nên lương tính theo giờ . 1h được hơn 10 bảng là khoảng 330k , tuần nào làm nhiều chắc được khoảng 10 tiếng, đủ cafe ăn uống tiêu xài thôi, không đủ trả tiền nhà nữa 😥 ). Rate this: Like this: Related
Continuing part 1, this article will tell about the process of taking the test, interviewing, and applying for a coding job of the ill-fated coder named Hoang. Dressed seriously, went on the 3rd day of Tet, February 10, 2015, while my friends in Vietnam were happily celebrating Tet, freely having fun, partying and drinking, I had to go for an interview. Because I studied until late at night the night before and was nervous, I couldn't sleep until 2 o'clock. Fortunately, I woke up early in the morning. I didn't want to eat, but I tried to swallow so I wouldn't be hungry at noon. I heard that people here are very formal, so I didn't dare wear the usual Steve Job style, t-shirt and jeans to the interview. Luckily, I brought a suit with Western shoes, so I was able to wear a pretty decent outfit. The appointment was at 10:30 a.m., I arrived at the ISS building at 10:25 a.m. and informed the receptionist. I don't know why they were busy, but it wasn't until 10:35 a.m. that a guy came down to take me up to take the test. This guy is also quite young but a bit strange. Tall, slim, wears glasses, silly face, typical nerd/otaku type (I also have a similar guy in my class). The guy took me to the 3rd floor, into a small, pretty room with two laptops facing each other. Maybe the test is solo mid Dota or Lol with it, how can 20 minutes be enough? Turns out it's not, the test is also quite suitable for the job requirements. For a fairly simple website with html, css, jquery (Sublime Text is pre-opened, you can use any IDE you want). Show more fields in the data, tweak the interface/choose fonts to make them look beautiful, add animation effects (UX developers should be required to have aesthetic ability). The test is not too difficult, but the person who created the test is probably afraid that nervous young people won't be able to finish it in time, so there are a few comments suggesting where to code and what fields to use. I went for a job interview in Vietnam and never once was forced to code, but when I came here and asked to do coding, I was happy to be forced to write code. After 20 minutes of doing the test, no one had come in, so I chatted with the otaku sitting across from me. It turned out that he was a first-year student majoring in Computer Science, currently coding the back-end for the project, truly a talented youth. After sitting for a while, Alice (the person who sent me the interview invitation letter) walked into the room and took me to another room for the interview (The test results will be checked later, I thought that if I failed the technical exam, I would be out of the interview). This baby is tall and has big breasts, but because I'm afraid of infringing on personal privacy, I won't upload a picture. The arduous interview was like a puzzle. Little Alice led me around for nearly 3 minutes to get to the interview room. The team didn't seem to be big (Only 8-9 people) but there were up to 3 people interviewing me. Little Alice is an Administrator and BA, specializing in account and business issues. Uncle Brian (a bit old) is the Product Owner, also manages the group, and each back-end code. Mr. Liam (quite young) is a front-end developer, the person responsible for the front-end part of the project. My first feeling was a bit pitiful. I wore a serious suit, shirt, and trousers, while the two men interviewing me... wore a t-shirt and jeans style, which was truly pitiful beyond words. The beginning of the interview was also quite light, without much tension (luckily, in the past, I also had to use English as PV Aswig, so now I'm not surprised). After a few questions introducing myself, why do I go to this school, what's interesting about the major, what are my hobbies (I cut from stackoverflow to blog), the doctors started asking seriously. It seems that because the test already evaluates technical ability, when interviewing, they do not ask technical questions but focus more on thinking + problem-solving ability. The format is completely different from when I interviewed in Vietnam. Below are some of the spinning questions and my sly answers. Mr. Liam (Front-end developer) Do you have any comments about the test? In my opinion, it's not difficult, but you should remove the suggested comments. If you're a developer, you'll know where and how to write the code. How did you complete the test? Based on the topic, I determine the tasks that need to be done and arrange them by priority. Tasks with high priority should be done first, gradually working until the end... Do you have experience with jQuery or any framework? Talk about the process of self-learning jQuery, AngularJS, ionicFramework. Seeing you guys nodding enthusiastically. Which websites' designs are you impressed by? Why? Slash Apple's site because it's elegant, has lots of white space, is simple, and has a few pages. This question was not prepared and the answer was not very good. Baby Alice (Administrator) During work, how do you ensure you achieve your goals? Because I use Scrum, I don't have to work on the code from start to finish, but 4-50% will confirm it with the team leader or... This helps me not get sidetracked, or accomplish the wrong goal. As a UX developer, if you could improve Facebook's UI, what would you do? This question is clearly a riddle, I asked for 20 seconds to think, Mr. Product Owner also sat and thought. After that, I had to complain that there was too much content on Facebook, sometimes I had to see content I didn't want to see. Therefore, there should be a summary mode, showing only what you want to see. This helps reduce scrolling fatigue. Mr. Product Owner also nodded and considered it ok. Uncle Brian (Product Owner) Tell me about a project that you feel proud of? Pulling out the Claimbook project from my time working at ASWIG, I built a whole bunch of UI/ideas, from mock-up to demo stage. The team is working on the iLancaster application. What functions/improvements do you think need to be added? This question was asked back and forth by both sides, I insisted that we had to find out what the user needed first, while that side asked to come up with a function. After a while, I said from a student's perspective, you need A, B, C because it will be useful. After a while, I also heard the question "Do you have any questions?", I just asked briefly about the work process, daily tasks, team size, etc. to show my enthusiasm. Remembering what the elders taught me, after the interview, I sent a thank you email and promised to contact you again later. Results Probably due to lack of people, this side does business quite quickly. "After the interview, we will review the test results and notify you of the results this afternoon or tomorrow." Fortunately, after a while of waiting, that afternoon I also received another fateful email. Probably because there are few candidates, the working process is slow. On the morning of the 10th, I had an interview, on the afternoon of the 10th I got the results, sent a confirmation email, and then the next afternoon I took my ass to the ISS for my first day of work. The first day at work also had some pretty funny things so I'll review them in another post. (Answer to those who are curious about salary, I work part time so the salary is based on the hour. 1 hour is more than 10 pounds which is about 330k, if I work a lot a week I can probably get about 10 hours, enough coffee to eat and drink to spend, not enough to pay the rent anymore 😥). Rate this: Like this: Related
Dạo gần đây viết nhiều bài về technical khá mệt và nhức đầu, lâu lâu mình viết một bài theo dạng “dịch và sưu tầm” để giải trí cho các bạn đọc vậy. Trước đây, mình từng có một bài viết về việc sử dụng comment . Code có comment hay không, comment như thế nào luôn là vấn đề tranh luận của giới developer từ trước đến giờ. Hôm nay chúng ta không tranh luận về comment, mà hãy cùng thưởng thức các comment “bá đạo” từ trước đến giờ để giải trí nhé. Méo mặt khi bị giao optimize code mà gặp phải dòng này // Chào anh bạn coder: // // Sau khi chú em đã gắng hết sức để ‘optimize’ hàm này, // để rồi nhận ra việc đó nhảm nhí và phí công vô ích thế nào, // hãy cộng thêm số giờ phía dưới để cảnh báo cho các coder // xấu số tiếp theo // // tổng_số_giờ_lãng_phí = 42 Khi code được viết ra trong một phút giây “thần thánh” // Ngày xưa, khi tôi viết đoạn code này, chỉ có Chúa và tôi hiểu // Bây giờ nhìn lại, chỉ có Chúa mới hiểu Thêm dòng này vào sẽ làm không ai dám đụng vào code của bạn // Autogenerated, do not edit. All changes will be undone. // (Code tự sinh, mọi chỉnh sửa sẽ bị reset lại.) hoặc // Xóa dòng comment này đi là chương trình crash ngay tức khắc Một phút anh coder thư thẩn // Đôi khi anh có cảm giác rằng: Bạn compiler cứ ngó lơ những comment mình viết Có nhiều khi “tạm thời” cũng là vĩnh viễn // Dev1 – 06/07/2002 Tạm thời thêm chức năng log cho màn hình đăng nhập // Dev2 – 22/05/2007 Log vẫn còn, tạm thời cái con khỉ Gặp thánh phán “như đúng rồi” const int TEN=10; // Lẽ nào trong tương lai giá trị 10 nó đổi… Vài dòng comment nói hộ nỗi lòng nhiều thanh niên mới vào dự án // Em cũng chả biết có cần hàm này không nữa, nhưng mà sợ quá nên không dám xóa … // Tao không chịu trách nhiệm cho những dòng code dưới đây. // Bọn PM và Technical leader ép tao viết như thế. … // Éo hiểu tại sao nhưng mà sửa thế này thì code nó lại chạy Dở khóc dở cười khi thấy comment của các thánh troll // Xin lỗi, anh hơi lười nên không viết comment cho chú … // Nếu đoạn code này chạy đúng, tác giả của nó là HoangPH. // Nếu nó chạy sai, tác giả là ai… tôi không biết. … // Nếu anh bạn đang đọc những dòng này, nghĩa là anh bạn đang làm tiếp dự án cũ của tôi. // Thành thật xin lỗi vì đống code… Mong trời phật phù hộ cho anh bạn. Ngậm ngùi khi đọc những dòng code và comment “có tâm” Và đây! Danh sách những comment vô dụng có cũng như không Kết thúc bài viết bằng một loạt các comment vẽ tranh thần thánh của các coder quởn không có gì làm Nguồn tham khảo: Rate this: Like this: Related
Lately, writing a lot of technical articles has been quite tiring and giving me a headache. Once in a while, I write an article in the form of "translation and collection" to entertain readers. Previously, I had an article about using comments. Whether code has comments or not, and how to comment has always been a matter of debate among developers up to now. Today we won't argue about comments, but let's enjoy the "cool" comments from the past for entertainment. My face twisted when I was assigned to optimize code and encountered this line // Hello fellow coder: // // After you have tried your best to 'optimize' this function, // only to realize how ridiculous and useless it was, // Please add the hours below to warn coders // next bad number // //total_hours_wasted = 42 When the code was written in a "divine" moment // Once upon a time, when I wrote this code, only God and I understood // Looking back now, only God understands Adding this line will make no one dare touch your code // Autogenerated, do not edit. All changes will be undone. // (Automatically generated code, all edits will be reset.) or // Delete this comment line and the program will crash immediately. One minute the coder relaxes // Sometimes he feels like: The compiler keeps ignoring the comments I write. Many times, "temporary" is also permanent. // Dev1 – July 6, 2002 Temporarily add log function to the login screen // Dev2 – May 22, 2007 Log is still there, temporarily the monkey Meets the saint says "as it is" const int TEN=10; // Maybe in the future the value 10 will change... A few comments speak for the feelings of many young people new to the project // I don't know if this function is needed or not, but I'm too scared to delete it. … // I am not responsible for the lines of code below. // The PM and Technical leader forced me to write like that. … // I don't understand why, but if I fix it like this, the code will work. I'm half laughing and crying when I see comments from trolls // Sorry, I'm a bit lazy so I didn't write a comment for you … // If this code runs correctly, its author is HoangPH. // If it goes wrong, who is the author... I don't know. … // If you are reading these lines, it means you are continuing my old project. // Sincerely sorry for the pile of code... I hope God bless you, my friend. Feeling sad when reading "thoughtful" lines of code and comments And here! The list of useless comments is as good as it is not Ending the article with a series of comments drawing holy pictures from coders who have nothing to do Reference source: Rate this: Like this: Related
Mình bắt đầu đặt bút … nhầm, đặt phím viết bài đầu tiên cho blog vào ngày 31/12/2014. Hôm nay ngày 31/12/2015, mình viết bài này mừng blog tròn 1 năm tuổi. Thấy Facebook có chức năng “một năm nhìn lại”, mình cũng “nhìn lại” hoạt động của blog trong thời gian một năm vừa qua. 12 tháng – Những chuyện ngày xửa ngày xưa Vào thuở mới viết blog , mình đã xác định hướng đi là viết về technical và “một số thứ khác nữa”. Thuở đó, kiến thức technical của mình còn hạn hẹp, còn “một số thứ khác” cũng chỉ là một khái niệm khá mơ hồ. Ở những bài đầu, mình tập trung viết về C# , javascript , cũng như một số kiến thức và định hướng trong ngành lập trình . Mình tự đặt mục tiêu là viết 2 bài/tuần, đăng vào mỗi thứ 3 và thứ 5, ít nhất cũng phải hơn 1 năm mới bỏ. Vì áp lực 2 bài/tuần, mình phải cố gắng trau đồi, rèn luyện thêm kiến thức để có cái mà viết. Nhờ viết blog mà kĩ năng viết và khả năng diễn đạt của mình được cải thiện khá nhiều. Những hôm đầu, blog một ngày chỉ lèo tèo vài view, cả tháng chỉ được chưa tới 500 view . Cũng nhờ sự góp ý, ủng hộ mà cổ vũ của các bạn mà blog đã dần vượt qua được các cột mốt 1000 view , post thứ 50 , 100.000 view , và ngay ngày hôm nay thì lượng view của blog đã lên tới con số 200.000, fanpage hơn 700 lượt like, khoảng 1-1k5 lượt view một ngày . Mặc dù mình đã cảm ơn rất nhiều lần rồi , hôm nay mình xin cảm ơn thêm một lần nữa. Các bạn nhớ đăng kí, like fan page và chia sẻ giới thiệu blog cho bạn bè nhé =))). Cùng nhìn lại những cái nhất của blog Bài viết được xem nhiều nhất : Mặt tối của ngành công nghiệp IT với hơn 6k8 lượt xem. Theo sau là bài viết C# là ngôn ngữ tuyệt vời nhất . Có vẻ dân tình thích tranh cãi với gây lộn, bài nào tên càng hot thì càng nhiều lượt xem và bình luận. Một bài viết cũng khá hay được nhiều bạn xem đó là: Con đường phát triển sự nghiệp cho developer . Bài viết được nhiều comment nhất : Thực trạng học lập trình của một số thanh niên hiện nay do mình viết khi đang… say xỉn (Vừa viết cách đây không lâu nhưng được tận gần 50 comment và tranh cãi). Bài viết nhận nhiều gạch đá thứ hai chính là C# là ngôn ngữ tuyệt vời nhất , âu cũng dễ hiểu với cách đặt tên gây sốc. Ngày có nhiều view nhất : 10.438 view vào ngày 20/11, trùng vào ngày nhà giáo Việt Nam. Hôm đấy mình đăng bài Mặt tối của ngành IT . Tiêu đề gây sốc lại đi quảng cáo nhiều nơi nên view cao cũng là điều dễ hiểu. Tháng có nhiều view nhất : Hai tháng cuối năm 11 và 12 đang cạnh tranh vị trí này, với gần 55k view mỗi tháng. Chắc do số lượng người theo dõi tăng dần nên view cũng tăng theo. Người comment nhiệt tình nhất : Bạn PhucNguyen với 14 comment, tiếc là gần đây không thấy bạn comment gì nữa. Hi vọng những kỉ lục này của blog sẽ được phá trong năm 2016. Định hướng cho năm 2016 Do mình đã nghỉ việc ở Aswig Solutions vào cuối năm 2016 để đi du học ở trời Tây, mình cũng không bị áp lực công việc mấy mà có thể tập trung nhiều vào việc học và đọc sách . Tuy nhiên, do vào khoảng tháng 4 mình sẽ đi thực tập (khoảng 6 tháng) ở một công ty ở Anh theo chương trình học, mình quyết định sẽ không tập trung vào một ngôn ngữ/công nghệ cố định, không chuyên sâu mà tập trung mở rộng kiến thức. Ngoài ra, trong năm nay mình sẽ trau dồi thêm kiến thức về front-end (Không chỉ là HTML/CSS/JavaScript mà còn lấn sân luôn mấy bạn designer, học Photoshop, InDesign, thiết kế UI và UX). Rành cả front-end và back-end thì quăng đi đâu cũng sống được cả. Do đó, blog sẽ có thêm một số bài viết về thiết kế và UI/UX , tư duy sản phẩm. Những kiến thức này vẫn sẽ có ích cho bạn dù cho bạn có là back-end hay front-end developer, nhớ đón xem và ủng hộ blog nhé. WordPress cũng khá hay, tự động tạo sẵn một báo cáo kha chi tiết và đầy đủ cho năm 2015. Các bạn có thể xem bản full ở đây: Rate this: Like this: Related
I started writing... wrongly, writing the first blog post on December 31, 2014. Today, December 31, 2015, I am writing this article to celebrate the blog's 1 year anniversary. Seeing that Facebook has a "one year look back" function, I also "looked back" at the blog's activities over the past year. 12 months – Once upon a time stories When I first started blogging, I determined that my direction was to write about technical things and "some other things". At that time, my technical knowledge was still limited, and "some other things" was just a rather vague concept. In the first articles, I focused on writing about C#, javascript, as well as some knowledge and orientation in the programming industry. I set myself a goal of writing 2 articles/week, posting every Tuesday and Thursday, it would take at least more than a year to quit. Because of the pressure of 2 articles/week, I have to try to improve and practice more knowledge to have something to write about. Thanks to blogging, my writing and expression skills have improved quite a lot. In the early days, the blog only got a few views a day, and the whole month it only got less than 500 views. Thanks to your comments, support and encouragement, the blog has gradually surpassed the trending columns of 1000 views, 50th post, 100,000 views, and today, the number of views of the blog has reached 200,000. , fanpage has more than 700 likes, about 1-1k5 views a day. Even though I've thanked you many times already, today I'd like to thank you once again. Remember to register, like the fan page and share and introduce the blog to your friends =))). Let's look back at the best of the blog Most viewed article: The dark side of the IT industry with more than 6k8 views. Followed by the article C# is the coolest language. It seems like people like to argue and fight, the hotter the name of the song, the more views and comments it gets. An article that is also quite good that many people read is: Career development path for developers. The article with the most comments: The current situation of learning programming for some young people because I wrote it while I was... drunk (I just wrote it not long ago but received nearly 50 comments and controversy). The article that received the second most criticism was that C# is the most wonderful language, easy to understand with a shocking naming scheme. The day with the most views: 10,438 views on November 20, coinciding with Vietnamese Teachers' Day. That day I posted the article Dark side of the IT industry. The shocking title is advertised in many places so the high views are understandable. Month with the most views: The last two months of 11 and 12 are competing for this position, with nearly 55k views per month. Probably because the number of followers increases, the views also increase. Most enthusiastic commenter: PhucNguyen with 14 comments, unfortunately I haven't seen any comments from you recently. Hopefully these blog records will be broken in 2016. Orientation for 2016 Because I quit my job at Aswig Solutions at the end of 2016 to study abroad in the West, I don't have much work pressure. can focus more on studying and reading. However, because around April I will do an internship (about 6 months) at a company in the UK according to the study program, I decided not to focus on a fixed, non-specialized language/technology. Focus on expanding knowledge. In addition, this year I will improve my knowledge of front-end (Not only HTML/CSS/JavaScript but also other designers, learning Photoshop, InDesign, UI and UX design). If you know both front-end and back-end, you can throw it anywhere and survive. Therefore, the blog will have some more articles about design and UI/UX, and product thinking. This knowledge will still be useful to you whether you are a back-end or front-end developer, remember to read and support the blog. WordPress is also quite good, automatically creating a fairly detailed and complete report for 2015. You can see the full version here: Rate this: Like this: Related
Lý giải chút về tên series 返璞归真 – Phản phác quy chân: Nghĩa là điểm cao nhất cũng chính là điểm xuất phát, được ứng dụng trong rất nhiều lĩnh vực. Trong võ học, nó có nghĩa là đạt tới cảnh giới “Tối thượng” trong truyền thuyết, quên đi tất cả võ học trong thiên hạ, bản thân đã không còn chiêu thức cụ thể, chỉ dựa vào ý cảnh mà đơn giản xử lý. Võ học được thành lập từ các chiêu thức cơ bản, tuyệt thế võ công cũng từ các chiêu thức cơ bản mà ra. Code học cũng tạo thành từ bit/byte cơ bản, chương trình phức tạp đến mấy cũng dịch được ra bytecode. Đôi khi, ta đã quá quen với việc dùng thư viện , dùng framework mà quên thì những thứ nằm sâu bên dưới, không nắm được bản chất. Có những vấn đề mà phải nắm rõ bản chất của nó ta mới có thể giải quyết được. Như cái tên “Phản Phác Quy Chân”, series này không giới thiệu công nghệ hay ngôn ngữ mới, mà sẽ tập trung quay lại những cái bản chất, đơn giản, tinh túy nhất mà ít người quan tâm để ý (Bên tiếng Anh có một từ tương tự : Back to Basic, bỏ qua những cái phức tạp, quay lại những cái cơ bản để hiểu tận gốc vấn đề). Ở bài viết đầu, mình sẽ nhắc sơ lại về string, cũng như giải thích lý do vì sao việc cộng string sẽ ảnh hưởng tới bộ nhớ và performance của hệ thống (Hình minh họa và bài viết méo liên quan với nhau đâu, vì tác giả thích thế :v). Chuyện về String Ngày xửa ngày xưa, thời còn học Java, ta thường được nghe dạy rằng khi cộng chuỗi, phải dùng StringBuilder và append , thay vì cộng String . Lý do là vì String là kiểu immutable, giá trị của nó không thay đổi, khi cộng string ta tạo một string mới trong bộ nhớ. Còn StringBuilder là kiểu mutable, do đó khi ta dùng append, giá trị của nó thay đổi chứ không tạo ra string mới. Do đó dùng StringBuilder sẽ tiết kiệm bộ nhớ và chạy nhanh hơn. Không tin à, hãy xem 2 đoạn code dưới đây, đoạn code dùng StringBuilder chỉ mất 4ms để chạy, còn đoạn code sử dụng String mất tới 4828ms ( Nguồn ). Ta tạm gật gù đồng ý “Ồ, ra thế”. Tuy nhiên, có bao giờ ta tự hỏi, tại sao cộng string lại chậm hay không? Hãy cùng đọc bài viết và tìm hiểu nhé. Cộng string thì có vấn đề gì Để giải thích vấn đề này, ta hãy thử trải nghiệm cảm giác “ Phản phác qui chân “: Bỏ qua một bên những công nghệ mới mẻ hoành tráng, những framework đồ sộ, những ngôn ngữ ảo diệu, quay lại từ cái thời ngày xửa ngày xưa còn dùng DevC, còn làm việc với byte và bộ nhớ. Đúng vậy, những kiến thức về byte, về bộ nhớ là nền tảng cho hệ thống kiến thức của bạn. Hãy nhớ lại cách C lưu trữ string: String là một mảng các byte, có kí tự cuối cùng là kí tự null. Với cách lưu trữ này, để biết được độ dài của string, ta phải chạy một vòng lặp bắt đầu từ con trỏ chứa byte đầu tiên cho tới khi gặp kí tự null. Dưới đây là một phiên bản của hàm strcat , hàm cộng chuỗi trong C. Đọc code và suy ngẫm nhé. Dòng đầu tiên, code sẽ chạy từ đầu cho tới khi gặp phải null character cuối string dest , sau đó nó sẽ copy từng byte của string src và string dest . Hai vòng lặp, độ phức tạp chỉ là O(n), đâu có gì ghê gớm nhỉ?? Tuy nhiên, khi ta thực hiện việc cộng chuỗi nhiều lần, với chuỗi dài thì sao? Mỗi lần gọi strcat , vòng lặp sẽ chạy từ đầu cho tới cuối chuỗi, chuỗi càng dài thì vòng lặp chạy càng lâu. Tới khi chuỗi string vô cùng lớn thì việc cộng chuỗi diễn ra rất nặng nề và chậm chạp. Bác Joel có một câu chuyện cười (mình đọc chả thấy vui) để mô tả vấn đề này. Một cô tóc vàng mới vào nghề sơn vạch phân tuyến trên đường cao tốc. Ngày đầu, cô sơn được 10 dặm, ngày hôm sau cô chỉ sơn được 7 dặm. Ông chủ nghĩ rằng cô mệt, nên cho nghỉ một ngày. Sau hôm đó, cô ta làm cũng chỉ được 5 dặm. Cứ thế mỗi ngày cô lại làm ít hơn. Ông chủ gọi cô tới hỏi: – Có chuyện gì xảy ra thế? Tại sao năng suất của cô giảm từng ngày? – Tôi tưởng là ông phải biết chứ! Đơn giản là càng ngày, tôi càng đi xa cái thùng sơn hơn . Tương tự như trong truyện, string gốc càng dài thì vòng lặp phải chạy càng lâu. Do đó, để giải quyết vấn đề này, một số phiên bản khác của hàm strcat đã được tạo ra: Với cách viết này, sau khi cộng chuỗi, ta trả ra vị trí con trỏ cuối cùng. Mỗi lần cộng thêm, vòng lặp chỉ cần chạy từ con trỏ được trả cho tới cuối chuỗi src thôi, không còn lặp nhiều như thuật toán ban đầu nữa. Kết luận Lâu lâu tìm hiểu về những khái niệm/ngôn ngữ bậc thấp cũng khá hay phải không nào. May mắn là chúng ta được sử dụng C# , Java tự giải phóng bộ nhớ, lại có khá nhiều thư viện hỗ trợ. Nhiều bác vẫn còn viết C, C++, truy cấp bộ nhớ bằng tay rất cực (Cực nhưng lương cao chót vót đấy nhé). Tuy nhiên, nếu mình là người viết code, trong 90% các trường hợp, mình vẫn sẽ dùng String hoặc String.Format thay vì StringBuilder !! Vì sao?? Chịu khó chờ nhé, mình sẽ dành một bài viết khác để giải thích chuyện này. Bài viết tham khảo nhiều từ blog Joel on Software của bác Joel, một người vừa cứng technical vừa giỏi điều hành và quản lý : . Bài viết gốc mổ xẻ khá nhiều vấn đề về performance, bộ nhớ liên quan tới string, cơ mà mình thấy không có ích mấy nên không đưa vào bài viết nhé. Rate this: Like this: Related
A little explanation about the name of the series 返璞归真 – The highest point is also the starting point, applied in many fields. In martial arts, it means reaching the legendary "Ultimate" realm, forgetting all the martial arts in the world, no longer having specific moves, just relying on the mind to simply handle them. . Martial arts are founded from basic moves, and great martial arts also come from basic moves. Learning code is also made up of basic bits/bytes, no matter how complex the program is, it can be translated into bytecode. Sometimes, we get so used to using libraries and frameworks that we forget the things that lie deep underneath, not understanding the essence. There are problems that must clearly understand their nature to be able to solve them. Like the name "Phan Phac Quy Chan", this series does not introduce new technology or language, but will focus on returning to the most basic, simple, and quintessential things that few people pay attention to (English version). There is a similar word: Back to Basic, skip the complicated things, go back to the basics to understand the root of the problem). In the first article, I will briefly mention strings, as well as explain why adding strings will affect the memory and performance of the system (The illustration and the article are not related, because The author likes that :v). Story about String Once upon a time, when we were studying Java, we were often taught that when adding strings, we had to use StringBuilder and append , instead of adding String . The reason is because String is an immutable type, its value does not change. When adding strings, we create a new string in memory. StringBuilder is a mutable type, so when we use append, its value changes, not creating a new string. Therefore, using StringBuilder will save memory and run faster. Don't believe it, look at the 2 code snippets below, the code using StringBuilder only takes 4ms to run, while the code using String takes up to 4828ms (Source). I temporarily nodded in agreement, "Oh, that's it." However, have we ever wondered why string addition is slow? Let's read the article and find out. What's the problem with adding strings? To explain this problem, let's try to experience the feeling of "Reflecting on truth": Putting aside the majestic new technologies, massive frameworks, magical languages , going back to the old days of using DevC, still working with bytes and memory. That's right, knowledge about bytes and memory is the foundation for your knowledge system. Remember how C stores strings: String is an array of bytes, with the last character being a null character. With this way of storing, to know the length of the string, we must run a loop starting from the pointer containing the first byte until we encounter a null character. Below is a version of the strcat function, the string addition function in C. Read the code and ponder. The first line, the code will run from the beginning until it encounters a null character at the end of string dest , then it will copy each byte of string src and string dest . Two loops, complexity is only O(n), nothing terrible, right?? However, what happens when we perform string addition many times, with long strings? Each time strcat is called, the loop will run from the beginning to the end of the string. The longer the string, the longer the loop will run. When the string becomes extremely large, adding the string becomes very cumbersome and slow. Uncle Joel has a joke (I didn't find it funny) to describe this problem. A blonde newbie paints lane markings on the highway. The first day, she painted 10 miles, the next day she only painted 7 miles. The boss thought she was tired, so he gave her a day off. After that day, she could only do 5 miles. Every day she did less and less. The boss called her over and asked: - What happened? Why is her productivity decreasing day by day? – I thought you must know! It's simply that day by day, I move further and further away from the paint can. Similar to the story, the longer the original string, the longer the loop has to run. Therefore, to solve this problem, several other versions of the strcat function were created: With this way of writing, after adding the string, we return the final pointer position. Each addition, the loop only needs to run from the returned pointer to the end of the src string, no longer repeating as much as the original algorithm. Conclusion Learning about low-level concepts/languages ​​from time to time is quite good, isn't it? Luckily, we can use C#, Java frees up memory, and there are quite a few support libraries. Many people still write C, C++, accessing memory by hand is very difficult (Extreme but the salary is sky-high). However, if I were a coder, in 90% of cases, I would still use String or String.Format instead of StringBuilder !! Why?? Please wait patiently, I will dedicate another article to explain this. The article is heavily referenced from Joel on Software's blog Joel, a person who is both technical and good at operations and management: . The original article dissected a lot of performance and memory issues related to strings, but I didn't find it very useful so I didn't include it in the article. Rate this: Like this: Related
Ngày xửa ngày xưa, có một trang web bán hàng… Bài viết đầu năm nên phải nói tiền trăm triệu cho nó hoành tráng. Đây là một chuyện nho nhỏ, về một button nho nhỏ và một số tiền… không nhỏ chút nào. Mình đọc được chuyện này được trong cuốn Don’t make me think – một cuốn sách khá hay về UI/UX. Ngày xửa ngày xưa, ở một đất nước nọ, có một trang web bán hàng… Chức năng cơ bản của một trang web bán hàng thì ai cũng biết: hiển thị hàng, cho hàng vào giỏ, và thanh toán. Câu chuyện của chúng ta bắt đầu ở chức năng “Thanh toán”, khi người dùng đã cho hết hàng vào giỏ, một form nho nhỏ xinh xinh hiện ra, với 2 trường username và password , 2 nút Login và Register , một link Quên mật khẩu. Thế nhưng, chính cái form be bé xinh xinh này đã gây thiệt hại đến 300.000.000$/năm cho trang web bán hàng. Vấn đề ở chỗ, người dùng phải đăng nhập trước khi muốn thanh toán . Đội lập trình nghĩ rằng “Chỉ cần đăng ký tài khoản, thông tin người dùng có thể được lưu lại, ở những lần sau họ không cần nhập địa chỉ, thông tin thanh toán nữa. Người dùng tiết kiệm được thời gian, web cũng khuyến khích được người dùng quay lại mua hàng, hai bên cùng có lợi còn gì?”. Lũ lập trình viên luôn nghĩ rằng mình hiểu người dùng Đội ngũ UI/UX đã làm một cuộc thử nghiệm, đưa tiền cho người dùng để họ thực hiện quá trình mua hàng – thanh toán. Đối với những khách hàng mới của trang web, họ phát hiện ra một điều: người dùng rất ghét việc đăng ký, với suy nghĩ “Mình muốn mua hàng, chứ không phải muốn đăng ký đăng kiếc gì cả”. Chưa kể, người dùng còn sợ bị mất thông tin cá nhân, bị gửi mail spam hộp thư. Với những người dùng quay lại lần 2,3 – đối tượng mà developer nhắm tới, tình cảnh cũng chẳng khá hơn. Họ không nhớ được username/mật khẩu của mình. Mặc dù chức năng “Quên password” vẫn hoạt động, đến tận 160.000 người dùng chức năng này mỗi ngày, 75% trong số đó không tiếp tục quá trình thanh toán sau khi đã request mật khẩu. Chiếc form nho nhỏ xinh xinh kia, hóa ra lại là thứ ngăn cản người dùng mua hàng – rất nhiều người dùng. Thế mới biết, developer lúc nào cũng nghĩ mình hiểu được người dùng, nhưng thật ra không phải vậy. Chiếc button trị giá 300 triệu đô la Đội ngũ designer đã giải quyết vấn đề này một cách vô cùng đơn giản. Họ bỏ đi nút Register, thay vào đó bằng nút Continue và dòng chữ “Bạn không cần đăng ký, hãy bấm nút Continue để thanh toán. Để thanh toán nhanh hơn ở những lần sau, bạn có thể đăng ký một tài khoản vào lúc thanh toán”. Kết quả: Lượng thanh toán của khách hàng tăng lên đến 45%. Sau tháng đầu tiên, doanh số tăng 15.000.000$. Sau năm đầu tiên, thu nhập của web tăng đến tận 300 triệu đô la. Tất cả những việc mà họ đã làm là gì? Chỉ là thay một button mà thôi. Một cái nhìn khác về UI/UX và chức năng Một số bạn còn nhầm lẫn về hai khái niệm này, nên mình xin đưa ra một khái niệm tổng quát: UI (User Interface) – Giao diện người dùng : Đây là những gì người dùng nhìn thấy, tương tác được (Form, button, website). UX (User Experience) – Trải nghiệm người dùng : Đây là những gì người dùng trải nghiệm, bao gồm cảm xúc, suy nghĩ, quá trình. UI chỉ là một phần của UX. VD như khi bạn mua hàng trên tiki. Các trang web thanh toán, web mua hàng chính là UI. Quá trình mua hàng/nhận hàng, sự thoải mái khi thanh toán, sự hỗ trợ của Tiki với khách hàng chính là UX. Trong câu chuyện trên, bằng cách thay đổi UI (Thay một button), họ đã trực tiếp cải thiện UX (Thay đổi trải nghiệm mua hàng, mua nhanh hơn, không cần đăng ký), từ đó làm tăng doanh số bán hàng. Hẳn nhiều bạn lập trình viên vẫn còn suy nghĩ: Chức năng mới là quan trọng, còn mấy thứ ruồiiii bu như giao diện thì làm thế nào cũng được (Một phần chắc là do lúc mới học lập trình toàn phải viết chương trình Console, trước đây mình cũng vậy). Đây là một suy nghĩ hoàn toàn sai lầm. Nếu chỉ viết vài tool đơn giản cho chính mình hoặc bạn bè xài thì đúng là giao diện không quan trọng. Nhưng nếu đã tạo ra sản phẩm, hướng tới người dùng, thì UI/UX là những thứ quan trọng nhất nhì, có khi hơn cả chức năng. Nếu không tin, bạn hãy thử đọc The Inmates Are Running the Asylum – cuốn “thánh kinh” của dân thiết kế UI/UX, để hiểu rõ hơn về tầm quan trọng của hai thứ này. Hãy nhớ một điều mình muốn nói qua câu chuyện này: Đôi khi chỉ một button nho nhỏ lại có giá trị đến 300 triệu đô đấy . Các bạn có thể đọc thêm về câu chuyện “kinh điển” về UI/UX này ở đây: Rate this: Like this: Related
Once upon a time, there was a sales website... First article of the year so we had to say hundreds of millions to make it grand. This is a small story, about a small button and an amount of money... not small at all. I read about this in the book Don't make me think - a pretty good book about UI/UX. Once upon a time, in a certain country, there was a sales website... Everyone knows the basic functions of a sales website: display goods, put goods in the cart, and pay. Our story begins with the "Checkout" function, when the user has put all the goods in the cart, a beautiful small form appears, with 2 fields for username and password, 2 buttons Login and Register, a Forgot link. password. However, it is this pretty little form that causes damage of up to $300,000,000/year to the sales website. The problem is, users must log in before wanting to pay. The programming team thought that "Just register an account, user information can be saved, next time they do not need to enter address or payment information anymore. Users save time, the website also encourages users to come back to buy products, what's the win-win situation for both sides? Programmers always think they understand users. The UI/UX team did an experiment, giving users money to go through the purchase - payment process. For new customers of the website, they discovered one thing: users really hate registration, with the thought "I want to buy products, not want to register for anything". Not to mention, users are also afraid of losing personal information and having their inbox spammed. For users who return 2 or 3 times - the target audience for developers, the situation is no better. They can't remember their username/password. Although the “Forgot password” function is still active, up to 160,000 people use this function every day, 75% of whom do not continue the payment process after requesting a password. That cute little form turns out to be the thing that prevents users from buying - a lot of users. So you know, developers always think they understand users, but actually they don't. The button is worth 300 million dollars. The design team solved this problem in a very simple way. They removed the Register button, replaced it with a Continue button and the words "You do not need to register, please click the Continue button to pay. To pay faster next time, you can register an account at checkout. Result: Customer payments increased by up to 45%. After the first month, sales increased by $15,000,000. After the first year, the web's income increased to $300 million. What all did they do? Just replacing a button. Another look at UI/UX and functionality Some of you are still confused about these two concepts, so I would like to give a general concept: UI (User Interface) - User interface: This is what the user sees and interacts with (Form, button, website). UX (User Experience) – User experience: This is what users experience, including emotions, thoughts, processes. UI is just a part of UX. For example, when you buy products on tiki. Payment websites and shopping websites are UI. The purchasing/receiving process, payment comfort, and Tiki's support to customers are UX. In the story above, by changing the UI (Changing a button), they directly improved the UX (Changing the purchasing experience, buying faster, without registration), thereby increasing sales. Surely many programmers still think: Functions are important, but you can do whatever is necessary for trivial things like interfaces (Part of this is probably because when you first learn programming you have to write Console programs. I was like that before). This is a completely wrong thinking. If you're just writing a few simple tools for yourself or friends to use, the interface isn't important. But if you have created a product that is user-oriented, UI/UX are the second most important things, sometimes even more important than function. If you don't believe it, try reading The Inmates Are Running the Asylum - the "bible" of UI/UX designers, to better understand the importance of these two things. Remember one thing I want to say through this story: Sometimes just a small button is worth up to 300 million dollars. You can read more about this "classic" story about UI/UX here: Rate this: Like this: Related
Bạn nào theo dõi blog từ những ngày đầu sẽ biết mình khá thần tượng anh chàng John Sonmez, tác giả blog simpleprogrammer . Những bài viết trên blog của anh đã cho mình nhiều bài học vô cùng quí giá, truyền cảm hứng cho mình viết nên blog Tôi đi code dạo này. Blog của mình cũng đang đi theo con đường của anh này, truyền đạt những kiến thức về lập trình , về nghề nghiệp , giúp các bạn xác định con đường cho bản thân . John Sonmez cũng xuất thân là “developer quèn” như chúng ta. Tuy nhiên, hiện nay anh không còn đi “code dạo” như mình, mà chỉ làm consulting, có thu nhập bị động (Hơn 500.000/$ năm nhờ các khóa giảng dạy trên pluralsight , bán sách và một số khóa học trên website). Có thể nói anh là một trong những lập trình viên khá thành công. John cho rằng ngoài kĩ năng lập trình, kĩ năng marketing là một trong những thứ quan trọng nhất mà mọi lập trình viên nên có; biết cách marketing bản thân sẽ làm bạn cao giá hơn, dễ tìm được công việc lương cao như ý muốn. Vừa tuần trước đây, mình bị dính một cú marketing khá bất ngờ và thú vị từ anh chàng này. Trò marketing này khá hiệu quả, mình thấy nó còn hay gấp mấy lần mấy cái quảng cáo, giới thiệu trên TV. Chưa biết anh code giỏi chừng nào nhưng khả năng bán thân, lộn, bán mình thật là bá đạo :D. Mình chia sẻ câu chuyện này với các bạn, nếu sau này bạn nào muốn bán hàng, bán thân hay bán dịch vụ có thể áp dụng thử. Từ một email úp úp mở mở Vì nằm trong danh sách subscriber của blog Simpleprogrammer, lâu lâu mình vẫn nhận được mail từ blog, giới thiệu các bài viết hay (Các bạn cũng nên like trang fanpage Tôi đi code dạo , hoặc đăng kí mail bên phải nhé). Vừa hôm trước, mình nhận được một email của John. Mọi chuyện bắt đầu từ đây. Mail khá vui, kể về những ngày đầu anh vừa đi làm , đang làm tester với mức lương 25$, anh apply qua một cty mới với mức lương 75$. Phỏng vấn khá đơn giản: “Anh biết C++ không”, “À, biết”, thế là được nhận. Điều quan trọng ở đây là “Trước giờ anh chưa bao giờ đụng tới C++ cả”. John đã làm gì? Anh mua một cuốn sách về C++ , đọc lúc ăn lúc ngủ, đọc từ đầu tới cuối. Và rồi anh đã master C++ trong 1 tháng. ĐÙA ĐẤY, anh cũng chỉ là người thường như chúng ta thôi, không phải thiên tài đâu. Đọc hết cuốn sách, anh vẫn ngáo ngơ, chẳng thấm được mấy vào đầu. Và rồi John Sonmez rút ra được một chân lý: Kĩ năng quan trọng nhất để sống sót cho developer là KĨ NĂNG HỌC TẬP. Anh nói rằng sẽ chia sẻ, truyền đạt một số kinh nghiệm về học tập mà mình có được trong quá trình làm việc ở mail sau. Mình khá là háo hức về những điều anh sẽ nhắc đến ở email sau. Thế rồi email thứ hai vào ngày hôm sau Ở email này, John lại kể về một trải nghiệm khá thú vị. Anh bắt đầu thực hiện các khóa dạy trên pluralsight: C# , Java, SQL, Android, …Thế rồi anh gặp một vấn đề: Mình hết cái để dạy cmnr. Cái khó ló cái khôn, anh quyết định: Hết cái để dạy thì học ngôn ngữ mới rồi dạy thôi . Anh quyết định học ngôn ngữ mới, và rồi … thất bại đau đớn, vì việc học ngôn ngữ mới không dễ như anh từng nghĩ. Không bỏ cuộc, anh vẫn ép buộc bản thân học và dạy. Vừa học, anh vừa tự rút ra những mánh khóe, những kĩ năng học tập. Đến khi kết thúc, anh có thể học một ngôn ngữ mới , quay một khóa học 4 tiếng chỉ trong vòng … 10 ngày. (Học ở đây không phải là xem, đọc, biết sơ sơ, mà là có thể làm được, và dạy được người khác luôn nhé.). Một lần nữa, John lại úp mở về nhũng kĩ năng này, anh hứa mọi thứ sẽ xuất hiện trong mail sau. Email cuối cùng – Em đã bị lừa, bị dính đòn quảng cáo Và rồi, ngay hôm sau, mình nhận được một email cuối cùng. John vừa tung ra khóa học “10 bước để học mọi thứ”. Một đường link trong email dẫn tới trang web quảng cáo cho khóa học này. Trang web là một bài quảng cáo khá dài (nhưng rất hay) về khóa học. Bài quảng cáo còn phân tích những lợi ích bạn sẽ thu được so với số tiền bỏ ra khi mua khóa học, kèm theo đó là vô số chiêu trò khuyến mãi, chỉ cần bỏ 97$ bạn sẽ thu được thứ trị giá gần 600$. Tiếc cho anh Sonmez là, tuy anh quảng cáo khá thành công nhưng mà em nghèo quá, gặp 100 nghìn chắc em bỏ tiền ủng hộ anh rồi. Một số bài học rút ra được Có vài điều khá thú vị mình rút ra được sau khi dính cú marketing này của anh John: Đầu tiên, gửi vài cái mail úp mở để thu hút sự tò mò, chú ý của khách hàng. Nếu không có 2 email đầu tiên, chắc mình chả thèm click vào link giới thiệu đâu. Nội dung bài quảng cáo không tập trung vào bản thân mà tập trung vào chính khách hàng, vào những thứ họ nhận được. Các bạn nên học thử một khóa “Viết PR quảng cáo” để hiểu rõ hơn về cách viết này. Cá nhân mình thấy có một bạn viết quảng cáo học lập trình khá hay ở đây , các bạn sinh viên hẳn sẽ rất hứng thú khi đọc. Tiếng tăm, tên tuổi của John Sonmez cũng khá quan trọng. Nếu là một thằng bá vơ nào nói nó học và dạy 1 ngôn ngữ trong 10 ngày thì mình không tin đâu, nhưng với anh John Sonmez thì khác, có người thật việc thật bằng chứng rõ ràng cơ mà. Các bạn thấy thương hiệu bản thân quan trọng chưa nào. Một trò nữa là “Tạo cảm giác gấp gáp, giá cả chỉ ưu đãi trong 6 ngày đầu tiên”, để dụ dỗ khách hàng mua sản phẩm, các bạn học marketing chắc không lạ gì trò này nhỉ. Quay lại điều mình muốn nói ở đầu bài viết: Các bạn developer hãy thử tìm hiểu/học về marketing đi, nếu không bán được hàng thì cũng bán thân được giá cao hơn . Tác giả blog codinghorror cũng có một bài viết tương tự: If there was one thing I could teach every engineer, it would be how to market . Hai cuốn sách về marketing bản thân mà bạn nên tìm đọc thử là: Whatever You Think, Think the Opposite và It’s Not How Good You Are, It’s How Good You Want to Be. Bạn nào có sách hay hơn thì cứ giới thiệu nhé. Rate this: Like this: Related
Those of you who have followed the blog since the early days will know that I quite admire John Sonmez, author of the simpleprogrammer blog. The articles on your blog have given me many extremely valuable lessons, inspiring me to write the blog I've been coding lately. My blog is also following this guy's path, conveying knowledge about programming and careers, helping you determine your own path. John Sonmez also comes from a "lowly developer" background like us. However, nowadays he no longer "codes around" like me, but only does consulting, earning passive income (More than 500,000/$ per year thanks to teaching courses on pluralsight, selling books and some courses on the website). . It can be said that he is one of the quite successful programmers. John believes that in addition to programming skills, marketing skills are one of the most important things that every programmer should have; Knowing how to market yourself will make you more valuable and easier to find the high-paying job you want. Just last week, I was hit with a rather surprising and interesting marketing attack from this guy. This marketing game is quite effective, I find it several times better than advertisements and introductions on TV. I don't know how good he is at coding, but his ability to sell himself, turn around, and sell himself is truly awesome :D. I share this story with you. If you want to sell goods, sell body or sell services in the future, you can try it out. From a vague email Because I'm on the Simpleprogrammer blog's subscriber list, I still receive emails from the blog from time to time, introducing good articles (You should also like the fanpage I go coding, or sign up for email). on the right). Just the other day, I received an email from John. Everything starts here. The mail was quite funny, telling about his first days at work, working as a tester with a salary of $25, he applied through a new company with a salary of $75. The interview was quite simple: "Do you know C++", "Ah, yes", then you were accepted. The important thing here is "I have never touched C++ before". What did John do? He bought a book about C++, read it while eating and sleeping, from beginning to end. And then he mastered C++ in 1 month. JUST KIDDING, I'm just an ordinary person like the rest of us, not a genius. After reading the entire book, he was still confused and couldn't get much into his head. And then John Sonmez learned a truth: The most important survival skill for developers is LEARNING SKILLS. He said that he would share and convey some of the learning experiences he gained during his work in the following email. I'm quite excited about what you will mention in the next email. Then the second email the next day In this email, John told about a rather interesting experience. He started doing courses on pluralsight: C#, Java, SQL, Android, ... Then he encountered a problem: I ran out of things to teach cmnr. The difficulty revealed wisdom, he decided: When he ran out of things to teach, he would learn a new language and then teach it. He decided to learn a new language, and then... failed miserably, because learning a new language was not as easy as he thought. Not giving up, he still forced himself to study and teach. While studying, he learned his own tricks and study skills. By the end, you can learn a new language, filming a 4-hour course in just… 10 days. (Learning here is not about watching, reading, knowing the basics, but about being able to do it, and being able to teach others.). Once again, John opened up about these skills, he promised everything would appear in the next email. The last email - I was tricked and hit with advertising. And then, the next day, I received a final email. John just launched the course “10 Steps to Learn Anything”. A link in the email leads to a website advertising this course. The website is a rather long (but very good) advertisement for the course. The advertisement also analyzes the benefits you will gain compared to the amount of money you spend when buying the course, along with countless promotional tricks. Just spend $97 and you will get something worth nearly $600. . Unfortunately for Mr. Sonmez, although his advertising is quite successful, I am so poor, if I met 100 thousand, I would have spent money to support him. Some lessons learned There are a few interesting things I learned after being exposed to this marketing trick from Mr. John: First, send a few hidden emails to attract customers' curiosity and attention. If it weren't for the first two emails, I probably wouldn't have even clicked on the referral link. The advertising content does not focus on itself but on the customers themselves, on what they receive. You should try a course "Writing PR advertising" to better understand this writing style. Personally, I think there's a guy here who writes a pretty good advertisement for learning programming. Students will probably be very interested in reading it. John Sonmez's reputation and name are also quite important. If some idiot said he learned and taught a language in 10 days, I wouldn't believe it, but with John Sonmez it's different, there are real people with clear evidence. Do you see how important your personal brand is? Another trick is "Create a sense of urgency, preferential prices only for the first 6 days", to entice customers to buy the product, marketing students are probably not unfamiliar with this trick. Back to what I wanted to say at the beginning of the article: Developers, try to learn/learn about marketing. If you can't sell the product, you can still sell yourself at a higher price. The author of the blog codinghorror also has a similar article: If there was one thing I could teach every engineer, it would be how to market. Two books about self-marketing that you should try out are: Whatever You Think, Think the Opposite and It's Not How Good You Are, It's How Good You Want to Be. If you have a better book, please recommend it. Rate this: Like this: Related
Hẳn là có vài bạn (sinh viên) đang muốn hỏi: Ơ tui là lập trình viên, lo code thôi chứ có phải thiết kế gì đâu mà phải học design ? Xin trả lời là: trừ khi bạn đi theo con đường lập trình nhúng, hoặc làm back-end developer 100%, thế nào bạn cũng sẽ phải đụng tới vài việc liên quan tới thiết kế. Nếu may mắn, những công việc như thiết kế giao diện web, giao diện di động sẽ được thực hiện bởi designer, developer chúng mình chỉ cần file HTML hoặc PSD và code thôi.Tuy nhiên, ở Việt Nam, nhiều khi developer chúng mình cũng phải kiêm luôn nhiệm vụ này . Thiếu kiến thức về design, đôi khi dev chúng mình cho ra nhiều giao diện khá là khủng khiếp (Thuở xưa ở Đại Học cũng có dạy môn HCI – Tương tác người dùng, nhưng cũng chẳng có tác dụng mấy). Do đó, bạn hãy tự trang bị cho mình những kiến thức design cơ bản , để tạo ra những design coi được . Những kiến thức này sẽ rất hữu dụng khi bạn muốn đi theo con đường front-end developer , hoặc full-stack developer. Lẽ dĩ nhiên, dân developer chúng mình không khéo tay, sáng tạo như bè lũ designer được. Chúng ta thiết kế không phải hướng tới cái đẹp, mà hướng tới sự hữu dụng , đẹp và thuận mắt là thứ yếu. Mình cũng biết, các bạn thích làm việc với HTML, CSS, JS chứ không phải InDesign hay Photoshop, ta không thể học design theo cách của tụi designer được. May mắn thay, mình tình cờ lụm được một số bí kíp khá hay về Design for developer , kiến thức rất thú vị, trực quan, phù hợp cho giới developer. Dĩ nhiên là mình không ăn một mình mà mang lên đây chia sẻ cho mọi người, mong các bạn ủng hộ. Bài viết chỉ nói về một số vấn đề cơ bản mà quan trọng: Màu sắc, font chữ, và layout. Màu sắc Màu sắc và logo là 2 thứ đầu tiên đập vào mắt người dùng khi họ sử dụng trang web/ứng dụng. Với Facebook đó là màu xanh dịu dàng, với Yahoo là màu tím mộng mơ. Chọn màu sắc là một việc tưởng dễ nhưng khá khó. Nếu không biết cách chọn, các màu sẽ đánh nhau chan chát, nhìn rất ngứa mắt. Xin giới thiệu với các bạn một công cụ mà lũ designer hay xài – vòng tròn màu thần thánh : . Để chọn một được bộ màu phù hợp cho website (Khoảng 5-6 màu), ta cần làm theo các bước sau: Dĩ nhiên, đằng sau chuyện chọn màu này là một đống lý thuyết về thị giác, tâm lý,…. Mà kệ nó, lũ designer phải học mấy cái đấy, còn mình biết cách để lấy màu đẹp là được rồi. Font chữ (Typography) Font chữ chính là thứ làm sự chuyên nghiệp của website. Nhiều bạn thường chỉ dùng mỗi Arial và Times New Roman để làm font, do đó nhìn website có vẻ khô cứng, thiếu tự nhiên. Website của mình dùng Open Sans tạo cảm giác thanh mảnh dễ đọc: . Có hàng ngàn font chữ được sử dụng, tuy nhiên chúng có thể được chia thành vài loại dưới đây: Serif font: Font có các dấu gạch ở chân, cuối chữ, tiêu biểu là Times New Roman. Font này thường được dùng khi in ấn, hoặc cho nội dung vì chúng khá trang trọng, dễ đọc. San-serift font: Font không chân, tiêu biểu là Calibri, Verdana. Font này thường được dùng để hiển thị giao diện, title, button, vì chúng dễ đọc dù ở size nhỏ. Script font: Font viết tay, thường dùng để trang trí, tạo cảm giác nhẹ nhàng vui nhộn. Nếu không biết dùng thì đừng dùng nhé. Monospace font: Các chữ trong font này có cùng bề ngang, thường dùng để hiển trị công thức v…v Các bạn có thể tìm font đẹp tại Google Font, sau đó tìm hiểu cách kết hợp các font tại và nhé. Điều quan trọng nhất, để người dùng dễ đọc, nhớ đừng để chữ nhỏ quá (Khoảng 16px là vừa), tăng cỡ chữ cho web di động nhé. Layout Các designer chuyên nghiệp thường sử dụng grid layout, layout theo dạng khối. Layout thường được chia thành 12 cột .12 là con số thần thánh vì nó chia hết cho 2, 3, 4, 6, designer có thể chia màn hình thành 2, 3 hay 4 cột đều được . CSS framework nổi tiếng là bootstrap cũng áp dụng con số 12 này vào grid system của họ: . Một lời khuyên nữa từ các designer là đừng tiết kiệm khoảng trắng . Trong thiết kế, khoảng trắng tạo cảm giác thoáng đãng, rộng rãi, xa hoa. Thử ghé thăm Google hoặc Apple, bạn sẽ thấy giao diện rất trực quan, dễ nhìn với nhiều khoảng trắng. Tương phản là một số trang web bán hàng hoặc tin tức (Yahoo), nhồi nhét đủ thứ vào rất chật chột, tù túng và rối mắt. Nhắc lại lần nữa, đừng tiết kiệm khoảng trắng (Nhưng đừng để website trống huơ trống hoác nhá). Bài học quan trọng nhất trong thiết kế là: Khi không biết phải làm gì, hãy tham khảo và “chôm chỉa” . Mục đích thiết kế của dân developer, không phải để tạo ra cái đẹp, cái mới , mà là để tạo ra sản phẩm tốt nhất , dễ sử dụng nhất. Do đó, cứ thoải mái học hỏi và chôm chỉ từ cái design đỉnh nhé. Mọi người thảo luận và chia sẻ với nhau các tài liệu học design trong phần comment nhé. Bạn nào là designer hoặc chuyên về design có thể ném gạch, góp ý hộ để bài viết của mình được đúng đắn, chính xác hơn, mình xin nhận gạch đá nhiệt tình luôn. Một số tài liệu được tham khảo trong bài viết: Rate this: Like this: Related
Surely there are some of you (students) who want to ask: Oh, I'm a programmer, I only worry about coding, I don't design anything, I have to learn design? The answer is: unless you follow the path of embedded programming, or become a 100% back-end developer, you will inevitably have to deal with some design-related work. If we are lucky, tasks such as designing web interfaces and mobile interfaces will be done by designers and developers, we only need HTML or PSD files and code. However, in Vietnam, many times we are developers. must also take on this task. Lacking knowledge about design, sometimes our developers produce quite terrible interfaces (In the past, at University, we also taught HCI - User Interaction, but it was not very effective). Therefore, equip yourself with basic design knowledge to create acceptable designs. This knowledge will be very useful when you want to follow the path of front-end developer, or full-stack developer. Of course, we developers are not as skillful and creative as the designers. We design not for beauty, but for usefulness, beauty and eye-pleasing are secondary. I also know that you like to work with HTML, CSS, JS, not InDesign or Photoshop. We cannot learn design the way designers do. Luckily, I happened to pick up some pretty good tips about Design for developers, very interesting, intuitive, and suitable knowledge for developers. Of course, I don't eat it alone, but bring it here to share with everyone, hoping for your support. This article only talks about some basic but important issues: Color, font, and layout. Color Colors and logos are the first two things that catch users' eyes when they use the website/application. For Facebook it is gentle blue, for Yahoo it is dreamy purple. Choosing colors is a seemingly easy task but quite difficult. If you don't know how to choose, the colors will clash and look very itchy. Let me introduce to you a tool that designers often use - the divine color circle: . To choose a suitable color set for the website (About 5-6 colors), we need to follow these steps: Of course, behind choosing this color is a bunch of theories about vision, psychology, etc. But never mind, designers have to learn those things, but I know how to get beautiful colors and that's fine. Font (Typography) Font is what makes the website professional. Many people often only use Arial and Times New Roman as fonts, so the website looks dry and unnatural. My website uses Open Sans to create a slim, easy-to-read feeling: . There are thousands of fonts in use, however they can be divided into a few categories below: Serif font: Font with underscores at the foot and end of the letter, typically Times New Roman. This font is often used when printing, or for content because it is quite formal and easy to read. San-serift font: Font without serifs, typically Calibri, Verdana. This font is often used to display interfaces, titles, and buttons, because they are easy to read even at small sizes. Script font: Handwritten font, often used for decoration, creating a light and fun feeling. If you don't know how to use it, don't use it. Monospace font: The letters in this font have the same width, often used to display formulas, etc You can find beautiful fonts at Google Font, then learn how to combine fonts at and. The most important thing, for users to read easily, remember not to make the text too small (About 16px is enough), increase the font size for mobile websites. Layout Professional designers often use grid layout, block layout. Layout is usually divided into 12 columns. 12 is the holy number because it is divisible by 2, 3, 4, 6, designers can divide the screen into 2, 3 or 4 columns. The famous CSS framework bootstrap also applies this number 12 to their grid system: . Another piece of advice from designers is not to skimp on white space. In design, white space creates a feeling of airiness, spaciousness, and luxury. Try visiting Google or Apple, you will see a very intuitive, easy-to-see interface with lots of white space. In contrast, some sales or news websites (Yahoo), cram everything into a very cramped, cramped and confusing space. Again, don't skimp on white space (But don't leave your website empty). The most important lesson in design is: When you don't know what to do, consult and "steal". The purpose of a developer's design is not to create something beautiful or new, but to create the best, easiest-to-use product. Therefore, feel free to learn and steal from the best designs. Everyone, please discuss and share design learning materials with each other in the comments section. Anyone who is a designer or specializes in design can throw criticism and give suggestions to make my article more correct and accurate. I will enthusiastically accept criticism. Some documents referenced in the article: Rate this: Like this: Related
Bạn có biết, lập trình là một trong những ngành độc hại? Bạn có biết, ngồi nhiều sẽ dẫn tới vô số những bệnh trầm trọng và mãn tính? Bạn có biết, lập trình viên rất dễ mắc các bệnh tim mạch, béo phì, đau khớp, …? Hãy đọc The Healthy Programmer – một cuốn sách viết về sức khỏe dành riêng cho developer. Cuốn này mình đọc từ hồi đầu năm khi tình cờ thấy nó trên it-ebooks , nhưng do lười quá nên giờ mới có thời gian review. Như tựa đề, đây là một cuốn sách dành cho dân lập trình, nhưng nội dung không nói gì về lập trình mà lại nói đến một vấn đề mà lập trình viên nào cũng quan tâm: sức khỏe. Ở 2 phần của bài viết Mặt tối của ngành công nghiệp IT , có nhiều bạn hỏi mình là tại sao lại không nhắc đến việc “Lập trình viên ngồi nhiều code nhiều nên bụng phệ, tai ù mắt cận, dễ mắc phải đủ thứ bệnh”. Lý do là vì đó là bệnh chung của dân văn phòng . Nhân tiện review quyển sách này, mình sẽ giới thiệu một số bệnh, triệu chứng, cách giữ sức khỏe cho dân developer tụi mình. Bạn nào quan tâm đến sức khỏe bản thân, muốn giữ sức để còn đàn đúm chơi bời thì nên đọc. Giới thiệu tổng quát Sách mở đầu bằng một câu rất hay: “Lý do quan trọng nhất bạn nên đọc cuốn sách này là sức khỏe của bạn phụ thuộc vào nó, lý do quan trọng thứ nhì là sự nghiệp của bạn cũng phụ thuộc vào nó”. Phải có sức khỏe tốt thì chúng ta mới theo nghề được lâu dài . Lối sống của giới developer rất dễ dẫn tới nhiều bệnh tật: Đau mắt, đau đầu, đau lưng, đau khớp tay, tim mạch, béo phì,… Tác giả đã gặp nhiều developer đau lưng mãn tính vì ngồi sai tư thế, hay đau khớp tay vì dùng chuột/bàn phím quá nhiều. Những điều này sẽ gây cản trở không ít thì nhiều cho quá trình làm việc của họ. Vì lẽ đó, cuốn sách này ra đời. (Các ảnh minh họa phía dưới đều cắt từ sách ra nhé). Nội dung các chương trong sách: 1. Thay đổi bản thân, xốc lại sức khỏe : Hướng dẫn ta cách tạo dựng các thói quen tốt cho sức khỏe: Tạo checklist hàng thành, đi bộ mỗi ngày. Việc đi bộ sẽ giảm 20% nguy cơ mắc phải các bệnh thường gặp trong giới văn phòng. 2. Tạm biệt chiếc ghế thân thương : Phân tích tác hại của việc ngồi nhiều. Nếu công việc cho phép, hãy cố gắng ra khỏi chỗ ngồi và đi lại mỗi 30p. Sách cũng có một số bài tập chân cơ bản để ta có thể tập tại chỗ. 3. Ăn uống kiểu Agile : Các bạn developer nữ chắc sẽ thích phần này. Sách hướng dẫn cách xây dựng một khẩu phần ăn hợp lý, cách theo dõi lượng calories thu vào/tiêu thụ trong một ngành để tăng/giảm cân theo ý muốn. Mình thì khoái thịt ghét rau nên làm theo mấy cái hướng dẫn cũng hơi khó. 😥 4. Chống nhức đầu, đau mắt : Đây cũng là một bệnh mà các developers hay gặp phải. Bạn có thể tìm thấy nguyên nhân, triệu chứng cũng như cách chữa có thể áp dụng ở phần này. 5. Chống đau lưng, đau tay : Đây là 2 chứng bệnh ảnh hưởng nhiều nhất đến năng suất lao động của developer chúng mình. Triệu chứng của hai bệnh này được mô tả khá rõ ràng. Nếu bạn bắt đầu có các triệu chứng này, hãy thử làm theo các bài tập trong sách hướng dẫn, khá hiệu quả đấy. 6. Ra ngoài và vận động : Ai cũng biết ngồi làm việc trong phòng máy lạnh cả ngày không tốt gì cho sức khỏe. Phần này nói về tác dụng của vitamin D, khuyến khích developer chúng ta nên ra ngoài nhiều. Nội dung cả phần cũng bình thường, có mỗi bài test sức khỏe cuối cùng là hay. Nhận xét Công bằng mà nói, cuốn sách đã hoàn thành khá tốt nhiệm vụ của mình. Mặc dù ta có thể tìm các lời khuyên về đau lưng, đau khớp đầy rẫy trên google, chúng không thể sánh bằng các lời khuyên do bác sĩ đưa ra + có chứng cứ khoa học trong sách. Sách cũng đã tổng hợp được đầy đủ phần lớn các chứng bệnh mà developer hay gặp phải. Nếu bạn bắt đầu có những triệu chứng về sức khỏe, hãy đọc sách để tìm cách sửa chữa, tạo thói quen tốt. Nếu sức khỏe bạn vẫn còn tốt, hãy đọc sách để tập thói quen vận động, đồng thời phòng chống những bệnh có thể gặp trong tương lai. Nói chung, nếu bạn không phải developer nhưng vẫn phải ngồi nhiều, cuốn sách vẫn sẽ rất có ích với bạn . Cùng tìm đọc và làm theo để cải thiện sức khỏe, cải thiện bản thân nhé. Bonus : Mình có làm 1 slide tóm tắt những thứ “hay ho” học được trong sách ở đây, các bạn có thể vào xem thử: . Rate this: Like this: Related
Did you know that programming is one of the toxic industries? Did you know that sitting too much will lead to countless serious and chronic diseases? Did you know that programmers are susceptible to cardiovascular disease, obesity, joint pain, etc.? Read The Healthy Programmer – a book about health specifically for developers. I read this book at the beginning of the year when I happened to see it on it-ebooks, but I was too lazy so I only had time to review it now. As the title says, this is a book for programmers, but the content does not say anything about programming but talks about an issue that every programmer is interested in: health. In the two parts of the article The dark side of the IT industry, many people asked me why I didn't mention "Programmers sit a lot of code, so their bellies are bloated, their eyes are ringing in their ears, and they are susceptible to all kinds of diseases." ”. The reason is because it is a common disease of office workers. By reviewing this book, I will introduce some diseases, symptoms, and ways to stay healthy for us developers. If you care about your health and want to stay strong so you can have fun with your friends, you should read it. General introduction The book opens with a very good sentence: "The most important reason you should read this book is that your health depends on it, the second most important reason is that your career also depends on it." It". We must have good health to be able to pursue this profession for a long time. The developer's lifestyle can easily lead to many diseases: eye pain, headache, back pain, hand joint pain, cardiovascular disease, obesity, etc. The author has met many developers with chronic back pain due to poor sitting posture, or poor posture. Hand joint pain due to using mouse/keyboard too much. These things will hinder their working process to a greater or lesser extent. For that reason, this book was born. (The illustrations below are all cut from the book). Content of chapters in the book: 1. Change yourself, improve your health: Guide us on how to create good health habits: Create a daily checklist, walk every day. Walking will reduce the risk of common diseases in the office world by 20%. 2. Goodbye to your beloved chair: Analyze the harmful effects of sitting too much. If work allows, try to get out of your seat and walk around every 30 minutes. The book also has some basic leg exercises that we can practice on the spot. 3. Agile eating: Female developers will probably love this part. The book provides instructions on how to build a reasonable diet, how to track calories intake/consumption in an industry to gain/lose weight as desired. I love meat and hate vegetables, so following the instructions is a bit difficult. 😥 4. Prevents headaches and eye pain: This is also a disease that developers often encounter. You can find the causes, symptoms as well as possible treatments in this section. 5. Prevent back pain and arm pain: These are the two diseases that most affect the productivity of our developers. Symptoms of these two diseases are described quite clearly. If you start having these symptoms, try following the exercises in the manual, they are quite effective. 6. Go out and exercise: Everyone knows that sitting and working in an air-conditioned room all day is not good for your health. This section talks about the effects of vitamin D, encouraging us developers to go out more. The content of the whole section is also normal, the last health test is good. Reviews To be fair, the book has accomplished its task quite well. Although we can find a lot of advice on back pain and joint pain on Google, they cannot compare to the advice given by doctors + scientific evidence in books. The book also fully summarizes most of the diseases that developers often encounter. If you start to have health symptoms, read books to find ways to fix them and create good habits. If your health is still good, read books to practice exercise habits and prevent future diseases. In general, if you are not a developer but still have to sit a lot, the book will still be very useful to you. Let's read and follow to improve your health and improve yourself. Bonus: I have made a slide summarizing the "cool" things learned in the book here, you can check it out: . Rate this: Like this: Related
Lần trước, chúng ta đã chém gió về Win Form – một công nghệ đã lâu đời nhưng vẫn sống tốt sống khỏe tại Việt Nam. Lần này, chúng ta sẽ luận bàn về Silverlight – một công nghệ web khá hay (nhưng đã ngủm) của Microsoft. Tuy sinh sau đẻ muộn, nhưng Silverlight lại tử ẹo trước cả người anh WinForm của nó. Tại sao vậy? hãy đọc bài viết để biết nhé. Silverlight – Anh là ai? Silverlight là một framework dùng để xây dựng web application do Microsoft phát triển. Để chạy được các ứng dụng viết bằng Silverlight, trình duyệt phải cài đặt một plug-in (Tương tự như Flash). Ở các phiên bản đầu, Silverlight hỗ trợ rất nhiều trong việc stream dữ liệu, hình ảnh, animation. Microsoft cũng chăm chút cho Silverlight khá nhiều, nên Silverlight rất mạnh mẹ trong việc stream video với nhiều định dạng, data-binding, Ajax v…v. Cả Amazon Video và Netflix đều sử dụng Silverlight cho dịch vụ video trực tuyến của họ. Thế mới thấy Silverlight từng hot như thế nào . Bản thân mình chưa từng code với Silverlight, nhưng đã từng tiếp xúc với WPF, người anh em cùng cha cùng mẹ với nó. Phần giao diện được viết bằng XAML, ta có thể dùng code-behind hoặc mô hình MVVM để bind dữ liệu. Microsoft đã khá tham vọng, chỉ viết code một lần với C# và XAML , ta có thể build thành ứng dụng Window với WPF, ứng dụng Web với Silverlight, ứng dụng Window Phone. Ngỡ tưởng tương lai Silverlight sẽ ngày càng sáng lạn, người người đổ xô vào học, nghiên cứu nó. Nhưng… đời mấy ai học được chữ ngờ . Có tài nhưng không gặp thời, đành ngậm ngùi ôm hận Flash là một web framework mạnh mẽ và từng được rất nhiều lập trình viên yêu thích. Tuy nhiên, với sự ra đời của iPhone, cụ Steve Jobs quá cố đã đập cho Flash vài đòn làm nó “thoi thóp”. Một trào lưu mới đã nảy sinh trong cộng đồng lập trình: Sử dụng HTML5, CSS3 và javascript để xây dựng web application , chứ không lệ thuộc vào plugin như Flash, Silverlight nữa . Đó là một trong những nguyên nhân chính gây ra cái chết của Silverlight. Ngậm ngùi thay, một trong những kẻ nhiệt tình nhất trong việc dìm chết Sliverlight chính là cha nó, Microsoft. Năm 2011, Microsoft từng khuyến khích các web developer sử dụng HTML5 và javascript thay cho Silverlight. Năm 2012, Microsoft chính thức khai tử đứa con cưng Silverlight của mình sau phiên bản 5.0. Tàn nhẫn hơn, cả trình duyệt Edge mới của Microsoft cũng từ chối thẳng thừng Silverlight, không hỗ trợ plug-in này. (Chuyện bên lề: Internet Explorer cũng từng có một thời hoàng kim, nhưng cũng đã bị Micorosft khai tử. Các bạn có thể đọc thêm ở đây ). Kết – Quân tử thất thời, tiểu nhân đắc chí Xét cho cùng, không phải cứ là công nghệ hay/ ngôn ngữ tốt thì sẽ được sử dụng rộng rãi, mà một phần còn phụ thuộc vào “thời thế” và duyên số nữa . Haskell, một ngôn ngữ hướng functional rất hay, được giới lập trình viên và khoa học gia tung hộ và ca tụng, nhưng chẳng mấy ai dùng để viết ra vài ứng dụng “có ích”. PHP, một ngôn ngữ được thiết kế thô sơ tạm bợ, nhận biết bao gạch đá của lập trình viên, lại được ngàn người triệu người sử dụng. Hay như javascript , thứ ngôn ngữ từng hứng chịu nhiều gạch đá không thua gì PHP, giờ lại thành đứa con cưng của HTML và giới web developer . Cuộc đời của một công nghệ rất mỏng manh. Lời khuyên mình rút ra cho các bạn là: Đam mê công nghệ là tốt, nhưng đừng quá theo đuổi một ngôn ngữ/công nghệ nào đó. Có những thứ sống rất dai như C, C++, cũng có thứ sống chưa bao lâu đã ngủm như MooTools, Silverlight. Thay vào đó, hãy rèn luyện những kĩ năng mềm – thứ sẽ theo bạn đến hết nghiệp lập trình. Thân ái, hẹn gặp lại. Rate this: Like this: Related
Last time, we talked about Win Form - an old technology but still alive and well in Vietnam. This time, we will discuss Silverlight - a pretty cool (but dead) web technology from Microsoft. Although born late, Silverlight died before its older brother WinForm. Why so? Please read the article to know. Silverlight – Who are you? Silverlight is a framework used to build web applications developed by Microsoft. To run applications written in Silverlight, the browser must install a plug-in (Similar to Flash). In early versions, Silverlight supported a lot in streaming data, images, and animation. Microsoft also cares a lot about Silverlight, so Silverlight is very strong in streaming videos with many formats, data-binding, Ajax, etc. Both Amazon Video and Netflix use Silverlight for their online video services. That's how hot Silverlight used to be. I myself have never coded with Silverlight, but have been exposed to WPF, its half-brother. The interface is written in XAML, we can use code-behind or MVVM model to bind data. Microsoft was quite ambitious, just writing code once with C# and XAML, we can build a Window application with WPF, a Web application with Silverlight, a Window Phone application. Thinking that Silverlight's future would become brighter and brighter, people flocked to learn and research it. But... in life, few people learn the word doubt. Having talent but not having the time, I have to sadly hold on to hatred. Flash is a powerful web framework and was once loved by many programmers. However, with the birth of the iPhone, the late Steve Jobs gave Flash a few blows that made it "quit". A new trend has arisen in the programming community: Using HTML5, CSS3 and javascript to build web applications, not depending on plugins like Flash or Silverlight anymore. That is one of the main causes of Silverlight's death. Sadly, one of the most enthusiastic people in drowning Sliverlight is its father, Microsoft. In 2011, Microsoft encouraged web developers to use HTML5 and javascript instead of Silverlight. In 2012, Microsoft officially discontinued its beloved child Silverlight after version 5.0. Even more cruelly, Microsoft's new Edge browser also flatly refuses Silverlight and does not support this plug-in. (Side story: Internet Explorer also had its golden age, but was also discontinued by Microsoft. You can read more here). Conclusion - The gentleman is out of time, the petty man is satisfied. After all, it is not just good technology/good language that will be widely used, but partly it also depends on the "time" and fate. Haskell, a very good functional language, is promoted and praised by programmers and scientists, but few people use it to write some "useful" applications. PHP, a language with a rudimentary design that recognizes many programmers' mistakes, is used by thousands of millions of people. Or like javascript, a language that once received as much criticism as PHP, is now the darling of HTML and web developers. The life of a technology is very fragile. The advice I give you is: Passion for technology is good, but don't pursue a certain language/technology too much. There are things that live very long like C, C++, and there are things that don't last long and die like MooTools and Silverlight. Instead, practice soft skills - things that will follow you until the end of your programming career. Sincerely, see you again. Rate this: Like this: Related
WinFom là một công nghệ của Microsoft, cho phép lập trình các ứng dụng Windows. Nhờ tính tiện ích, dễ code, giao diện design kéo thả đơn giản, … Win Form đã được sử dụng để phát triển rất nhiều ứng dụng. Vì tuổi đời đã khá cao (ra đời vào năm 2003) nên WinForm chính thức bị Microsoft khai tử vào năm 2014. Tuy nhiên, ở Việt Nam, Win Form vẫn còn sống khỏe, sống tốt . Tại sao vậy? Thử đọc bài viết để biết nhé. WinForm, người bạn của tuổi thơ – đơn giản mà hiệu quả Đa phần lập trình viên C#. NET nào cũng từng học/sử dụng Win Form. Thuở còn ngồi trên ghế nhà trường, mình được tiếp xúc với ngôn ngữ C# lần đầu vào năm thứ hai, vài ngày sau đó là WinForm. Thật sự, mình rất ấn tượng khi lần đầu tiếp xúc với WinForm: Giao diện kéo thả dễ sử dụng; Gắn các event cho các button chỉ cần double click, lại hỗ trợ quá trời event như click, hover,…; Việc viết code cũng vô cùng trực quan: từ việc lấy text từ TextBox cho tới show dữ liệu bằng MessageBox, hoặc dùng Grid để kết nối SQL. Đó là một trong các lý do mà nó được các trường/sinh viên ưa thích: WinForm rất dễ học và dễ dạy . Vì dễ code, chỉ cần kéo thả, lại có nhiều component có sẵn, WinForm rất phù hợp để làm các phần mềm quản lý, tính tiền, thống kê… . Đây cũng là loại ứng dụng mà các công ty/doanh nghiệp vừa và nhỏ cần. Ngoài ra, chỉ cần sử dụng component như TelerikUI hoặc DevExpress (Ở Việt Nam, hầu như chúng ta đều dùng crack nên các component này hoàn toàn miễn phí), WinForm có thể tạo ra các giao diện hiện đại, đẹp như mơ, long lanh hoa mĩ. Với những ưu điểm trên, WinForm vẫn sống khỏe, sống tốt ở Việt Nam. Tuy nhiên, nếu có ai hỏi mình: Em có nên học và tập trung vào WinForm không? Câu trả lời của mình sẽ là: Học cho biết thì được, chứ đừng nên tập trung công sức và thời gian vào nó . Vì sao vậy? Đọc phần sau sẽ rõ. Đừng nên đầu tư quá nhiều thời gian/công sức vào WinForm WinForm đã bị Microsoft khai tử, do đó vài năm sau rất có thể nó cũng sẽ tử ẹo như VB6. Hiện nay, số lượng các công ty tuyển dụng yêu cầu WinForm cũng không nhiều. Nếu công ty đòi hỏi kiến thức WinForm, có lẽ bạn sẽ phải b ảo trì một (hoặc nhiều) dự án WinForm cũ rích . Hẳn là không bạn nào muốn làm công việc bảo trì nhàm chán qua ngày này tháng nọ phải không? WPF là đứa đàn em “sinh sau đẻ muộn”, với mục đích kế thừa Win Form. WPF sử dụng ngôn ngữ XAML để làm giao diện nên khá linh hoạt: hỗ trợ animation, tạo user control, … tốt hơn WinForm nhiều. Microsoft cũng muốn định hướng cho giới developer sử dụng WPF để thay thế cho WinForm, có khá nhiều dự án cũng đang migrate từ WinForm sang WPF. Nhắc lại lời khuyên của mình về WinForm: Có thể thử tiếp xúc với nó, cố gắng nắm vững các khái niệm: Event, Control, Component, … vì chúng khá có ích. Tuy nhiên, đừng nghiên cứu quá sâu về nó, còn nhiều thứ đáng học hỏi hơn nhiều. Về phần WPF thì cũng nên thử , trong WPF có một số khái niệm rất hay: mô hình MVVM, data-binding, … các khái niệm này khá hữu dụng khi sau này bạn học AngularJS/các javascript framework khác. Kiến thức XAML có được khi học WFP sẽ giúp ích cho bạn khi bạn muốn tập viết app cho Windows Phone . Còn WebForm thì sao? Nhắc tới WinForm cũng phải nói đôi chút về WebForm. Từ sau khi ASP.NET MVC ra đời, WebForm có vẻ bị thất sủng. Người thì chê nó chậm, nặng nề (viewstate), kẻ thì bảo nó khó tích hợp Ajax, khó quản lý HTML. Nói vậy cũng không sai, nhưng lại khá là oan ức cho WebForm. Nó được ra đời để lập trình viên có thể viết ứng dụng Web một cách nhanh chóng đơn giản dễ dàng, chỉ cần kéo thả component như WinForm, không cần phải học đủ thứ về Web như Response, Request, Query String, Params, …. Nhiều người cho rằng WebForm cũng sẽ chết, và ASP.NET MVC sẽ hoàn toàn thay thế nó. Theo ý kiến cá nhân mình, WebForm vẫn sẽ sống khỏe, sống tốt , vì có vô số ứng dụng được xây dựng dựa trên nó, cũng như có vô số lập trình viên có kinh nghiệm WebForm. Một công nghệ sẽ chưa chết chừng nào nó vẫn còn hữu dụng . Tuy nhiên, nếu phải chọn giữa WebForm và ASP.NET MVC thì mình khuyên các bạn nên học MVC nhé. Hiện tại các công ty tuyển nhân sự C#.NET đều đòi hỏi kiến thức về MVC. Biết đâu 3-5 năm nữa sẽ có thứ khác hay hơn “đè chết” ASP.NET MVC cũng nên :P. À mà hiện giờ cũng có rồi ấy chứ. Xây dựng ứng dụng dạng SPA (Single-page Application), sử dụng javascript cho front-end và REST API cho back-end cũng là một giải pháp được nhiều developer/công ty lựa chọn. Một số bài so sánh khá hay về WebForm và ASP.NET MVC: Trên đây là chỉ suy nghĩ của mình, còn các bạn thì sao? Hãy chia sẻ suy nghĩ/kinh nghiệm của bản thân về WinForm/WebForm trong phần comment nhé. Rate this: Like this: Related
WinFom is a Microsoft technology that allows programming Windows applications. Thanks to its utility, ease of coding, simple drag-and-drop design interface,... Win Form has been used to develop many applications. Because it is quite old (born in 2003), WinForm was officially discontinued by Microsoft in 2014. However, in Vietnam, Win Form is still alive and well. Why so? Try reading the article to find out. WinForm, a childhood friend - simple but effective. Most C# programmers. NET developers have learned/used Win Form. When I was still in school, I was first exposed to C# language in my second year, followed by WinForm a few days later. Actually, I was very impressed when I first came into contact with WinForm: Easy-to-use drag-and-drop interface; Attaching events to buttons only requires a double click, supporting a wide variety of events such as click, hover,...; Writing code is also extremely intuitive: from retrieving text from TextBox to displaying data with MessageBox, or using Grid to connect SQL. That's one of the reasons it's so popular with schools/students: WinForm is easy to learn and easy to teach. Because it is easy to code, just drag and drop, and has many available components, WinForm is very suitable for making management software, billing, statistics, etc. This is also the type of application that small and medium-sized companies/enterprises need. In addition, just by using a component like TelerikUI or DevExpress (In Vietnam, almost all of us use crack so these components are completely free), WinForm can create modern, dreamlike, long-lasting interfaces. flowery linen. With the above advantages, WinForm is still alive and well in Vietnam. However, if someone asks me: Should I learn and focus on WinForm? My answer would be: It's okay to learn, but don't focus your effort and time on it. Why? Read the following and it will be clear. Don't invest too much time/effort into WinForm. WinForm has been discontinued by Microsoft, so in a few years it will probably be as dead as VB6. Currently, the number of recruitment companies requiring WinForm is not many. If the company requires WinForm knowledge, you will probably have to maintain one (or more) old WinForm projects. Surely no one wants to do boring maintenance work day in and day out, right? WPF is the "late-born" junior, with the aim of inheriting Win Form. WPF uses XAML language for the interface so it is quite flexible: supports animation, creating user controls, ... much better than WinForm. Microsoft also wants to orient developers to use WPF to replace WinForm. There are many projects that are also migrating from WinForm to WPF. Reiterating my advice about WinForm: You can try to get in touch with it, try to master the concepts: Event, Control, Component, ... because they are quite useful. However, don't delve too deeply into it, there are much more things worth learning. As for WPF, you should also try it, in WPF there are some very good concepts: MVVM model, data-binding, ... these concepts are quite useful when you later learn AngularJS/other javascript frameworks. The XAML knowledge gained when studying WFP will help you when you want to practice writing apps for Windows Phone. What about WebForms? When talking about WinForm, we also have to say a little about WebForm. Since the birth of ASP.NET MVC, WebForm seems to have fallen out of favor. Some people criticize it for being slow and heavy (viewstate), others say it's difficult to integrate Ajax and difficult to manage HTML. It's not wrong to say that, but it's quite unfair for WebForm. It was created so that programmers can write Web applications quickly and easily, just drag and drop components like WinForm, without having to learn everything about the Web such as Response, Request, Query String, Params, ... . Many people believe that WebForm will also die, and that ASP.NET MVC will completely replace it. In my personal opinion, WebForm will still be alive and well, because there are countless applications built on it, as well as countless programmers with WebForm experience. A technology is not dead as long as it is still useful. However, if you have to choose between WebForm and ASP.NET MVC, I recommend you learn MVC. Currently, companies recruiting C#.NET personnel require knowledge of MVC. Who knows, maybe in the next 3-5 years there will be something better to "crush" ASP.NET MVC :P. Well, it's there now. Building SPA (Single-page Application) applications, using javascript for the front-end and REST API for the back-end is also a solution chosen by many developers/companies. Some pretty good comparisons about WebForm and ASP.NET MVC: The above are just my thoughts, what about you? Please share your thoughts/experiences about WinForm/WebForm in the comment section. Rate this: Like this: Related
Đăng nhập là một chức năng đơn giản nhất mà hơn 90% các ứng dụng web cần phải có. Tuy nhiên, đôi khi ta lại không được hướng dẫn cách thực hiện chức năng “Đăng nhập” một cách đúng đắn, bài bản, dẫn đến những lỗi dở khóc dở cười, hoặc những lỗ hổng bảo mật khủng khiếp . Đến cả Lotte Cinema, một trang web được khá nhiều người dùng còn mắc lỗi sơ đẳng này. Đăng nhập hả? Chỉ cần một bảng User, hai cột Username và Password là xong Kể cũng buồn cười. Ngày xưa khi đi học, mình được hướng dẫn cách làm chức năng đăng nhập như thế này. Bước 1 và 3 không có gì đáng bàn, nhưng bước 2 mới là điều đáng nói. Đa phần tụi mình đều lưu trực tiếp tên tài khoản và mật khẩu vào database, sau đó đem ra so sánh. Đây là cách củ chuối nhất và ngu nhất . Database là một trong những nơi hay bị tấn công, dễ làm thất thoát dữ liệu. Trong quá khứ, lỗi SQL Injection từng làm thất thoát hàng triệu thông tin khách hàng và thông tin credit card. Chưa tính đến chuyện hacker bên ngoài, nhiều khi thằng Database Admin hứng lên, nó có thể mò được mật khẩu của khách hàng, lớn chuyện chưa? Cách lưu trữ mật khẩu đúng phải là làm sao để chỉ người dùng mới biết được mật khẩu của họ . Làm sao ư? Hãy xem phần dưới nhé. Vậy mã hóa là được chứ gì, lắm trò!! Ừ, cách giải quyết cũng khá đơn giản. Bạn có thể dùng hàm hash để mã hóa mật khẩu như sau: Cách này đảm bảo chỉ người dùng biết mật khẩu của họ , dù là lập trình viên hay database admin, có nắm được cả code lẫn database cũng không tài nào mò ra mật khẩu. Tuy nhiên, cách này có một vấn đề: Hai mật khẩu giống nhau khi hash sẽ có kết quả giống nhau. Hacker có thể mò ra mật khẩu bằng cách dùng dictionary attack – hash toàn bộ các mật khẩu có thể trong từ điển, rồi so sánh kết quả với mật khẩu đã hash dưới database. Thế nhưng, vỏ quýt dày có móng tay nhọn. Đây là cách lưu trữ mật khẩu đúng mà hiện nay các framework đều áp dụng: Với cách này, khi người dùng quên mật khẩu, hệ thống không tài nào mò ra mật khẩu để gửi cho họ. Cách giải quyết duy nhất là reset mật khẩu , random ra một mật khẩu mới rồi gửi cho người dùng. Ối giời phức tạp thế, cùng lắm thì lộ password trên trang của mình thôi mà Nói nhỏ một bí mật (mà chắc ai cũng biết) cho các bạn nghe nè: Hầu như người dùng chỉ sử dụng 1 username/mật khẩu duy nhất cho toàn bộ các tài khoản trên mạng. Nếu hacker tìm được mật khẩu từ trang của bạn, chúng sẽ thử với các account facebook, gmail, tài khoản ngân hàng, … của người đó. Mất 1 account là xem như mất sạch sành sanh . Kinh khủng chưa!. Không tin à, bạn thử ngẩm lại xem, bạn có dùng chung 1 email/mật khẩu cho Gmail, Facebook, Evernote, … và nhiều trang khác không? Nói đi nói lại một hồi, cũng đến cái “Lỗ hổng bảo mật khủng khiếp của Lotte Cinema” Một ngày đẹp trời nọ, mình định dẫn gấu đi xem phim, ăn uống rồi *beep*. Định đặt vé online mà quên mất mật khẩu , mình mò mẫm phần đăng nhập, tìm hoài mới thấy mục “Quên mật khẩu”. Nhập địa chỉ mail và chứng minh nhân dân, mình mau chóng nhận được một email gửi từ lottecinema, trong đó có cả username và mật khẩu của mình (Mail gì đã cụt lủn lại còn sai chính tả -_-) . Thật là tiện quá đi mất, khỏi phải reset mật khẩu. Khoan, có cái gì sai sai ở đây!! Vậy là bọn lotte lưu thẳng mật khẩu của mình thẳng dưới database à. Lỡ database bị thất thoát dữ liệu là toàn bộ các tài khoản khác của mình (Và các thành viên lotte cinema khác) cũng đi tong theo. Thật là đáng sợ!! Lỗi này mình phát hiện năm ngoái, đến cách đây mấy ngày vẫn còn y nguyên. Thế mới biết bộ phận IT của lottecinema giỏi giang thế nào. Các bạn có tài khoản lotte cinema thì nhớ cẩn thận nghe. Tác giả không phải dân chuyên về bảo mật, hệ thống mạng nên có gì sai sót mong các bỏ qua và góp ý hộ nhé. Rate this: Like this: Related
Login is the simplest function that more than 90% of web applications need to have. However, sometimes we are not instructed on how to perform the "Login" function properly and methodically, leading to funny errors, or terrible security holes. Even Lotte Cinema, a website used by many users, still makes this elementary mistake. Sign in? Just need a User table, two columns Username and Password and you're done. It's funny. When I was in school, I was taught how to do the login function like this. Steps 1 and 3 are nothing worth discussing, but step 2 is worth mentioning. Most of us save account names and passwords directly into the database, then compare them. This is the stupidest and stupidest way. Database is one of the places that is often attacked, easily causing data loss. In the past, SQL Injection errors have caused the loss of millions of customer information and credit card information. Not to mention outside hackers, sometimes when the Database Admin gets excited, he can find out the customer's password, is it a big deal? The correct way to store passwords is so that only users know their passwords. How? See below. So encryption is okay, many tricks!! Yes, the solution is quite simple. You can use the hash function to encrypt the password as follows: This method ensures that only users know their password, whether they are programmers or database administrators, even if they know both the code and the database, there is no way to figure out the password. password. However, this method has a problem: Two identical passwords will have the same result when hashed. Hackers can find out passwords by using dictionary attack - hashing all possible passwords in the dictionary, then comparing the results with the hashed password in the database. However, thick tangerine peels have sharp nails. This is the correct way to store passwords that all frameworks currently apply: With this method, when a user forgets their password, the system cannot find the password to send to them. The only solution is to reset the password, randomly generate a new password and send it to the user. Oh my, it's so complicated, at the very least, the password on my page will be revealed. Let me tell you a little secret (that everyone probably knows): Most users only use one username/password for each application. all online accounts. If hackers find the password from your site, they will try it with that person's Facebook, gmail, bank accounts, etc. accounts. Losing an account is considered losing everything. Isn't it terrible!. Don't believe it, think about it, do you use the same email/password for Gmail, Facebook, Evernote, ... and many other sites? Talking over and over for a while, I finally came to "Lotte Cinema's terrible security hole". One fine day, I was going to take my boyfriend to see a movie, eat and drink, then *beep*. I was about to book tickets online but forgot my password. I fumbled through the login section and searched until I found the "Forgot password" section. Entering my email address and ID card, I quickly received an email from lottecinema, including my username and password (The email was short and misspelled -_-). It's so convenient, I don't have to reset my password. Wait, something is wrong here!! So lotteries store their passwords directly in the database. If data is lost in the database, all of your other accounts (and other Lotte Cinema members) will go with it. How scary!! I discovered this error last year, and it still persists a few days ago. That's how good Lottecinema's IT department is. If you have a Lotte Cinema account, remember to listen carefully. The author is not an expert in security or network systems, so if there are any mistakes, please ignore them and give me your feedback. Rate this: Like this: Related
Mánh khóe thứ nhất: Không bao giờ truyền dạy các “mánh khóe” này cho người khác. Hết bài. Đùa đấy, các bạn đừng gạch đá mình tội nghiệp, mình buồn. Chẳng là dạo này mình chán stackoverflow , chuyển qua quora nghịch ngợm đôi chút. Đây cũng là một trang web hỏi đáp tương tự như stackoverflow, nhưng phạm vi rộng hơn rất nhiều, bao gồm toàn bộ mọi lĩnh vựa đời sống. Một điểm đặc biệt nữa là nó cho phép hỏi những câu chung chung hoặc “nhảm nhí”, do đó có rất nhiều câu hỏi – trả lời thú vị và “bá đạo” như: Mac Zuckerberg có giỏi PHP hay không? Tại sao người đời lại ghét sản phẩm của Apple? Làm sao nghe lén điện thoại bạn gái?… đủ thứ trên trời dưới đất =))). Mình khuyên các bạn nên bỏ đi ít thời gian cho facebook, rảnh rỗi thì lên đây xem các câu hỏi về Computer Science/Computer Programming, sẽ học được nhiều điều thú vị lắm, giải trí cũng tốt nữa. Bài viết này là tổng hợp và chọn lọc những ý tưởng, câu trả lời hay của câu hỏi: What are the best-kept secrets of great programmers? – Những mánh khóe “không bao giờ tiết lộ” của các lập trình viên vĩ đại. Mánh khóe code và test Trong đa phần các trường hợp, sử dụng inheritance (kế thừa) là một design TỆ , làm cho code khó test và khó bảo trì. Hãy chuyển qua composition (sở hữu) và kết hợp với interface. (Có thể đọc thêm về prefer composition over inheritance ). Đừng sử dụng interface cho tới khi bạn hoàn toàn rõ ràng về domain của chương trình. (Mỗi khi cần thêm 1 function, bạn sẽ phải thêm nó vào interface và implement của interface đó, gấp đôi công sức). Bảo mật/mã hóa rất khó . Đừng tự làm MÀ hãy tái sử dụng (sử dụng thư viện , thuật toán có sẵn v…v), trừ khi bạn biết rõ mình đang làm gì. Có vô vàn nguyên nhân làm crash một chương trình : deploy sai cách, input bị lỗi, người dùng dùng sai cách, quá tải … Chuẩn bị sẵn sàng cho những điều đó: Ghi log những exception gặp phải, deploy thử lên server test, đặt giới hạn cho bộ nhớ… Kết nối mạng (HTTP, socket) rất dễ xảy ra vấn đề. Luôn nhớ đặt timeout cho các kết nối này, sử dụng thư viện để wrap chúng, retry nếu kết nối có vấn đề. Mỗi dòng code thêm vào sẽ làm chương trình phức tạp thêm một chút, tăng khả năng có bug. Bỏ bớt code là cách hay nhất để giảm bớt số lượng bug =))). Validate những thứ người dùng nhập vào, vừa đảm bảo tính bảo mật, lại hạn chế được bug. Tái sử dụng code chưa chắc đã khiến code của bạn dễ bảo trì hơn. Tái sử dụng code giữa 2 domain khác nhau có thể làm chúng “dính chặt” với nhau hơn. Chỉ test những thứ cần test, test ít thì dễ sót bug, test nhiều thì sẽ mất thời gian và tốn công update test case mỗi khi đổi requirement. Mỗi khi commit code, hãy giữ số lượng code nhỏ, code chạy được, viết message rõ ràng bao gồm thứ bạn đã làm và lý do bạn làm thứ đó . Với kiến trúc tốt , bạn vẫn có thể viết code lô . Tuy nhiên, với kiến trúc tốt, bạn có thể dễ dàng nâng cấp, thay thế phần code đểu đó. Tập trung xây dựng kiến trúc tốt, ít móc nối trước, về sau sẽ dễ thở hơn. Code để lâu cũng rất dễ hư hỏng, do đó cần được refactor thường xuyên. Tuy nhiên cần tránh refactor code quá độ. Mánh khóe làm việc Rất khó để ước đoán thời gian cần làm để hoàn thành một module/dự án, đó là lý do người ta dùng Scrum . Viết code để cho chính mình và người khác đọc. Thêm comment để giải thích “Vì sao”, thêm comment ở những nơi mà bạn nghĩ 1 năm sau bạn đọc code sẽ không hiểu gì . Hiểu rõ thư viện/framework mà mình sử dụng, đừng có gắng viết lại từ đầu những thứ người khác đã tốn công viết rồi. Cài đặt để việc build một project diễn ra nhanh chóng tiện lợi nhất có thể. Hãy chắc chắn bạn có thể build bằng command line, sẽ rất có ích (Có thể kích hoạt build từ xa, hoặc đưa project lên CI chẳng hạn). Hiểu rõ những tool bạn sử dụng (IDE, source control, build tool, Photoshop). Cố gắng tìm hiểu và làm quen với việc dùng các hotkey , hạn chế dùng chuột. Bạn sẽ làm việc nhanh hơn và “pro” hơn. Ngồi lâu rất có hại. Hãy tập một số thói quen để đảm bảo sức khỏe khi làm việc : Không ngồi nhiều, lâu lâu cho mắt nghỉ ngơi, sắp xếp bàn làm việc, bàn phím, chuột sao cho làm việc thoải mái… Đừng áp dụng lung tung các framework/process/pattern vào dự án để “thể hiện”. Không phải lúc nào Test-Driven Development cũng tốt, không phải lúc nào cũng nên áp dụng DI/IoC . Mánh khóe phát triển bản thân Vọc code của các ứng dụng, framework Open Source là cách nhanh nhất để học hỏi và “lên trình”. Code review là một trong những cách hay nhất giúp bạn tiến bộ , có người đánh giá code của bạn, giúp bạn phân biệt code giỏi và dở, tránh những lỗi lầm cơ bản (Ở Việt Nam mình thấy việc code review này làm khá qua loa, khá chán). Học một ngôn ngữ mới sẽ giúp bạn hiểu những khái niệm mới , có cái nhìn mới, cách suy nghĩ sẽ linh hoạt hơn. (Thử chuyển từ C# /Java sang scripting language như python/ javascript bạn sẽ thấy một chân trời mới). Học một ngôn ngữ hướng đối tượng là chuyện dễ. Biết cách t hiết kế hệ thống theo hướng đối tượng là chuyện khó . Hãy tìm hiểu các nguyên lý SOLID và một số Design Pattern, chúng sẽ nâng cao hiểu biết của bạn về thiết kế hướng đối tượng. Luôn giữ tinh thần học hỏi, nhưng đừng chạy theo công nghệ mới . Đừng chọn một công nghệ cho một dự án chỉ vì nó hot/mới/hay. Rate this: Like this: Related
Tip number one: Never teach these "tricks" to others. End of lession. Just kidding, don't hate me, I'm sorry, I'm sad. It's just that lately I've been bored with stackoverflow and switched to quora to play around a bit. This is also a question and answer website similar to stackoverflow, but the scope is much broader, covering all areas of life. Another special feature is that it allows asking general or "bullshit" questions, so there are many interesting and "cool" questions and answers such as: Is Mac Zuckerberg good at PHP or not? Why do people hate Apple products? How to eavesdrop on your girlfriend's phone?... everything from heaven and earth =))). I advise you to spend a little time on Facebook. If you have free time, come here to look at questions about Computer Science/Computer Programming. You will learn many interesting things and have good entertainment. This article is a synthesis and selection of good ideas and answers to the question: What are the best-kept secrets of great programmers? – The “never revealed” tricks of great programmers. Coding and testing tricks In most cases, using inheritance is a BAD design, making the code difficult to test and difficult to maintain. Let's switch to composition and combine it with the interface. (You can read more about prefer composition over inheritance). Don't use an interface until you are completely clear about the program's domain. (Every time you need to add a function, you will have to add it to the interface and implementation of that interface, doubling the effort). Security/encryption is difficult. Don't do it yourself, reuse it (use existing libraries, algorithms, etc.), unless you know what you're doing. There are countless reasons why a program crashes: deploying incorrectly, input errors, users using it incorrectly, overload... Prepare for those things: Log any exceptions encountered, try deploying to a test server, set memory limit… Network connection (HTTP, socket) can easily cause problems. Always remember to set a timeout for these connections, use a library to wrap them, and retry if the connection has problems. Each additional line of code will make the program a little more complicated, increasing the possibility of bugs. Removing code is the best way to reduce the number of bugs =))). Validate what users enter, both ensuring security and limiting bugs. Reusing code does not necessarily make your code easier to maintain. Reusing code between two different domains can make them "stickier" together. Only test what needs to be tested, if you test too little it's easy to miss bugs, if you test too much it will take time and effort to update test cases every time the requirements change. Every time you commit code, keep the amount of code small, the code works, and write a clear message that includes what you did and why you did it. With good architecture, you can still write batch code. However, with good architecture, you can easily upgrade and replace that piece of code. Focus on building good architecture, less connections first, it will be easier later. Code left for a long time is also very susceptible to damage, so it needs to be refactored regularly. However, you need to avoid excessive code refactoring. The trick works It is difficult to estimate the time it will take to complete a module/project, which is why people use Scrum. Write code for yourself and others to read. Add comments to explain "Why", add comments in places where you think you won't understand anything after reading the code a year later. Understand the library/framework you use, don't try to rewrite from scratch what others have already written. Settings to make building a project as quick and convenient as possible. Make sure you can build using the command line, it will be very useful (You can trigger remote build, or upload the project to CI for example). Understand the tools you use (IDE, source control, build tools, Photoshop). Try to learn and get used to using hotkeys, limit the use of the mouse. You will work faster and more "pro". Sitting for a long time is very harmful. Practice some habits to ensure your health when working: Don't sit too much, rest your eyes occasionally, arrange your desk, keyboard, mouse so that you can work comfortably... Don't haphazardly apply frameworks/processes/patterns to the project to "show off". Test-Driven Development is not always good, DI/IoC should not always be applied. Self-development tips Playing with the code of Open Source applications and frameworks is the fastest way to learn and "program". Code review is one of the best ways to help you improve, having someone evaluate your code, helping you distinguish between good and bad code, avoiding basic mistakes (In Vietnam, I found this code review done quite well. speaker, quite boring). Learning a new language will help you understand new concepts, have new perspectives, and have a more flexible way of thinking. (Try switching from C# /Java to scripting language like python/javascript and you will see a new horizon). Learning an object-oriented language is easy. Knowing how to design an object-oriented system is difficult. Learn the SOLID principles and some Design Patterns, which will enhance your understanding of object-oriented design. Always keep the spirit of learning, but don't run after new technology. Don't choose a technology for a project just because it's hot/new/cool. Rate this: Like this: Related
Nối tiếp phần 1 , mình sẽ giới thiệu một số sách hay trong giai đoạn tháng 7 tới tháng 12 năm nay. Tháng 7 – Apprenticeship Patterns – Guidance for the Aspiring Software Craftsman Bạn đã đi làm được một thời gian, cảm thấy chán code ? Bạn mới ra trường, cảm thấy còn lơ ngơ chưa biết gì ? Bạn nhận thấy con đường trước mắt vẫn còn mù mờ? Đừng lo, hãy đọc cuốn sách này. Sách nâng ngành lập trình lên một tầm cao mới với khái niệm software craftmanship , người code giỏi cũng như một bậc thầy trong các ngành nghề khác. Sách có vô vàn những mẹo vặt về cách học tập, cách trau đồi kĩ năng , cách giữ lửa đam mê . Bỏ mấy ngày để đọc nó sẽ có ích về lâu dài cho con đường sự nghiệp của bạn nhé. Có một điều lạ là tuy sách không nổi tiếng lắm (ít review), nhưng hầu như mấy lão senior nước ngoài mình theo dõi đều khuyên đọc cuốn này. Chắc tại vì sách hay, lại được phát hành free, có thể đọc online ở đây . Một cuốn sách khá hay của tháng này là Presentation Zen – hướng dẫn cách làm những slide tối giản, cách thực hiện một buổi thuyết trình cuốn hút. Mình đã review cuốn này ở 1 bài viết trước của blog . Tháng 8 – Suối nguồn Đây là cuốn tiểu thuyết duy nhất trong danh sách này. Thấy thằng bạn cùng công ty review nên mình tò mò đọc thử. Sách dày cui, hình như hơn 1200 trang, bản ebook chia ra làm 4 phần, mình ngấu nghiến phải 4, 5 ngày mới xong. Suối nguồn là câu chuyện về chàng kiến trúc sư Hovard Roast, một người theo đuổi chân lý đến tận cùng , không bao giờ thỏa hiệp. Cả câu chuyện là một cuộc đấu tranh giữa chủ nghĩa cá nhân và chủ nghĩa tập thể, giữa cá thể vĩ đại và tập thể tầm thường. Mình đọc mà lâu lâu cũng thấy chính mình trong đó, chắc tại lập trình và kiến trúc cũng có vài điểm tương tự. Nếu r rảnh, hãy thử cuốn sách này. Nó sẽ ngốn mất của bạn kha khá thời gian, nhưng khoảng thời gian đó không hề uổng phí đâu. Lâu lâu đọc danh tác thay vì đọc tin lá cải hay chơi Dota sẽ làm đầu óc ta mở mang nhiều lắm. Tháng 9 – The Lean Startup Cuốn sách thứ 2 về startup trong danh sách. Tác giả cũng từng là lập trình viên, từng làm coder chính cho 1 technical startup nên cách viết khá gần gũi. Tuy là sách về startup nhưng mình lại rút ra được nhiều bài học về phát triển phần mềm từ cuốn này. Sai lầm thường thấy của startup và lập trình viên là: Làm ra những sản phẩm/phần mềm tưởng rất hay nhưng không ai dùng . Đã bao giờ bạn lập trình một chức năng vì “nó hay”, nhưng người dùng không bao giờ sử dụng chưa? Đó là một sự lãng phí thời gian, tiền bạc, tài nguyên. Với “Lean Startup”, ta chú trọng vào việc thử-sai (fail early fall fast fail cheaply), không võ đoán . Thay vì dự đoán rằng người dùng sẽ thích sản phẩm, chức năng nào đó, hãy thử tạo ra nó; rồi kiểm tra phản ứng của người dùng, sau đó quyết định nên dừng lại hay tiếp tục. Một cuốn sách khác khá hay của tháng là Breakthrough rapid reading, dạy các bạn cách tăng tốc độ đọc sách , cách tiếp thu và nhớ kiến thức từ sách. Mình áp dụng và thấy tốc độ đọc cũng tăng đáng kể, bộ 1Q84 khá dài của Haruki chỉ đọc mất 3-4 ngày là xong. Tháng 10 – Kẻ thành công phải biết lắng nghe Mình mua cuốn này để đọc khi lên máy bay sang UK du học . Sách hướng dẫn ta cách lắng nghe, thấu hiểu người khác. Giữa cái xã hội toàn những thanh niên chém gió, nói giỏi hơn làm, tìm một người biết cách lắng nghe thực sự rất khó . Đọc sách, bạn sẽ hiểu được cách não bộ hoạt động, cách làm nguôi giận ngừng giận dữ, cách đồng cảm với người khác, cách dụ dỗ người khác thổ lộ với mình… Đối với mình, đây là một cuốn sách khá hay về kĩ năng sống, chỉ đứng sau Đắc Nhân Tâm. Tháng 11 – The Inmates are Running the Asylum – Why High-Tech Products Drive Us Crazy and How to Restore the Sanity Mình đã từng nhắc đến cuốn này ở bài: Lập trình viên trình cao nên đọc sách gì? . Tác giả đã nêu lên thực trạng của các phần mềm/phần cứng hiện nay: Chúng quá phức tạp , quá khó sử dụng , gây khó khăn cho người dùng. Ông đưa ra một số ví dụ về các thiết bị được thiết kế cẩu thả: máy ảnh số, máy ATM, điều khiển từ xa, … Sách đề cao tầm quan trọng của trải nghiệm người dùng (UX – User Experience), UX nên được thiết kế trước tiên trước khi thiết kế phần mềm. Đọc xong cuốn này, bạn sẽ ngộ ra được rất nhiều “chân lý”. Tháng 12 – The Psychology of Computer Programming Do cơ duyên run rủi cho mình bắt gặp cuốn này trong kệ sách của thư viện trường. Sách ra đời năm 1971, tính ra chắc tuổi đời cũng già hơn phần đông các bạn ở đây. Bìa đã hơi long tí chút, nhưng do bảo quản kĩ nên bên trong sách còn khá mới. Tại sao một cuốn sách tuổi đời hơn 40 năm vẫn nằm trong danh mục sách-khuyên-đọc cho quản lý và lập trình viên? Bởi vì “trong cái thế giới mà công nghệ thay đổi từng ngày, vẫn có những thứ kiến thức không bao giờ lạc hậu”. Đây là cuốn sách đầu tiên viết về nhân tố con người trong ngành lập trình. Đọc sách, ta sẽ có một cái nhìn mới phương pháp làm việc nhóm, suy nghĩ của lập trình viên, cách khen thưởng và huấn luyện nhưng viên. Tuy đã qua 30 năm, công nghệ thay đổi, ngôn ngữ lập trình thay đổi nhưng những thứ này vẫn còn y nguyên. Có đôi chỗ hơi khó chịu khi đọc là sách có dùng một số khái niệm + ngôn ngữ lập trình khá cũ nên nhiều đoạn về technical mình không hiểu mấy. Bonus: Danh sách các sách mình đã đọc từ tháng 7 – tháng 12, sách in đậm là sách hay nhất tháng, in nghiêng là sách hay – đáng đọc nhé. Trại súc vật Apprenticeship Patterns – Guidance for the Aspiring Software Craftsman On Writing Well – The Classic Guide to Writing Nonfiction Kinh tế học và sex Presentation Zen Điểm bùng phát – The tipping point Thriving on Less Mật ngọt chết mèo What The Dog Saw: And Other Adventures David and Goliath Vui chơi để kiếm sống Slide:ology: The Art and Science of Creating Great Presentation Nếu gặp người ấy cho tôi gửi lời chào Sư im lặng của bầy cừu Suối nguồn Microsoft dotNET – Architecting Applications for the Enterprise Microsoft dotNET – Architecting Applications for the Enterprise, 2nd Edition The $100 Startup Fooled by randomness NoSQL Distilled Âm mưu ngày tận thế Giết con chim nhại (dở) The Lean Startup 1Q84 Breakthrough rapid reading (Khá hay) 20 tuổi trở thành người biết nói, giỏi làm Trên đường băng Yêu người ngóng núi After Dark – Haruki Murakami Đi đâu cũng nhớ Sài Gòn và … Em Economics for Dummies Kẻ thành công phải biết lắng nghe The Naked Presenter How to succeed in written work and study Doing Essays and Assignments: Essential Tips for Students Data Mining for Dummies MATLAB – A practical introduction to programming and problem solving Just write – An easy-to-use guide at writing in university Writing Essays at University A Guide For Students, By Students Inside track to successful academic writing Data Mining, Concepts and Techniques, Third Edition (partly) The Black Swan (về sau dài dòng nhảm) Anti Patterns: Refactoring Software, Architectures, and Project in Crisis Purple Cow: Transform Your Business by Being Remarkable. It’s Not How Good You Are, It’s How Good You Want to Be The Inmates are Running the Asylum – Why High-Tech Products Drive Us Crazy and How to Restore the Sanity Manga! Manga! The World of Japanese Comics Tháng 12 The Psychology of Computer Programming Search me – The surprising success of Google Thỏ bảy màu – Timeline của tui có gì Atlas Shrugged Chuyện con ốc sên muốn biết vì sao nó chậm chạp The Book Thief Dreaming in Code Remote – Office not required Năm Cam – Canh bạc cuối cùng Rate this: Like this: Related
Following part 1, I will introduce some good books from July to December this year. July – Apprenticeship Patterns – Guidance for the Aspiring Software Craftsman Have you been working for a while and feel bored of coding? You just graduated and feel like you still don't know anything? Do you find that the road ahead is still unclear? Don't worry, read this book. The book takes programming to a new level with the concept of software craftmanship, a good coder as well as a master in other professions. The book has countless tips on how to study, how to hone your skills, and how to keep your passion alive. Taking a few days to read it will be beneficial in the long run for your career path. One strange thing is that although the book is not very famous (few reviews), almost every foreign senior I follow recommends reading this book. Probably because the book is good, released for free, and can be read online here. A pretty good book this month is Presentation Zen - instructions on how to make minimalist slides, how to make an attractive presentation. I reviewed this book in a previous blog post. August – The Fountainhead This is the only novel on this list. Seeing that my friend from the same company reviewed it, I was curious to read it. The book is very thick, seems to be more than 1200 pages, the ebook version is divided into 4 parts, it took me 4 or 5 days to finish it. The Fountainhead is the story of architect Hovard Roast, a man who pursues the truth to the end, never compromising. The whole story is a struggle between individualism and collectivism, between the great individual and the mediocre collective. I read it but sometimes I see myself in it, probably because programming and architecture have some similarities. If you have free time, try this book. It will take you quite a bit of time, but that time is not wasted. Occasionally reading famous works instead of reading tabloid news or playing Dota will broaden your mind a lot. September – The Lean Startup The second book about startups on the list. The author is also a former programmer and worked as the main coder for a technical startup, so his writing style is quite familiar. Although it is a book about startups, I learned many lessons about software development from this book. A common mistake of startups and programmers is: Making products/software that seem great but no one uses it. Have you ever programmed a function because "it's cool", but users never use it? It's a waste of time, money, resources. With "Lean Startup", we focus on trial and error (fail early fall fast fail cheaply), not guesswork. Instead of predicting that users will like a certain product or function, try creating it; then check the user's reaction, then decide whether to stop or continue. Another good book of the month is Breakthrough rapid reading, which teaches you how to increase your reading speed and how to absorb and remember knowledge from books. I applied it and found that my reading speed also increased significantly. Haruki's quite long 1Q84 series only took 3-4 days to read. October - Successful people must know how to listen. I bought this book to read when I boarded the plane to study abroad in the UK. Books teach us how to listen and understand others. In a society full of young people who talk better than they do, finding someone who knows how to listen is really difficult. Reading the book, you will understand how the brain works, how to calm down and stop being angry, how to sympathize with others, how to seduce others to confide in you... For me, this is a pretty good book about Life skills, second only to Dac Nhan Tam. November – The Inmates are Running the Asylum – Why High-Tech Products Drive Us Crazy and How to Restore the Sanity I have mentioned this book in the article: What books should advanced programmers read? . The author has raised the current situation of software/hardware: They are too complicated, too difficult to use, causing difficulties for users. He gave some examples of sloppily designed devices: digital cameras, ATM machines, remote controls, etc. The book emphasizes the importance of user experience (UX - User Experience), UX should designed first before designing the software. After reading this book, you will realize many "truths". December – The Psychology of Computer Programming By chance, I came across this book in the bookshelf of the school library. The book was released in 1971, so it's probably older than most of you here. The cover is a bit worn, but due to careful preservation, the inside of the book is still quite new. Why is a book more than 40 years old still on the recommended reading list for managers and programmers? Because "in a world where technology changes every day, there is still knowledge that is never outdated". This is the first book written about human factors in programming. Reading the book, we will have a new look at teamwork methods, programmers' thinking, and how to reward and train employees. Even though 30 years have passed, technology has changed, programming languages ​​have changed, but these things are still the same. There are a few things that are a bit uncomfortable when reading because the book uses some quite old concepts + programming languages, so I don't understand many technical passages. Bonus: List of books I read from July - December, books in bold are the best books of the month, books in italics are good books - worth reading. Animal farm Apprenticeship Patterns – Guidance for the Aspiring Software Craftsman On Writing Well – The Classic Guide to Writing Nonfiction Economics and sex Presentation Zen The tipping point – The tipping point Thriving on Less Sweet honey kills cats What The Dog Saw: And Other Adventures David and Goliath Have fun for a living Slide:ology: The Art and Science of Creating Great Presentation If I meet that person, let me say hello The silence of the sheep Source stream Microsoft dotNET – Architecting Applications for the Enterprise Microsoft dotNET – Architecting Applications for the Enterprise, 2nd Edition The $100 Startup Fooled by randomness NoSQL Distilled Doomsday plot To Kill a Mockingbird (bad) The Lean Startup 1Q84 Breakthrough rapid reading (Pretty good) At age 20, you become someone who knows how to talk and is good at doing things On the runway Love people who look forward to the mountains After Dark – Haruki Murakami Wherever I go, I miss Saigon and... Em Economics for Dummies Successful people must know how to listen The Naked Presenter How to succeed in written work and study Doing Essays and Assignments: Essential Tips for Students Data Mining for Dummies MATLAB – A practical introduction to programming and problem solving Just write – An easy-to-use guide at writing in college Writing Essays at University A Guide For Students, By Students Inside track to successful academic writing Data Mining, Concepts and Techniques, Third Edition (partly) The Black Swan (long story later) Anti Patterns: Refactoring Software, Architectures, and Projects in Crisis Purple Cow: Transform Your Business by Being Remarkable. It’s Not How Good You Are, It’s How Good You Want to Be The Inmates are Running the Asylum – Why High-Tech Products Drive Us Crazy and How to Restore the Sanity Manga! Manga! The World of Japanese Comics December The Psychology of Computer Programming Search me – The surprising success of Google Guppy rabbit - What's on my Timeline Atlas Shrugged The story of the snail wanting to know why it was slow The Book Thief Dreaming in Code Remote – Office not required Year of Orange – The final gamble Rate this: Like this: Related
Mãi mà cũng sắp hết năm 2015. Mình bắt đầu viết blog từ ngày 31/12/2014, tính ra cũng gần tròn 1 năm rồi. Nhờ sự theo dõi và ủng hộ tận tình của các bạn, blog đã vượt qua các cột mốc 1000 view , 50 post và bây giờ là 100.000 view – một con số không tệ đối với một blog 1 năm tuổi. Từ ban đầu, mình đã xác định mục tiêu của blog sẽ là: Chia sẻ các kinh nghiệm về công nghệ (Chủ yếu là C# và một số công nghệ web ), tiếp theo là nghề nghiệp . Ở giai đoạn đầu, mình tập trung chủ yếu vào các bài viết technical . Sau đó mình nhận thấy các bài viết về con đường nghề nghiệp , phát triển bản thân cũng nhận được rất nhiều hưởng ứng. Vì vậy, mình sẽ cố gắng cân bằng giữa các bài viết về technical ( C# hay ho , tutorial ) và nghề lập trình . Cả hai loại kiến thức này đều rất hữu ích cho các bạn từ sinh viên cho đến junior dev nhé. Bạn nào tinh ý sẽ thấy một widget facebook nho nhỏ nằm phía bên tay phải mỗi bài viết. Đó là trang fanpage mới thành lập của blog: . Mình lập ra trang fanpage với mục đích quảng bá và giới thiệu blog, đưa blog đến với nhiều đối tượng độc giả hơn. Mỗi khi có bài mới, mình sẽ đăng trên fanpage. Chỉ cần thích trang hoặc nhập email vào mục theo dõi , các bạn sẽ nhận được notification mỗi khi có bài mới, rất tiện lợi phải không nào . Cảm ơn bạn Hoàng Phúc đã giới thiệu bạn bè like page ủng hộ cho mình. Nhân dịp “khai trương” fanpage, cũng như blog đạt mốc 100k view, 5 bạn đầu tiên comment bài viết này sẽ được request mình viết 1 bài viết theo chủ đề yêu cầu. Mình chuyên C#.NET và web nên các bạn đừng chơi khó hỏi mình về C, C++ hay embedded system nhé =))). Vui lòng đừng comment nhờ dạy kèm hay sửa bài tập luôn nghen (Nếu bạn là nữ và dễ thương thì cứ comment và để facebook lại, hoặc trực tiếp PM facebook mình cũng được 😉 ). Như thường lệ, dưới đây là một số bài viết khá hay của blog trong thời gian qua, có thể các bạn sẽ thấy chúng có ích: Một lần nữa, mình xin chân thành cảm ơn toàn bộ các bạn đọc . Hai điều quan trọng nhất cho sự thành công của một blog chính là nội dung và độc giả . Blog có được ngày hôm nay là nhờ sự ủng hộ, theo dõi và góp ý của các bạn. Chúc các bạn may mắn và thành công trên bước đường sự nghiệp, nhớ like page và thường xuyên theo dõi blog nhé, sắp tới sẽ có vài series khá hay đấy ;). Rate this: Like this: Related
It's almost the end of 2015. I started blogging on December 31, 2014, so it's almost been a year. Thanks to your dedicated monitoring and support, the blog has passed the milestones of 1000 views, 50 posts and now 100,000 views - not a bad number for a 1 year old blog. From the beginning, I determined that the goal of the blog would be: Sharing experiences about technology (Mainly C# and some web technologies), followed by career. In the early stages, I focused mainly on technical articles. Then I realized that articles about career paths and personal development also received a lot of responses. Therefore, I will try to balance technical articles (cool C#, tutorials) and programming. Both types of knowledge are very useful for everyone from students to junior developers. Those who are observant will see a small Facebook widget on the right hand side of each post. That is the blog's newly established fanpage: . I created a fanpage with the purpose of promoting and introducing the blog, bringing the blog to more readers. Every time there is a new post, I will post it on the fanpage. Just like the page or enter your email in the follow section, you will receive a notification every time there is a new post, very convenient, isn't it? Thank you Hoang Phuc for introducing your friends to like the page to support me. On the occasion of "opening" the fanpage, as well as the blog reaching the milestone of 100k views, the first 5 people to comment on this article will be asked to write an article according to the requested topic. I specialize in C#.NET and the web, so don't be difficult and ask me about C, C++ or embedded systems =))). Please do not comment asking for tutoring or homework correction (If you are female and cute, just comment and leave it on Facebook, or directly PM me on Facebook 😉). As usual, below are some pretty good blog articles in recent times, maybe you will find them useful: Once again, I would like to sincerely thank all readers. The two most important things for the success of a blog are content and readers. The blog is what it is today thanks to your support, following and suggestions. Wishing you luck and success on your career path, remember to like the page and regularly follow the blog, there will be some pretty good series coming soon ;). Rate this: Like this: Related
Từ khi ra trường, mình vẫn luôn giữ thói quen đọc sách , một phần là để giải trí, một phần là để học hỏi cái mới. Dù cho không học hỏi, áp dụng được gì thì cảm giác cầm cuốn sách (hoặc iPad) nghiền ngẫm từng chữ cũng khá thú vị. Để khuyến khích thói quen đọc sách , cũng như chia sẻ sở thích với một số bạn, bài viết này sẽ là review tổng hợp ngắn những cuốn sách hay nhất mình đã đọc trong năm vừa rồi. Do mình đọc khá nhiều thể loại: technical, kĩ năng sống, kinh tế, marketing, tiểu thuyết, tản văn, … nên những sách giới thiệu sẽ không theo một chủ đề cố định nào cả. Mỗi tháng mình đọc khoảng 6,7 cuốn sách. 12 cuốn sách dưới đây là 12 cuốn sách hay nhất mà mình đọc được mỗi tháng; có tháng mình đọc được khá nhiều cuốn hay nhưng chỉ chọn được 1 cuốn hay nhất để giới thiệu. Các bạn có thể xem toàn bộ danh sách ở cuối bài. Tháng 1 – Zero to One: Notes on Startups, or How to Build the Future Đây là một cuốn sách khá hay về startup. Tác giả chỉ ra những mindset mà người làm startup nên có, những khó khăn, những điều cần phải lường trước. Ông cũng đưa ra 7 câu hỏi mà người start-up phải trả lời: Bạn đã xác định được 1 cơ hội mà nhiều người không thấy chưa? Ngoài việc tạo ra sản phẩm, bạn đã nghĩ ra cách đưa nó đến tay người dùng chưa?… Mình chưa có ý định làm startup, nhưng vẫn thấy những ý tưởng trong sách khá hay và đáng học hỏi. Tháng 2 – C# in Depth 3rd Edition Một cuốn sách thuần túy technical về ngôn ngữ C#. Nhờ đọc cuốn này, mình nghiền ngẫm ra được nhiều khái niệm mà trước giờ vẫn hơi mơ hồ như: callback , delegate , lambda expression , generic , LINQ , … và viết được series C# hay ho cho blog này. Cuốn này khá hữu dụng cho cả junior lẫn senior dev eloper. Tháng 3 – Blink: The Power of Thinking Without Thinking Tác giả của cuốn sách là Gladwell Malcoml, một cây viết già đời của tờ The New Yorker, với những lối suy nghĩ, cái nhìn lạ . Cuốn sách này nói về cách ta sử dụng tiềm thức – suy nghĩ mà không cần suy nghĩ, đưa ra quyết định “trong chớp mắt”. Cách viết của Gladwell rất cuốn hút và hấp dẫn, đi kèm với những cái nhìn lạ là những câu chuyện thú vị. Cuốn này đã xuất bản ở Việt Nam với tựa là Trong Chớp Mắt. Những cuốn còn lại của tác giả cũng rất hay: David and Goliath, The Outlier, The Tipping Point, … mình thành fan của Gladwell nên nuốt nốt mấy cuốn đấy luôn. Tháng 4 – Influence – The psychology of Persuasion Mình được một anh bạn đồng nghiệp ASWIG (cũng ham đọc sách) giới thiệu cuốn này. Ban đầu, mình tưởng nó chỉ là sách marketing bình thường, nhưng càng đọc mình càng bị thu hút. Cuốn sách hướng dẫn cách thuyết phục, thay đổi người khác. Trong cuốn sách, bạn sẽ học được 6 nguyên lý cơ bản để thuyết phục người khác. Đây là những nguyên lý mà tụi quảng cáo, marketing áp dụng hàng ngày, đôi khi chúng ta cũng vô tình (hoặc cố ý) sử dụng mà không hay biết. VD như nguyên lý thứ sáu, scarity – cái gì hiếm thì sẽ quý , do đó các siêu thị hay chơi trò “Số lượng có hạn, mua ngay kẻo hết”. Đây là một cuốn sách có thể thay đổi cách nhìn của bạn, cũng như dạy bạn thêm về cách thuyết phục bạn bè, đồng nghiệp, cấp trên, hãy tìm ebook hoặc mua đọc thử nhé. Tháng 5 – The Game: Penetrating the Secret Society of Pickup Artists Đây là sách thể loại nửa tiểu thuyết, nửa hồi ký, là một câu chuyện có thật của anh chàng Neil Strauss (Bạn nào hay đọc vozforum chắc cũng biết thể loại tương tự). Trong 1 lần tìm đề tài viết bài gửi cho tòa soạn, Neil đã gặp Mystery, một gã trùm “chăn rau” thứ thiệt. Từ một thanh niên “đụt”, dưới sự dạy dỗ của Mystery, anh học được những mánh khóe tiếp cận phụ nữ, những chiêu trò lấy lòng và đưa họ lên giường . Một thế giới nơi phụ nữ chỉ là con mồi , là phần thưởng , nơi tình yêu, rung động chỉ là những chiêu trò tâm lý… Sách viết khá hay, khá thật và quan trọng là kiến thức trong sách áp dụng được vào thực tế . Các bạn nam – nhất là dân lập trình nên đọc cuốn này, nó sẽ hướng dẫn bạn cách tiếp cận phái nữ, cách đánh bóng bản thân, cách nhắn tin cho gái, phương pháp kéo – thả, … Nếu ham học hỏi bạn nên đọc thêm cuốn The Mystery Method: How to Get Beautiful Women into Bed do chính nhân vật Mystery người thật việc thật chắp bút. Học để kiếm gấu thì được chứ đừng dùng để chăn rau nhé !!! Tháng 6 – What color is your parachute? Cuốn này mình tình cờ được anh team leader giới thiệu. Đây là một cuốn sách rất hay về việc xác định kĩ năng , hướng đi của bản thân. Đọc sách, bạn sẽ biết mình là ai, mình muốn gì, mình có thể làm gì, để xác định con đường phát triển sự nghiệp của chính mình. Sách cũng hướng dẫn một số kênh tìm việc thường thấy, cách viết một bức thư xin việc , cách chuẩn bị phỏng vấn . Nói không ngoa, đây là một trong những cuốn sách hay nhất về việc làm và nghề nghiệp; đó cũng là lý do nó liên tục được cập nhật phiên bản mới mỗi năm từ 1970 tới giờ. Ở phần 2, mình sẽ giới thiệu 6 cuốn sách còn lại, các bạn đón đọc nhé. Bonus: Đây là list các sách mình đã đọc từ tháng 1 tới tháng 6, cuốn nào in đậm là hay nhất tháng, in nghiêng là sách hay – đáng đọc nhé. Cuốn theo chiều gió Tuyển tập truyện ngắn Haruki Murakami Superhuman by Habit Zero to One: Notes on Startups, or How to Build the Future Lắng nghe gió hát – Haruki Murakami Quốc gia khởi nghiệp The Magic of Thinking Big The Pragmatic Programmer, From Journeyman To Master The Passionate Programmer Creating a Remarkable Career The Road Less Traveled C# in Depth 3rd Edition Yêu đi thôi, muộn lắm rồi Nghĩ giàu làm giàu (dở) Hackers and Painters 5 cm trên giây Nhà tự nhiên kinh tế – Tại sao kinh tế học có thể lý giải mọi điều Chuyện con mèo dạy con hải âu bay Innumeracy: Mathematical Illiteracy and Its Consequences Blink: The Power of Thinking Without Thinking Năm tháng là đóa lưỡng sinh hoa Cô gái văn chương và người hành hương than khóc Tam sinh tam thế – Thập lý đào hoa Outliers – The story of success Không bao giờ là thất bại – Tất cả là thử thách Một đời thương thuyết Đong tấm lòng Bảy bước tới mùa hè The Mastery of Love: A Practical Guide to the Art of Relationship: A Toltec Wisdom Book Influence – The psychology of Persuasion Hoàng tử bé The Full Facts Book of Cold Reading: A Comprehensive Guide to the Most Persuasive Psychological Manipulation Technique in the World The Four Agreements: A Practical Guide to Personal Freedom Ngôn ngữ của chúa What every BODY is saying Ame & Yuki – Những đứa con của sói Quái vật giữa loài người 10 nghịch lý cuộc sống The Game: Penetrating the Secret Society of Pickup Artists Tớ là mèo Pusheen The Mystery Method: How to Get Beautiful Women into Bed Steve Mcconnell – Rapid Development – Taming Wild Software Schedules Cuộc đời của Pi Programming Pearls Nhà giả kim Sài Gòn tả pín lù All marketers are liars Cracking the Coding Interview – 150 Programming Interview Questions and Solutions Facts and Fallacies of Software Engineering 58++ bài học vỡ lòng để trở thành No.1 Cái cười của thánh nhân Code – The Hidden Language of Computer Hardware and Software Người giỏi không bởi học nhiều The Elements of Style What color is your parachute? Rate this: Like this: Related
Since graduating, I have always kept the habit of reading books, partly for entertainment, partly to learn new things. Even if you don't learn or apply anything, the feeling of holding a book (or iPad) and mulling over every word is quite interesting. To encourage reading habits, as well as share interests with some of you, this article will be a short review of the best books I have read in the past year. Because I read a lot of genres: technical, life skills, economics, marketing, novels, essays, etc., the introductory books will not follow any fixed topic. Every month I read about 6-7 books. The 12 books below are the 12 best books I read each month; Some months I read quite a few good books, but I can only choose one best book to recommend. You can see the entire list at the end of the article. January – Zero to One: Notes on Startups, or How to Build the Future This is a pretty good book about startups. The author points out the mindsets that startups should have, the difficulties, and the things that need to be anticipated. He also gave 7 questions that start-ups must answer: Have you identified an opportunity that many people do not see? Besides creating the product, have you thought of a way to bring it to users?... I have no intention of starting a startup, but I still find the ideas in the book quite good and worth learning. February – C# in Depth 3rd Edition A purely technical book about the C# language. Thanks to reading this book, I pondered many concepts that were still a bit vague such as: callback, delegate, lambda expression, generic, LINQ, ... and wrote a cool C# series for this blog. This book is quite useful for both junior and senior dev elopers. March – Blink: The Power of Thinking Without Thinking The author of the book is Gladwell Malcoml, an old writer for The New Yorker, with strange ways of thinking and views. This book is about how we use our subconscious mind – thinking without thinking, making decisions “in the blink of an eye”. Gladwell's writing style is very attractive and engaging, accompanied by strange views and interesting stories. This book was published in Vietnam with the title In the blink of an eye. The author's remaining books are also very good: David and Goliath, The Outlier, The Tipping Point, ... I became a fan of Gladwell so I devoured those books. April – Influence – The psychology of Persuasion I was introduced to this book by an ASWIG colleague (also an avid reader). At first, I thought it was just a normal marketing book, but the more I read, the more attracted I became. The book teaches how to persuade and change others. In the book, you will learn 6 basic principles to persuade others. These are the principles that advertisers and marketers apply every day, and sometimes we also accidentally (or intentionally) use them without knowing it. For example, the sixth principle, scarity - what is rare is precious, so supermarkets often play the game "Limited quantity, buy now before it runs out". This is a book that can change your perspective, as well as teach you more about how to persuade friends, colleagues, and superiors. Find the ebook or buy it to read. May – The Game: Penetrating the Secret Society of Pickup Artists This is a half-novel, half-memoir, a true story by Neil Strauss (Those who often read vozforum probably know the same genre). While looking for a topic to write an article for the editor, Neil met Mystery, a real "vegetable farmer" boss. From a "slut" young man, under the tutelage of Mystery, he learned tricks to approach women, tricks to please them and get them into bed. A world where women are just prey, rewards, where love and affection are just psychological tricks... The book is written quite well, quite true and importantly, the knowledge in the book can be applied in practice. . Men - especially programmers should read this book, it will guide you on how to approach women, how to polish yourself, how to text girls, drag-drop method,... If you are eager to learn, you should Read more in the book The Mystery Method: How to Get Beautiful Women into Bed, written by the real Mystery character himself. It's okay to learn to find bears, but don't use them to herd vegetables!!! June – What color is your parachute? I happened to be introduced to this book by the team leader. This is a very good book about determining your skills and direction. Reading books, you will know who you are, what you want, what you can do, to determine your own career development path. The book also guides some common job search channels, how to write a cover letter, and how to prepare for an interview. Without exaggeration, this is one of the best books about jobs and careers; That is also the reason why it has continuously been updated with new versions every year since 1970 until now. In part 2, I will introduce the remaining 6 books, please read them. Bonus: This is a list of books I read from January to June, books in bold are the best of the month, books in italics are good books - worth reading. Gone With the Wind Collection of short stories by Haruki Murakami Superhuman by Habit Zero to One: Notes on Startups, or How to Build the Future Listen to the wind sing – Haruki Murakami Start-up nation The Magic of Thinking Big The Pragmatic Programmer, From Journeyman To Master The Passionate Programmer Creating a Remarkable Career The Road Less Traveled C# in Depth 3rd Edition Just love, it's too late Think and get rich (bad) Hackers and Painters 5 cm per second The Economic Naturalist – Why Economics Can Explain Everything The story of a cat teaching a seagull to fly Innumeracy: Mathematical Illiteracy and Its Consequences Blink: The Power of Thinking Without Thinking Years and months are a double flower The literary girl and the mourning pilgrim Three generations, three generations – Ten miles of peach blossom Outliers – The story of success It's never a failure - It's all a challenge A lifetime of negotiations Measure your heart Seven steps to summer The Mastery of Love: A Practical Guide to the Art of Relationship: A Toltec Wisdom Book Influence – The psychology of Persuasion Little Prince The Full Facts Book of Cold Reading: A Comprehensive Guide to the Most Persuasive Psychological Manipulation Technique in the World The Four Agreements: A Practical Guide to Personal Freedom The language of God What every BODY is saying Ame & Yuki – Children of the wolf Monsters among humans 10 paradoxes of life The Game: Penetrating the Secret Society of Pickup Artists I'm Pusheen the cat The Mystery Method: How to Get Beautiful Women into Bed Steve Mcconnell – Rapid Development – ​​Taming Wild Software Schedules Life of Pi Programming Pearls Alchemist Saigon describes pinlu All marketers are liars Cracking the Coding Interview – 150 Programming Interview Questions and Solutions Facts and Fallacies of Software Engineering 58++ introductory lessons to become Không.1 The smile of a saint Code – The Hidden Language of Computer Hardware and Software Good people do not study a lot The Elements of Style What color is your parachute? Rate this: Like this: Related
Nối tiếp phần 1 , bài viết này sẽ tiếp tục giới thiệu một số góc khuất ít người biết về ngành IT. 4. Giỏi technical không chưa đủ Nhắc lại một câu nói từ bài cũ : Một điều khá may mắn trong ngành IT là: Vì đây là một ngành nặng về kĩ thuật. do đó bạn chỉ cần giỏi tập trung trau dồi technical cho giỏi. Chỉ cần technical giỏi, bạn sẽ được đồng nghiệp coi trọng, cấp trên tin tưởng giao phó trách nhiệm. Chỉ cần technical giỏi, con đường sự nghiệp của bạn sẽ rộng thênh thang, bạn sẽ nhanh chóng leo lên vị trí senior, team leader, technical lead , … Chỉ cần technical giỏi, lương bạn sẽ tăng vù vù, từ 500$, 1000$, 2000$, các quảng cáo tuyển dụng toàn cần người giỏi technical còn gì? Nhiều bạn ngáo ngơ mới ra trường vẫn tưởng điều này là đúng, thấy mình hơi giỏi nên tỏ thái độ khi phỏng vấn . Môi trường làm việc đòi hỏi nhiều thứ hơn cả khả năng code, đó là: khả năng giao tiếp, khả năng trình bày/ thuyết trình , kĩ năng thương thảo , khả năng làm việc nhóm , … Tới những cấp cao hơn như team lead, quản lý , bạn còn phải biết cách quản lý, chia việc, cách thuyết phục, nói cho người khác nghe. Khả năng code là bắt buộc, nhưng chỉ code không là chưa đủ nếu bạn muốn sống sót và thăng tiến trong ngành này. 5. Cấp trên thường “đéo biết gì cả” Đôi khi nói cấp trên “đéo biết gì” cũng không sai. Một sự thật buồn cười của ngành mình là: Nếu giỏi technical, developer sẽ được đẩy lên làm quản lý . Ở cấp quản lý, họ ít có thời gian code, mà phải lo chia việc, quản lý nhân sự, quản lý dự án,… toàn những việc trước giờ họ chẳng bao giờ làm. Ở cương vị mới, họ cũng phải học dần dần về quản lý, giống như chúng ta mới bắt đầu học code vậy thôi. Các bạn lập trình viên thường có suy nghĩ rằng “Ông team leader /PM có code bao giờ đâu, công nghệ mới cũng *éo biết”. Điều này đúng, vì họ còn phải lo nhiều việc khác : nhân sự, tài nguyên, phỏng vấn ứng viên, hoặc đấu đá nội bộ công ty ,… không có đủ thời gian để trau dồi technical. Đôi khi tranh cãi về một vấn đề, bạn chỉ thấy vấn đề technical, họ còn phải chú ý đển nhiều khía cạnh khác như: sắp xếp team, tiến độ dự án, trình độ thành viên, … Do vậy, đừng giữ thái độ thù hằn, cay cú hay xem thường cấp trên . Hãy cứ cố gắng thấu hiểu và học hỏi họ đi, biết đâu sẽ có lúc bạn “bị” đẩy lên làm quản lý như họ thôi. Gợi ý nhỏ: Nếu cấp trên thật sự “ngu” và bạn không chiụ nổi, cứ thoải mái chuyển công ty/chuyển phòng ban khác thôi, ngành mình cũng dễ xin việc lắm. 6. Lập trình viên dần đang mất giá Hôm trước, mình nhận được mail giới thiệu việc làm thêm của vlance – Một trang web cho freelancer Việt Nam. Nhìn giá cả các dịch vụ IT ở Việt Nam mà thấy thương: Một ứng dụng chỉ có giá 2 triệu, một website chỉ khoảng 1 triệu. Một phần do các công ty IT ở Việt Nam phá giá, làm mọi thứ từ web tới app với giá rẻ mạt. Một phần do các bạn developer Việt Nam đang bán rẻ chất xám, bán rẻ sức lao động của chính mình. Ở đầu bài, mình từng nói rằng ngành lập trình viên có mức lương kha khá. Với các vị trí như senior, team leader, PM thì lương 1000-3000$/tháng là chuyện bình thường. Tuy nhiên, mức lương ở các vị trí thấp hơn lại … khá là thấp. Một phần là do nhiều bạn trẻ đổ xô đi học công nghệ thông tin, học lập trình, khi ra trường lại không đủ trình độ, đành ngậm ngùi làm những công việc nhàm chán, mức lương thấp. Công nghệ hiện đại làm mọi người dễ tiếp cận việc lập trình hơn, nên người dùng có thể làm web, làm ứng dụng dễ dàng. Lập trình viên thì ngày càng “lười” hơn, “nhàn” hơn nhờ các framework. Trong tương lai, có thể ngành lập trình sẽ không còn hot như bây giờ, lập trình viên sẽ rớt giá “thê thảm”. Kết. Thế giờ em phải sống nàm thao? Nghe mình “hù” nãy giờ, chắc bạn cũng hơi nghi ngại rồi phải không? Đừng lo, hãy áp dụng một số lời khuyên dưới đây của mình. Nắm vững kiến thức nền tảng , học nhiều ngôn ngữ chứ đừng ôm khư khư 1 ngôn ngữ . C++, C# , Java, … có hay đến đâu cũng chỉ là công cụ . Quan trọng là bạn làm được gì với ngôn ngữ mình biết. Ngành mình có rất nhiều developer, nhưng có rất ít developer giỏi. Hãy tự trao dồi kiến thức và kĩ năng để tự nâng giá bản thân nhé, đã giỏi thì không lo thất nghiệp hay lương thấp. Xác định con đường mình muốn đi: Manager hay Technical, hoặc mở công ty riêng. Học thêm mấy thứ ngoài luồng như: quản trị, kinh tế, khởi nghiệp,… sau này sẽ có ích lắm đấy. Sống khôn hơn và đừng ngáo ngơ nữa. Chịu khó đi xã giao, tạo dựng danh tiếng, quan hệ. Hãy đọc blog của một số developer nổi tiếng để học cách suy nghĩ, cách làm việc của họ. Bạn nào muốn chia sẻ thêm về các mặt tối của ngành, hay có lời khuyên gì muốn đóng góp, cứ comment chia sẻ với mọi người nhé. Rate this: Like this: Related
Continuing part 1, this article will continue to introduce some hidden corners that few people know about the IT industry. 4. Being good at technical skills is not enough. Recalling a saying from an old article: One thing that is quite lucky in the IT industry is: Because this is a heavily technical industry. Therefore, you just need to be good at focusing on improving your skills. As long as you are technically good, you will be respected by your colleagues and trusted by your superiors. As long as you are good at technique, your career path will be wide open, you will quickly climb to senior position, team leader, technical lead,... As long as you are good at technique, your salary will increase rapidly, from 500$, 1000$ $, 2000$, the recruitment ads only need people who are good at technical skills, why not? Many new graduates still think this is true. They think they're a bit good, so they show off their attitude during the interview. The working environment requires more than coding ability, which are: communication ability, presentation/presentation ability, negotiation skills, teamwork ability,... Go to higher levels such as team lead , management, you also have to know how to manage, divide tasks, persuade, and speak to others. The ability to code is a must, but just coding is not enough if you want to survive and advance in this industry. 5. Superiors often "don't know anything" Sometimes saying that superiors "don't know anything" is not wrong. A funny truth about our industry is: If developers are good at techniques, they will be promoted to management positions. At the management level, they rarely have time to code, but have to worry about dividing tasks, managing human resources, managing projects,... all things they have never done before. In a new position, they also have to gradually learn about management, just like we just started learning to code. Programmers often have the thought that "The team leader/PM never has code, he doesn't even know about new technology". This is true, because they also have to worry about many other things: human resources, resources, interviewing candidates, or fighting within the company,... and don't have enough time to hone their skills. Sometimes when arguing about an issue, you only see a technical issue, they also have to pay attention to many other aspects such as: team arrangement, project progress, member qualifications, etc. Therefore, don't keep your attitude. hatred, bitterness or contempt for superiors. Just try to understand and learn from them, maybe there will come a time when you will be "pushed" to become a manager like them. Small suggestion: If your superiors are really "stupid" and you can't handle it, feel free to change companies/departments, it's easy to get a job in your industry. 6. Programmers are gradually losing value. The other day, I received an email introducing a part-time job from vlance - a website for Vietnamese freelancers. Looking at the prices of IT services in Vietnam makes me feel sad: An application only costs 2 million, a website only costs about 1 million. Partly because IT companies in Vietnam are dumping prices, making everything from websites to apps at dirt cheap prices. Partly because Vietnamese developers are selling their intelligence and their own labor cheaply. At the beginning of the article, I said that the programmer industry has a decent salary. For positions like senior, team leader, PM, a salary of 1000-3000$/month is normal. However, the salary in lower positions is... quite low. Partly because many young people rush to study information technology and programming, but when they graduate, they are not qualified and have to do boring, low-paying jobs. Modern technology makes programming more accessible to everyone, so users can create websites and applications easily. Programmers are becoming more "lazy" and "leisurely" thanks to frameworks. In the future, maybe the programming industry will no longer be as hot as it is now, and programmer prices will drop "catastrophically". Conclude. So now I have to live like this? Listening to me "scare" all this time, you're probably a bit skeptical, right? Don't worry, apply some of my advice below. Master the fundamental knowledge, learn many languages, don't stick to just one language. C++, C#, Java,... no matter how good they are, they are just tools. What matters is what you can do with the language you know. Our industry has many developers, but there are very few good developers. Cultivate your own knowledge and skills to raise your own price. If you're good, you won't have to worry about unemployment or low wages. Determine the path you want to take: Manager or Technical, or open your own company. Learning a few extra things like: management, economics, entrepreneurship, etc. will be very useful in the future. Live smarter and stop being stupid. Work hard to socialize, build reputation and relationships. Read the blogs of some famous developers to learn how they think and work. If you want to share more about the dark side of the industry, or have any advice to contribute, please comment and share with everyone. Rate this: Like this: Related
Trước khi xem bài này, các bạn nên ôn lại kiến thức bằng cách xem lại 2 bài viết về object và prototype trong series JavaScript sida . Trước khi phân tích về OOP trong JavaScript, mình sẽ nhắc lại sơ 1 số khái niệm trong OOP. Bạn nào quên rồi có thể lên wiki xem lại nhé: trình hướng đối tượng . Trong phạm vi bài viết, ta sẽ bàn về 3 đặc tính của OOP, so sánh cách hiện thực chúng trong Java và JavaScript. Vì Wiki có sẵn rồi nên mình chỉ copy vào thôi, không giải thích lại lòng vòng nhé: Encapsulation : Tính bao đóng và che giấu thông tin. Tính chất này không cho phép người sử dụng các đối tượng thay đổi trạng thái nội tại của một đối tượng. Chỉ có các phương thức nội tại của đối tượng cho phép thay đổi trạng thái của nó. Việc cho phép môi trường bên ngoài tác động lên các dữ liệu nội tại của một đối tượng theo cách nào là hoàn toàn tùy thuộc vào người viết mã. Đây là tính chất đảm bảo sự toàn vẹn của đối tượng. Inheritance : Tính kế thừa. Đặc tính này cho phép một đối tượng có thể có sẵn các đặc tính mà đối tượng khác đã có thông qua kế thừa. Điều này cho phép các đối tượng chia sẻ hay mở rộng các đặc tính sẵn có mà không phải tiến hành định nghĩa lại. Tuy nhiên, không phải ngôn ngữ định hướng đối tượng nào cũng có tính chất này. Polymophism : Tính đa hình. Thể hiện thông qua việc gửi các thông điệp (message). Việc gửi các thông điệp này có thể so sánh như việc gọi các hàm bên trong của một đối tượng. Các phương thức dùng trả lời cho một thông điệp sẽ tùy theo đối tượng mà thông điệp đó được gửi tới sẽ có phản ứng khác nhau. Người lập trình có thể định nghĩa một đặc tính (chẳng hạn thông qua tên của các phương thức) cho một loạt các đối tượng gần nhau nhưng khi thi hành thì dùng cùng một tên gọi mà sự thi hành của mỗi đối tượng sẽ tự động xảy ra tương ứng theo đặc tính của từng đối tượng mà không bị nhầm lẫn. OOP trong Java Như các bạn đã biết, Java là một ngôn ngữ hướng đối tượng, do đó việc hiện thực các đặc tính OOP rất đơn giản và nhanh gọn, dễ hiểu. Tính bao đóng trong Java thể hiện bằng cách cho cách khai báo các trường private, chỉ có thể truy xuất trong qua các hàm get, set . Tính kế thừa và đa hình cũng khá đơn giản, chỉ cần extend và viết hàm mới đè lên là xong (các bạn để ý access modifier private và protect nhé, tí mình sẽ so sánh nó với JavaScript). OOP trong JavaScript JavasSript thì ngược lại, do nó vốn sida nên ta phải áp dụng một số chiêu trò để hiện thực các đặc tính này. Trong JavaScript, để hiện thực tính bao đóng , ta có thể tạo ra 1 Constructor Function , đóng gói toàn bộ các trường và hàm vào 1 object. Thông thường, các bạn hay khai báo như sau: Với các khai báo này, tính bao đóng không được đảm bảo. Các property có thể bị truy cập, thay đổi từ bên ngoài. Ở đây, ta phải sử dụng biến cục bộ . Tuy nhiên, biến cục bộ này chỉ có thể truy xuất trong Constructor Function , nó tương đương với các trường private trong Java. Trong javascript, không có cách nào để tạo ra các trường protected (Chỉ có thể truy cập từ class kế thừa) như Java và C# được. Việc kế thừa còn sida hơn, như mình đã nhắc tới ở bài prototype , trong JavaScript không có từ khóa extends cũng chẳng có class, ta phải sử dụng prototype để kế thừa. Kết luận Lời khuyên cuối cùng của mình là: Nếu bạn cảm thấy khó chịu với JavaScript, bạn có thể thử học TypeScript , CoffeeScript hoặc ES6. Mình chưa dùbg TypeScript bao giờ nhưng đã xem thử code và syntax thì thấy nó khá rõ ràng, trong sáng và bớt sida hơn JavaScript nhiều (Có class có extends đủ cả). Các bạn có thể tham khảo thêm ở đây (Mấy bài này không có so sánh Java với JavaScript như mình đâu nhé): Dạo này mình đang hơi bí ý tưởng cho blog, bạn nào có thắc mắc hay yêu cầu gì thì cứ hỏi tự nhiênnhé, nếu thấy yêu cầu hay thì mình sẽ viết bài trả lời. 😀 Rate this: Like this: Related
Before reading this article, you should review your knowledge by reviewing the two articles about objects and prototypes in the JavaScript sida series. Before analyzing OOP in JavaScript, I will briefly recall some concepts in OOP. If you have forgotten, you can review it on the wiki: object oriented programming. Within the scope of this article, we will discuss three characteristics of OOP, comparing how to implement them in Java and JavaScript. Since the Wiki already exists, I'll just copy it and not re-explain it: Encapsulation: Encapsulation and information hiding. This property does not allow the user of the object to change the internal state of an object. Only the object's internal methods allow changing its state. It is entirely up to the code writer to allow the external environment to influence an object's internal data. This is the property that ensures the integrity of the object. Inheritance: Inheritance. This property allows an object to have properties that another object already has through inheritance. This allows objects to share or extend existing properties without having to redefine them. However, not all object-oriented languages ​​have this property. Polymophism: Polymorphism. Expressed through sending messages. Sending these messages can be compared to calling the internal functions of an object. The methods used to respond to a message will react differently depending on the object to which the message is sent. The programmer can define a property (for example, through method names) for a series of objects that are close together but use the same name when executing each object so that the execution of each object will be automatic. occur correspondingly according to the characteristics of each object without confusion. OOP in Java As you know, Java is an object-oriented language, so implementing OOP features is very simple, quick, and easy to understand. Closure in Java is demonstrated by declaring private fields, which can only be accessed through get and set functions. Inheritance and polymorphism are also quite simple, just extend and write a new function over it and you're done (pay attention to the access modifier private and protect, I'll compare it with JavaScript later). OOP in JavaScript JavasSript is the opposite. Because it is inherently silent, we have to apply some tricks to implement these characteristics. In JavaScript, to implement closure, we can create a Constructor Function, encapsulating all fields and functions into an object. Normally, you often declare as follows: With these declarations, encapsulation is not guaranteed. Properties can be accessed and changed from the outside. Here, we must use local variables. However, this local variable can only be accessed in the Constructor Function, which is equivalent to private fields in Java. In javascript, there is no way to create protected fields (Can only be accessed from inherited classes) like Java and C#. Inheritance is even worse, as I mentioned in the prototype article, in JavaScript there is no extends keyword or class, we have to use prototype to inherit. Conclusion My final advice is: If you feel uncomfortable with JavaScript, you can try learning TypeScript, CoffeeScript or ES6. I've never used TypeScript, but after looking at the code and syntax, I found it quite clear, pure, and much less complicated than JavaScript (it has classes with extensions). You can read more here (These articles do not compare Java with JavaScript like I do): Lately I'm a bit stuck for ideas for the blog. If you have any questions or requests, please feel free to ask. If you find a good request, I will write a response. 😀 Rate this: Like this: Related
Mình có thói quen đọc sách cuối tuần, đủ các thể loại từ marketing, startup cho tới technical. Lâu rồi cũng chưa review cuốn sách nào nên thấy thiêu thiếu, đành review cuốn này vậy. Đây là một cuốn sách khá hay về thiết kế architecture cho các ứng dụng .NET. Mặc dù nghe tên hầm hố nhưng sách không quá khó, các bạn từ junior, senior cho tới Software Architect đều có thể đọc hiểu cuốn này. Tuy nhiên, mình khuyên các bạn sinh viên hoặc mới ra trường đừng nên đọc. Đi làm được 1-2 năm, tiếp xúc với 1 số project lớn, bạn sẽ dễ hiểu những điều được viết trong sách hơn. Cuốn sách này có 2 phiên bản: bản đầu tiên ra mắt năm 2008, bản 2nd Edtion tái bản năm 2012. Hai phiên bản có nội dung khác nhau đến 80% , bài review này là của phiên bản đầu năm 2008. Giới thiệu nội dung Tác giả cuốn sách là hai lão technical consultant khá cứng cựa, đã từng làm Software Architect cho vài chục dự án. Đi lên từ vị trí developer, những kinh nghiệm họ chia sẻ đều rất gần gũi với dân developer chúng ta. Bên cạnh những nội dung lý thuyết sách còn có những đoạn code mẫu nên khá dễ hiểu. Ở chương đầu, tác giả định nghĩa lại về architecture: architecture là gì, thế nào là một architecture tốt,.. Đây là những câu hỏi mà các bác developer cứng cựa còn khó trả lời. Kết luận rút ra: architecture là những thứ khó thay đổi , vài trò của người software architect là xác định đúng những thứ này vào giai đoạn đầu, xây dựng nên kiến trúc của hệ thống. Chương sau, tác giả giới thiệu lại một số mô hình UML cơ bản (Chắc ở trường bạn nào cũng từng học về cái này trong môn: Cơ sở và nguyên lý thiết kế phần mềm). Các mô hình này đôi khi khá rối rắm và phức tạp, làm ta cảm thấy việc vẽ chúng khá là thừa thãi và mất thời gian. Tác giả đã đưa ra một kết luận rất hay: Mục đích của UML là để hỗ trợ giao tiếp giữa các bên trong dự án (dev, designer, tester, business analyst,…). UML giúp các bên hiểu nhau rõ hơn, chứ không phải để làm mất thời gian vẽ vời thiết kế của developer. Cuối phần một, sách giới thiệu những qui tắc thiết kế cơ bản: Seperation of Concern, các nguyên lý SOLID , các design pattern . Những kiến thức ở chương này khá có ích với developer ở mọi trình độ. Phần 2 là phần chính của cuốn sách, giới thiệu về 4 layer thường dùng trong các ứng dụng doanh nghiệp: Business Layer Service Layer Data Access Layer Presentation Layer Sách chỉ rõ vài trò, nhiệm vụ của từng layer, cách lựa chọn công nghệ phù hợp, những design pattern nào nên áp dụng. Xuyên suốt những nội dung này, tác giả luôn nhắc lại một điều: Không có design nào là hoàn hảo , giải quyết được mọi vấn đề. Mọi design phải được dựa theo yêu cầu của business, người Software Architect phải nhận ra được các ưu/khuyết điểm của mỗi design để đưa ra lựa chọn phù hợp. Nhận xét Cuốn sách ra đời năm 2008, khi ASP. MVC, LINQ , Entity Framework còn ở giai đoạn sơ khởi, chưa hoàn thiện, do đó những lời khuyên về lựa chọn công nghệ không còn chính xác lắm. Tuy nhiên, những lời khuyên về kiến trúc, phân tích thiết kế và pattern vẫn rất có giá trị. Bạn sẽ vừa đọc vừa “ ồ ra thế! ” hoặc “ lẽ ra phải làm thế này mới đúng “. Những kiến thức quý giá trong cuốn sách này sẽ giúp bạn: hù doạ junior, bật lại senior và thể hiện trước mặt Software Architect . Nhớ khiêm tốn và đừng làm quá nhé. Xen lẫn lý thuyết, sách luôn có nhiều đoạn code giải thích architecture, giải thích pattern. Có những đoạn đọc hoài không hiểu, chỉ cần giở tới trang sau đọc code là “thông” ngay. Với những khái niệm phức tạp, tác giả còn kèm thêm nguồn tham khảo để ta tự tìm đọc thêm. Cuối sách, tác giả còn cung cấp một solution gồm đủ 4 layer , với 3 project riêng cho Web, Winform và WPF. Đây là những đoạn code thật, chạy được, chuẩn hơn các project code mẫu đầy rẫy trên mạng nhé. Kết luận Nếu chưa tin vào những lời quảng bá của mình, bạn hãy xem những review của cuốn sách trên amazon. Sách khá dày (Gần 400 trang) nên sẽ tốn kha khá thời gian đọc và thấm đấy nhé. Như đã nhắc ở đầu bài, cuốn sách còn bản 2nd Edition năm 2012 nữa. Mình cũng đã đọc thử bản này. Bản 2012 tập trung giới thiệu Domain Driven Design (DDD) và Comand Query Responsiblity Segregation (CQRS). DDD là một hướng tiếp cận mới trong việc việc lấy requirement, viết user story, thiết kế hệ thống. CQRS là một pattern mới, tách rời việc đọc và ghi dữ liệu. Hai thứ này khá hay nhưng mình thấy các công ty Việt Nam ít áp dụng, do đó bản 2012 này không hữu dụng cho lắm so với bản 2008. Muốn tìm thêm sách để nâng cao kĩ năng lập trình? Hãy thử đọc Clean Code , The Passionate Programmer , hoặc bài viết này nhé. Rate this: Like this: Related
I have a habit of reading books on weekends, all genres from marketing, startups to technical. I haven't reviewed a book in a while, so I feel like I'm lacking, so I had to review this one. This is a pretty good book about architectural design for .NET applications. Even though the name sounds confusing, the book is not too difficult, everyone from junior, senior to Software Architect can read and understand this book. However, I advise students or new graduates not to read it. After working for 1-2 years, being exposed to a number of large projects, it will be easier for you to understand what is written in the book. This book has 2 versions: the first version was released in 2008, the 2nd Edition was republished in 2012. The two versions have up to 80% different content, this review is of the early 2008 version. Content introduction The book's authors are two quite tough old technical consultants who have worked as Software Architects for dozens of projects. Coming from a developer position, the experiences they share are very close to us developers. Besides the theoretical content, the book also has sample code so it's quite easy to understand. In the first chapter, the author redefines architecture: what is architecture, what is a good architecture, etc. These are questions that stubborn developers still find it difficult to answer. Conclusion: architecture is something that is difficult to change, the role of a software architect is to correctly identify these things in the early stages, building the system's architecture. In the following chapter, the author re-introduces some basic UML models (Probably everyone at school has learned about this in the subject: Foundations and principles of software design). These models are sometimes quite confusing and complicated, making us feel that drawing them is quite redundant and time-consuming. The author came to a very good conclusion: The purpose of UML is to support communication between parties in the project (dev, designer, tester, business analyst,...). UML helps parties understand each other better, rather than wasting developers' time drawing designs. At the end of part one, the book introduces basic design rules: Separation of Concern, SOLID principles, design patterns. The knowledge in this chapter is quite useful for developers at all levels. Part 2 is the main part of the book, introducing 4 commonly used layers in business applications: Business Layer Service Layer Data Access Layer Presentation Layer The book clearly shows the roles and tasks of each layer, how to choose appropriate technology, and what design patterns should be applied. Throughout this content, the author always repeats one thing: There is no perfect design that can solve all problems. Every design must be based on business requirements, the Software Architect must recognize the advantages/disadvantages of each design to make the appropriate choice. Reviews The book came out in 2008, when ASP. MVC, LINQ, and Entity Framework are still in their early stages and not yet complete, so advice on technology selection is no longer very accurate. However, advice on architecture, design analysis and patterns is still very valuable. You will read it and say "oh that's it!" ” or “ this should have been done correctly “. The valuable knowledge in this book will help you: scare juniors, turn on seniors, and show off in front of Software Architects. Remember to be humble and don't overdo it. Mixed with theory, books always have a lot of code explaining architecture and patterns. There are some passages that I don't understand, just turn to the next page and read the code and you'll understand. With complex concepts, the author also includes reference sources for us to read more on our own. At the end of the book, the author also provides a solution including all 4 layers, with 3 separate projects for Web, Winform and WPF. These are real, executable code pieces that are more accurate than the sample code projects everywhere on the internet. Conclusion If you don't believe the hype, look at the book's reviews on Amazon. The book is quite thick (Nearly 400 pages), so it will take quite a bit of time to read and absorb. As mentioned at the beginning of the article, the book also has a 2nd Edition in 2012. I have also read this version. The 2012 version focuses on introducing Domain Driven Design (DDD) and Command Query Responsiblity Segregation (CQRS). DDD is a new approach to getting requirements, writing user stories, and designing systems. CQRS is a new pattern that separates reading and writing data. These two things are quite good, but I see that Vietnamese companies rarely apply them, so this 2012 version is not very useful compared to the 2008 version. Want to find more books to improve your programming skills? Try reading Clean Code, The Passionate Programmer, or this article. Rate this: Like this: Related
Với các bạn web developer , trình duyệt web là thứ chúng ta tiếp xúc nhiều nhất chỉ sau IDE. Chrome là một trình duyệt web được giới lập trình viên ưa chuộng vì nhanh, tiện lợi, và có bộ Developer Tools vô cùng mạnh mẽ. Bài viết này sẽ giới thiệu một số tính năng của bộ Developer Tools này. Các bạn nào muốn theo nghiệp web developer nên đọc kĩ bài này nhé, vì bạn sẽ áp dụng những kiến thức này trong suốt quá trình làm việc đấy (Dù bạn có làm C# , Java , PHP, hễ có đụng tới front-end thì đều phải dùng Chrome Developer Tools cả). Để mở cửa số Developer Tools, ta ấn rổ hợp phím Ctrl + Shift + J . Nhiều bạn quen sử dụng Developer Tools để debug CSS, có thể nhấp chuột phải vài một element, chọn Inspect Element . Giao diện có thể hơi khác qua các phiên bản Chrome, nhưng số lượng và chức năng của các Tab vẫn tương tự nhau. 1. Elements Tab này hiển thị HTML của các element trong trang web. Trước khi có Developer Tools, ta phải sửa CSS, save lại rồi refresh lại page. Ngày nay, ta có thể sửa trực tiếp CSS của 1 element vào khung phía bên phải, xem kết quả ngay lập tức. (Đây là một chức năng khá hay có từ add-on Firebug của Firefox, được các web developer/web designer dành tặng vô số lời khen). Ngoài ra, nếu phải thiết kế web responsive, ta cũng có thể click vào icon mobile để test trang web trên màn hình các device với độ phân giải khác nhau. 2. Networks Ở tab này, ta có thể xem toàn bộ những thứ được trình duyệt tải về từ server: HTML, CSS, JS, hình ảnh, … Mình thường dùng tab này để xem thời gian tải trang, nhằm optimize và tăng tốc độ . Các AJAX request cũng hiện trong Tabs này. Bạn có thể bấm vào từng request riêng lẻ để xem thời gian request chạy, request đã gửi gì lên server, kết quả trả về từ server . Đôi khi sử dụng AJAX nhưng code không chạy, mình phải sử dụng tab này để xem lỗi là gì, xảy ra ở client hay server. 3. Sources Tab này hiển thị n hững file javascript được trình duyệt load . Ở tab này, ta có thể debug xem javascript chạy như thế nào. Với các ứng dụng sử dụng nhiều javascript hoặc dùng các library/framework như jQuery, AngularJS, ta có thể vào tab này, đặt breakpoint và debug như các IDE thông thường. Có một mẹo nhỏ khi debug: Nếu các bạn code trong các trang fiddle , hoặc làm việc với quá nhiều file, thư viện vài ngàn dòng, không thể đặt breakpoint bằng tay… hãy thêm dòng lệnh “debugger” vào sau dòng code cần debug. Bộ Debugger của Developer Tools sẽ tự xem dòng lệnh này là breakpoint, dừng ở câu “debugger” cho bạn debug 4. Timeline & Profile Hai tab này mình ít khi dùng. Khi javascript chạy quá chậm, developer sẽ sử dụng 2 tabs này để tìm hiểu function nào chạy chậm, nhằm optimize lại code và tăng tốc cho trang. 5. Resources Tab này hiển thị những thông tin được lưu trữ trong WebSQL, LocalStorage, SessionStorage, Cookies . Khi sử dụng những cơ chế trên để lưu dữ liệu người dùng, ta có thể vào tab này để kiểm tra 6. Audits Tab này có chức năng kiểm duyệt tốc độ của website , đưa ra những lời khuyên để tăng tốc. Vào Tab này và bấm Run, Developer Tool sẽ tiến hành đo đạc, so sánh tốc độ load của Web Site, kiểm tra xem Website đã được tối ưu hay chưa, sau đó đưa ra những cách tăng tốc. Một chức năng khá hay và thú vị. 7. Console Những lỗi liên quan tới javascript (không load được, thiếu mở đóng ngoặc, chấm phẩy, …) sẽ hiển trị trong tab này. Ta có thể nhập trực tiếp javascript vào tab này để chạy. Nhờ khả năng chạy trực tiếp javascript, ta có thể làm rất nhiều trò “thú vị” với tab Console. Các bạn đón xem phần 2 để biết nhé. Bài viết tham khảo: Rate this: Like this: Related
For web developers, the web browser is the thing we come into contact with the most after the IDE. Chrome is a web browser favored by programmers because it is fast, convenient, and has an extremely powerful set of Developer Tools. This article will introduce some features of this Developer Tools set. Those of you who want to pursue a career as a web developer should read this article carefully, because you will apply this knowledge throughout the working process (Even if you do C#, Java, PHP, if you touch the front-end, All must use Chrome Developer Tools). To open the Developer Tools window, press Ctrl + Shift + J. Many of you are familiar with using Developer Tools to debug CSS. You can right-click on a few elements and select Inspect Element. The interface may differ slightly between Chrome versions, but the number and function of Tabs remains similar. 1. Elements This tab displays the HTML of the elements on the website. Before having Developer Tools, we had to edit CSS, save and refresh the page. Nowadays, we can directly edit the CSS of an element in the right pane and see the results immediately. (This is a pretty cool function from Firefox's Firebug add-on, which has received countless compliments from web developers/web designers). In addition, if we have to design a responsive website, we can also click on the mobile icon to test the website on device screens with different resolutions. 2. Networks In this tab, we can see all the things downloaded by the browser from the server: HTML, CSS, JS, images, etc. I often use this tab to see page load time, to optimize and speed up degree . AJAX requests also appear in this Tabs. You can click on each individual request to see how long the request took to run, what the request sent to the server, and the results returned from the server. Sometimes when using AJAX but the code doesn't run, I have to use this tab to see what the error is, whether it occurs on the client or the server. 3. Sources This tab displays javascript files loaded by the browser. In this tab, we can debug and see how javascript runs. For applications that use a lot of javascript or use libraries/frameworks like jQuery, AngularJS, we can go to this tab, set breakpoints and debug like regular IDEs. There is a little tip when debugging: If you code in fiddle pages, or work with too many files, libraries of several thousand lines, cannot set breakpoints manually... add the command line "debugger" after the line of code to be debugged . The Developer Tools Debugger will automatically consider this command line as a breakpoint, stopping at the sentence "debugger" for you to debug. 4. Timeline & Profile I rarely use these two tabs. When javascript runs too slow, developers will use these two tabs to find out which functions are running slow, to optimize the code and speed up the page. 5. Resources This tab displays information stored in WebSQL, LocalStorage, SessionStorage, Cookies. When using the above mechanisms to save user data, we can go to this tab to check 6. Audits This tab has the function of checking the speed of the website, giving advice to speed up. Go to this Tab and click Run, Developer Tool will measure and compare the loading speed of the Web Site, check whether the Website has been optimized or not, then suggest ways to speed it up. A pretty cool and interesting function. 7. Console Errors related to javascript (unable to load, missing parentheses, semicolons, etc.) will be displayed in this tab. We can directly enter javascript into this tab to run. Thanks to the ability to run javascript directly, we can do a lot of "interesting" things with the Console tab. Please watch part 2 to find out. Reference article: Rate this: Like this: Related
Để hiểu rõ về các hàm được đề cập trong bài viết này, các bạn nên ôn lại chút kiến thức về object trong javascript và đít (this) trong javascript nhé. Như đã hứa, trong bài này mình sẽ giới thiệu bộ 3 function bind, call ,apply. Đây là 3 hàm tạo nên sự mạnh mẽ và bá đạo của JavaScript. Trói đít (this) lại bằng bind Bind là một hàm nằm trong Function.prototype , do đó chỉ có function mới có khả năng gọi nó. Như đã nhắc tới trong bài viết về this , bind được dùng để xác định tham số this cho một function . Như trong trường hợp dưới đây, khi ta truyền hàm showName vào như một callback cho hàm button.click, giá trị this ở đây chính là button đó. Để hàm chạy đúng, ta dùng bind để bind giá trị person và this . Không chỉ bind được giá trị this, bind còn bind được các tham số truyền vào cho hàm nữa. Do đó, Bind còn được dùng để viết partial function. Nói một cách đơn giản, partial function tức là tạo ra 1 function mới từ 1 function cũ bằng cách gán mặc định một số tham số cho function cũ đó . Bạn hãy xem ví dụ cụ thể sau. Mình có một hàm log đơn giản có 3 tham số: Giả sử mình muốn tạo một hàm log khác, ghi lại các log error của hôm nay, mình có thể viết một hàm mới dựa theo hàm log cũ: Thay vì viết như thế, mình có thể viết đơn giản hơn bằng các dùng bind . Ở đây log là function cũ, logErrToday là function mới, được tạo ra bằng cách gán mặc định 2 tham số level và time. Partial Function còn được gọi là Curry (Nhiều người bảo 2 cái đó là một, nhiều người bảo 2 cái đấy khác nhau). Nếu bạn thấy khái niệm partial function/curry khá lạ tai cũng đừng lo, chúng ít được dùng trong Java, C# mà hay được sử dụng khá nhiều trong một số ngôn ngữ kiểu lập trình hàm (functional programming) như Haskell, F#, Scala,…. . Functional programming khá là khó học, dễ nhức đầu đau não, bạn nào muốn thử sức thì cứ kiếm ngôn ngữ Haskell mà phang nhé. Call và Apply, tuy 2 mà 1, thấy 1 mà 2 Đây là 1 cặp anh em… nhầm, chị em song sinh trong JavaScript. Hai hàm này nằm trong prototype của Function ( Function.prototype ), do đó chỉ function mới có thể gọi. Chúng có chung một chức năng lại: Gọi 1 function, xác định tham số this, truyền các tham số còn lại vào. Điểm khác nhau là apply truyền vào một array chứa toàn bộ các tham số còn call truyền lần lượt từng tham số. Dể dễ nhớ, ta có thể nhẩm “ A là một Array, C là nhiều Cục “. Cùng xem ví dụ đơn giản này về call và apply , bạn sẽ hiểu ngay Call và a pply thường được dùng để mượn hàm (borrowing function). Các bạn thử đọc xem dòng code dưới đây làm gì? Gợi ý : Arguments là một biến cục bộ trong function, chứa toàn bộ các tham số được truyền vào. Đáp án : A rguments là một object giống array nhưng không phải là array (đấy, thấy sida chưa). Arguments giống array vì nó có field length , có thể truy cập các giá trị nó chứa thông qua index 0,1,2. Tuy nhiên, do arguments không phải là array nên nó không thể gọi các hàm của Array.prototype . Do đó, ta phải sử dụng call/apply để mượn một số hàm trong Array.prototype , các hàm này sẽ trả ra một array cho ta xử lý. Dòng code phía trên chuyển object arguments thành một array . Sao rắc rối quá vậy?? Sao arguments không phải là array luôn đi cho mọi chuyện đơn giản? Lý do là Javascript nó sida . Hồi mới biết thằng arguments này mình cũng muốn chửi thề như vậy đấy. Ngoài ra, call và apply còn được dùng để monkey-patching hoặc tạo spy. Ta có thể mở rộng chức năng của một hàm mà không cần sửa source code của hàm đó. Ví dụ ta có hàm accessWeb của object computer . Sử dụng call, ta có thể ghi thêm log trước và sau khi hàm accessWeb được gọi mà không can thiệp vào code của hàm đó Nói nhỏ các bạn nghe nè, mấy cái call/apply với bind này cũng ít người rành, do đó các bạn đọc xong bài này có thể lấy kiến thức ra để lòe thiên hạ. Vì ít người biết nên nếu viết code mà dùng call, apply v…v bạn nhớ giải thích rõ nhé, viết code khó hiểu dễ bị ăn chửi lắm (Nói thật đấy, ngày xưa đoạn code Array.call gì đó làm mình khó hiểu, đau cả đầu nên phải lôi cả họ nhà thằng code ra mà chửi). Bài viết có tham khảo một số nguồn ở đây: Rate this: Like this: Related
To clearly understand the functions mentioned in this article, you should review some knowledge about objects in javascript and this in javascript. As promised, in this article I will introduce the three functions bind, call, apply. These are 3 functions that make JavaScript powerful and powerful. Bind (this) with bind Bind is a function in Function.prototype , so only the function can call it. As mentioned in the article about this , bind is used to specify the this parameter for a function. As in the case below, when we pass the showName function as a callback to the button.click function, the this value here is that button. For the function to run properly, we use bind to bind the person and this values. Not only can bind this value, bind can also bind the parameters passed to the function. Therefore, Bind is also used to write partial functions. Simply put, partial function means creating a new function from an old function by assigning some parameters to that old function by default. Please see the following specific example. I have a simple log function with 3 parameters: Suppose I want to create another log function to record today's log errors, I can write a new function based on the old log function: Instead of writing like that, we can write more simply by using bind . Here log is the old function, logErrToday is the new function, created by assigning the default parameters level and time. Partial Function is also known as Curry (Many people say the two are the same, many say they are different). If you find the concept of partial function/curry quite strange, don't worry, they are rarely used in Java and C# but are used quite a lot in some functional programming languages ​​such as Haskell, F#, Scala. ,…. . Functional programming is quite difficult to learn and can easily cause headaches. If you want to try it, just find the Haskell language and play with it. Call and Apply, though 2 but 1, see 1 but 2 This is a pair of brothers... mistakenly, twin sisters in JavaScript. These two functions are in the Function prototype ( Function.prototype ), so only the function can be called. They have the same function: Call a function, specify this parameter, pass the remaining parameters. The difference is that apply passes in an array containing all the parameters, while call passes each parameter in turn. To make it easier to remember, we can mentally recite "A is an Array, C is many Departments". Let's look at this simple example of call and apply , you will understand immediately Call and a pply are often used to borrow functions. Please try reading what the line of code below does? Hint: Arguments is a local variable in the function, containing all the parameters passed in. Answer: A rguments is an object similar to an array but not an array (see, see sida). Arguments are similar to arrays because they have a length field and can access the values ​​they contain through indexes 0,1,2. However, because arguments is not an array, it cannot call functions of Array.prototype . Therefore, we must use call/apply to borrow some functions in Array.prototype , these functions will return an array for us to process. The line of code above converts the object arguments into an array. Why is it so complicated?? Why isn't arguments always an array to keep things simple? The reason is Javascript it sida . When I first met Argument, I also wanted to swear like that. In addition, call and apply are also used for monkey-patching or creating spies. We can extend the functionality of a function without changing the source code of that function. For example, we have the accessWeb function of object computer. Using call, we can write additional logs before and after the accessWeb function is called without interfering with the code of that function. Let me tell you a little, few people are familiar with these call/apply and bind things, so after reading this article, you can use your knowledge to show off to the world. Because few people know, if you write code that uses call, apply, etc., remember to explain clearly. If you write code that is difficult to understand, it's easy to get scolded (Honestly, in the past, some Array.call code made it difficult for me to understand. , my head hurt so I had to bring out Code's entire family to curse). The article references a number of sources here: Rate this: Like this: Related
Ở phần 1 , mình đã giới thiệu với các bạn về chức năng cơ bản của các tab trong Chrome Developer Tools. Ở phần này, mình sẽ chia sẻ một số mánh khóe, chiêu trò hữu ích mà các bạn có thể áp dụng. Những chiêu này sẽ rất có ích khi code, debug, hoặc để lòe cấp trên và thành viên mới. 1. Mở nhanh file javascript Với những dự án lớn, có hơn chục file css, js,… việc tìm mở file sẽ rất khó khăn. Chỉ cần mở Developer Tools, bấm tổ hợp Ctrl + P, những file cần tìm sẽ hiện ra đầy đủ, bạn chỉ việc chọn và ấn Enter. 2. Tìm kiếm trong source code Thông thường, để tìm kiếm trong file html, css, js, ta thường dùng chức năng Search trong IDE. Developer Tool cũng có chức năng tương tự, kích hoạt bằng cách ấn Ctrl + Shift + F. 3. Select các element trong HTML Để chọn 1 element trong HTML, ta thường hay sử dụng jQuery. Cửa sổ Console của Developer Tool cũng có 1 bộ api để ta select các element. $() : Viết tắt cho document.querySelector(). bạn có thể dùng cú pháp css để select element tương tự jquery. Kết quả trả về là element đầu tiên tìm được. $$() : Viết tắt cho document.querySelectorAll() . Tương tự như $(), nhưng trả về toàn bộ các element. $0-$4 : Các element đã được select gần đây nhất. $0 là element cuối cùng được select. 4. Chuyển code xấu thành code đẹp Nhiều khi chúng ta viết code ẩu, tất cả để chung một dòng, rất khó đọc. Hoặc ta sử dụng thư viện với code đã minify, rất khó đọc hay debug. Rất đơn giản, chỉ cần nhấp vào icon {} để “tút lại nhan sắc” cho code. 5. Chuyển đổi trạng thái của các element (hover, active) Khi dùng Developer Tools kiểm tra css của các element, ta phải rê chuột lên element, hoặc click vào element đó, đôi khi khá rắc rối. Tab Element có một khung cho phép chúng ta set trạng thái của các element này luôn. 6. Chỉnh sửa nhanh nội dung các element Khi muốn chỉnh sửa nội dung (text) của các đoạn văn, các đề mục trong trang web, ta phải bật Developer Tool lên, chọn element cần chỉnh sửa, sau đó sửa HTML. Chỉ cần vào cửa sổ console, đánh dòng lệnh , bạn có thể thoải mái sửa text của trang web một cách dễ dàng. 7. Tìm những event được bind vào một element Khi debug, mình luôn đau đầu vì không biết những hàm nào sẽ được gọi khi click vào một button, hover qua một div. Với Developer Tool, ta có thể gõ hàm getEventListeners(element) vào cửa sổ console, hoặc tìm những event được bind vào element đó trong tab Elements. 8. In object ra console nhờ log và table Chắc 90% các bạn web developer đều biết dùng console.log() để in ra một object trong cửa sổ console, giúp việc debug được dễ dàng. Chrome Developer Tool còn có một hàm rất thú vị nhưng ít người biết, đó là hàm console.table() . Hàm này có thể in 1 mảng các object ra dưới dạng 1 bảng, rất trực quan và dễ nhìn. 9. Lưu trữ console log, không mất log khi refresh lại trang Một khi refresh lại trang web, cửa số Console sẽ bị xóa trắng trơn. Để nội dung cửa sổ Console vẫn giữ nguyên khi refresh lại trang, ta chỉ cần tick vào ô “Preserve Log”. 10. Lấy màu của các element khác trên trang web Tab Element của Developer Tool có một công cụ để lấy màu vô cùng tiện lợi. Hãy click vào css nào liên quan tới màu sắc (color, background-color), một bảng màu sẽ hiện ra, cùng với một cây bút lấy màu cho phép bạn “chôm” màu từ element khác. Bài viết được tham khảo từ nhiều nguồn. Các bạn có thể chia sẻ những kinh nghiệm làm việc với Developer Tools ở đây nhé. Nguồn tham khảo: Rate this: Like this: Related
In part 1, I introduced you to the basic functions of tabs in Chrome Developer Tools. In this part, I will share some useful tips and tricks that you can apply. These tricks will be very useful when coding, debugging, or to show off to superiors and new members. 1. Quickly open javascript files With large projects, there are more than dozens of css, js files,... finding and opening the file will be very difficult. Just open Developer Tools, press Ctrl + P, the files you want to find will appear completely, you just need to select and press Enter. 2. Search in source code Normally, to search in html, css, js files, we often use the Search function in the IDE. Developer Tool also has a similar function, activated by pressing Ctrl + Shift + F. 3. Select elements in HTML To select an element in HTML, we often use jQuery. The Developer Tool's Console window also has a set of APIs to help us select elements. $() : Abbreviation for document.querySelector(). You can use css syntax to select elements similar to jquery. The returned result is the first element found. $$() : Shorthand for document.querySelectorAll() . Similar to $(), but returns all elements. $0-$4 : The most recently selected elements. $0 is the last element selected. 4. Convert bad code into beautiful code Many times we write code carelessly, all in one line, making it difficult to read. Or we use a library with minified code, which is very difficult to read or debug. Very simple, just click on the {} icon to "retouch the look" of the code. 5. Change the status of elements (hover, active) When using Developer Tools to check the css of elements, we have to hover over the element, or click on that element, which is sometimes quite troublesome. The Element tab has a frame that allows us to set the state of these elements. 6. Quickly edit the content of elements When you want to edit the content (text) of paragraphs and headings on a website, you must turn on the Developer Tool, select the element to edit, then edit the HTML. Just go to the console window, type the command line, you can comfortably edit the text of the website easily. 7. Find events bound to an element When debugging, I always have a headache because I don't know what functions will be called when clicking on a button or hovering over a div. With the Developer Tool, we can type the getEventListeners(element) function into the console window, or find the events bound to that element in the Elements tab. 8. Print objects to the console using logs and tables. Surely 90% of web developers know how to use console.log() to print an object in the console window, making debugging easy. Chrome Developer Tool also has a very interesting function but few people know, which is the console.table() function. This function can print an array of objects in the form of a table, very intuitive and easy to see. 9. Store the console log, do not lose the log when refreshing the page. Once the web page is refreshed, the Console window will be blank. To keep the content of the Console window intact when refreshing the page, we just need to tick the "Preserve Log" box. 10. Get the color of other elements on the web page The Developer Tool's Element tab has an extremely convenient tool to get the color. Click on any css related to color (color, background-color), a color palette will appear, along with a color picker that allows you to "steal" color from another element. The article is referenced from many sources. You can share your experiences working with Developer Tools here. Reference source: Rate this: Like this: Related
Để thành một lập trình viên giỏi, có rất nhiều bạn phải học và phải biết: Cách viết code sạch và refactor code , design thế nào để code SOLID , Inversion of Control và Dependency Injection, Agile methodology, … Tuy nhiên, đã bao giờ bạn tự hỏi: “Ai là người đã nghĩ ra những thứ đấy” chưa?. Bài viết này sẽ kể bạn nghe về những người đó. Đây là những cái tên có nhiều đóng góp to lớn cho ngành phần mềm . Họ nổi tiếng không chỉ nhờ khả năng code, mà còn nhờ khả năng viết và diễn đạt, truyền cảm hứng . Ko chỉ là một developer, họ còn là một writer. Mỗi người đều có trang web/blog, sách được xuất bản , rất có tiếng tăm trong cộng đồng developer. Nhờ khả năng viết, những ý tưởng/đóng góp của họ được cộng đồng tiếp thu, cải tiến và trân trọng. Mình cũng viết blog để chia sẻ kiến thức , ý tưởng, tiếc là chưa tiếng tăm chưa được bao nhiêu. Dưới đây là vài cái tên (theo mình) đã góp phần làm thay đổi bộ mặt của ngành Software Engineering chúng ta. 1. Dennis Ritchie Ông là cha đẻ của ngôn ngữ C – ngôn ngữ mà hầu như developer nào cũng phải học khi “Nhập môn lập trình”. Ông còn góp phần vào phát triển hệ điều hành Unix, tiền thân của Linux và OS X. Ông mất ngày 12/10/2011, hưởng thọ 70 tuổi. Đám ma không kèn không trống, chẳng bù với Steve Jobs. Sách đã xuất bản : Unix Programmer’s Manual; The C Programming Language 2. Uncle Bob Với hơn 35 năm tuổi nghề, ông được giới Software Engineer gọi bằng cái tên thân thương là “Chú Bob”. Ông là một trong những tác giả của Agile Manifestor . Với lối viết vui nhộn, hài hước, ông viết về Testing, Software Design, Design Pattern rất sâu sắc vào dễ hiểu. Hai cuốn sách Clean Code và Agile Software Development là sách gối đầu của nhiều thế hệ developer. Sách đã xuất bản : Clean Code: A Handbook of Agile Software Craftsmanship;, The Clean Coder: A Code of Conduct for Professional Programmers; Agile Software Development, Principles, Patterns, and Practices; … 3. Martin Fowler Ông là một lập trình viên, kiêm tác giả và diễn giả. Ông cũng là một trong những người “có cổ phần” trong Agile Manifestor . Những bài viết blog của ông về Agile, Refactoring, Inversion of Control, Continuous Integration được đánh giá là “tài liệu tham khảo kinh điển”. Những sách ông đã xuất bản cũng gây ra tiếng vang lớn trong giới Software Engineer. Cuốn Refactoring giúp mọi người nhận ra tầm quan trọng của việc refactor code . Bản thân mình từng viết 1 bài t ổng quát về NoSQL nhờ đọc qua cuốn NoSQL Distilled của ông. Sách đã xuất bản : Refactoring: Improving the Design of Existing Code; Patterns of Enterprise Application Architecture; NoSQL Distilled; … 4. Joel on Software Mình đã từng giới thiệu về ông ở bài trước “ Các blog IT đáng đọc “. Ông nổi tiếng cũng nhờ các bài viết trên blog của mình. Mỗi bài viết đều được chăm chút kĩ lưỡng, khá hài hước, sâu sắc và bổ ích. Ông cũng là những người đầu tiên đưa ra lời khuyên: “Lập trình viên nên luyện kĩ năng viết lách (writing) song song với k ĩ năng viết code (coding) “. Sách đã xuất bản : User Interface Design for Programmers; Joel on Software; More Joel on Software; Smart and Gets Things Done; … 5. David Hansson Anh (Sinh năm 79, vẫn còn trẻ) là cha đẻ của Ruby on Rail – một framework từng gây bao nhiêu sóng gió trong cộng đồng developer. Các framework ra đời sau như ASP.NET MVC cũng chịu ảnh hưởng từ RoR. Sau khi sáng lập công ty 37signals, anh mở thêm blog signal VS noise , nơi chia sẻ kinh nghiệm về UI/UX và lập trình Ruby. Mình từng đọc hai cuốn do anh viết: Getting Real, Rework, … Getting Real (Ebook được 37signals phát miễn phí ) không phải sách về lập trình, mà là sách về “cách làm một phần mềm tốt, được nhiều người dùng”. Cuốn Rework là tổng hợp những kinh nghiệm, kiến thức khi bạn muốn khởi nghiệp với ngành IT. Cả 2 cuốn đều hay, các bạn nên tìm đọc. Sách đã xuất bản : Agile Web Development with Rails; Getting Real; Rework; Remote: Office not Required; … Bạn nào muốn đóng góp thêm về các “Cây đa cây đề” trong ngành mình thì cứ thoải mái đóng góp trong phần comment nhé. Rate this: Like this: Related
To become a good programmer, there are many things you have to learn and know: How to write clean code and refactor code, how to design SOLID code, Inversion of Control and Dependency Injection, Agile methodology,... However, have you ever You ask yourself: "Who thought of those things"?. This article will tell you about those people. These are names that have made great contributions to the software industry. They are famous not only for their coding ability, but also for their ability to write and express and inspire. Not only are they a developer, they are also a writer. Each person has a website/blog, published books, and is very famous in the developer community. Thanks to their writing ability, their ideas/contributions are absorbed, improved and appreciated by the community. I also write a blog to share knowledge and ideas, unfortunately I don't have much reputation yet. Below are a few names (in my opinion) that have contributed to changing the face of our Software Engineering industry. 1. Dennis Ritchie He is the father of C language - the language that almost every developer must learn when "Introduction to programming". He also contributed to the development of the Unix operating system, the predecessor of Linux and OS X. He died on October 12, 2011, at the age of 70. The funeral had no trumpets, no drums, no compensation for Steve Jobs. Published books: Unix Programmer’s Manual; The C Programming Language 2. Uncle Bob With more than 35 years of experience, he is lovingly called "Uncle Bob" by the Software Engineer world. He is one of the authors of Agile Manifestor. With a fun and humorous writing style, he writes about Testing, Software Design, and Design Patterns that are very profound and easy to understand. The two books Clean Code and Agile Software Development are the first books of many generations of developers. Published books: Clean Code: A Handbook of Agile Software Craftsmanship;, The Clean Coder: A Code of Conduct for Professional Programmers; Agile Software Development, Principles, Patterns, and Practices; … 3. Martin Fowler He is a programmer, author and speaker. He is also one of the “stakeholders” in Agile Manifestor. His blog articles on Agile, Refactoring, Inversion of Control, Continuous Integration are considered "classic references". The books he has published also cause great resonance in the Software Engineer world. The book Refactoring helps people realize the importance of refactoring code. I myself once wrote a general article about NoSQL thanks to reading his book NoSQL Distilled. Published books: Refactoring: Improving the Design of Existing Code; Patterns of Enterprise Application Architecture; NoSQL Distilled; … 4. Joel on Software I introduced him in the previous article "IT blogs worth reading". He is also famous for his blog posts. Each article is carefully thought out, quite humorous, profound and useful. He was also the first to give advice: "Programmers should practice writing skills in parallel with coding skills." Published books: User Interface Design for Programmers; Joel on Software; More Joel on Software; Smart and Gets Things Done; … 5. David Hansson Anh (Born in 79, still young) is the father of Ruby on Rail - a framework that has caused a lot of turmoil in the developer community. Later frameworks such as ASP.NET MVC are also influenced by RoR. After founding the company 37signals, he opened the blog signal VS noise, a place to share experiences about UI/UX and Ruby programming. I have read two books written by him: Getting Real, Rework, ... Getting Real (Ebook distributed for free by 37signals) is not a book about programming, but a book about "how to make good software that can be used by many people". The book Rework is a collection of experiences and knowledge when you want to start a business in the IT industry. Both books are good, you should read them. Published books: Agile Web Development with Rails; Getting Real; Rework; Remote: Office not Required; ... If you want to contribute more about "Banyan Trees" in your industry, please feel free to contribute in the comment section. Rate this: Like this: Related
Đây không phải là điều mình tự nói với mình đâu, mà là điều mình muốn nói với bạn đấy. Mình nhắc lại một lần nữa nhé: Hãy ngồi xuống và viết blog đi nào. Trước khi lắc đầu nguầy nguậy, đưa ra vô vàn lý do để chống chế: mình không có thời gian, biết gì mà viết, viết có được gì đâu … Hãy chịu khó bỏ chút thời gian quý giá của bạn, đọc hết bài viết này rồi bắt tay vào viết nhé. Viết blog có được lợi lộc gì không? Dĩ nhiên là CÓ chứ. Viết blog là một chuyện mất nhiều thời gian và công sức, nếu như không được lợi lộc ai lại đi viết blog phải không nào. Một blog về IT sẽ mang cho bạn những lợi ích sau: Giúp bạn xây dựng và nâng cao thương hiệu bản thân : Mình nhận được sự tôn trọng từ mấy anh đồng nghiệp vì học thấy trên mạng và theo dõi blog của mình. Nếu bạn là senior, team leader , việc có 1 blog về IT sẽ làm đàn em nể nang, sếp coi trọng bạn hơn. Lúc xin việc , chỉ cần có CV trên linkedin , một account 2000 rep trên stackoverflow , 1 blog IT , bạn sẽ được đánh giá cao hơn hẳn các ứng viên khác nhé. Mở rộng mạng lưới quan hệ : Nhờ việc viết blog mà mình làm quen được khá nhiều bạn, từ senior, junior cho tới các bạn sinh viên. Các mối quan hệ này khá hữu ích nếu bạn muốn chuyển việc, tham khảo mức lương. Nâng cao trình độ và khả năng viết lách: Muốn có một blog, dĩ nhiên là bạn phải …. viết. Bạn sẽ phải tự đốc thúc mình tìm cái gì để viết, viết thế nào cho hay . Trong quá trình đọc sách , tìm hiểu những thứ hay ho để viết, trình độ của bạn sẽ tăng lên đáng kể. Khi viết chúng ra, bạn sẽ nhớ rõ, nhớ lâu hơn, khả năng trình bày cũng càng ngày càng tiến bộ. Cái khả năng trình bày/chém gió/ thuyết trình này quan trọng lắm đấy nhé, nhiều khi nó quyết định vị trí – mức lương của bạn đấy. Nghe có vẻ cũng hấp dẫn phải không. Chắc bạn cũng đang háo hức muốn bắt đầu, nhưng lại ngần ngừ vì một số lý do dưới đây… Thời gian rãnh rỗi đâu mà viết Mình nhắc lại: Viết blog là một chuyện khá mất thời gian . Ngoài thời gian viết, bạn còn phải suy nghĩ đề tài, tìm hiểu về điều mình muốn viết, tìm hình minh họa. Thời gian cho một bài viết là khoảng 2-4 tiếng, chưa kể những bài có code demo phức tạp. Nếu chưa quen, bạn có thể viết 1 tuần/bài, siêng năng hơn thì 2 tuần/bài. Thử ngẫm lại xem, 4 tiếng/tuần không phải là 1 con số lớn: chỉ bằng 5 ván dota, 8 ván LoL, hoặc 1 buổi tối xem phim với gấu. Chỉ cần cắt tí thời gian Dota/LoL/Facebook/phim ảnh lại, bạn sẽ có 1 blog của riêng mình, được vô số những lợi ích mà mình đề cập phía trên. Mình có biết gì đâu mà viết Bạn nghĩ rằng mình chỉ là sinh viên năm 2, mới ra trường, biết gì đâu mà viết? Dễ thôi, hãy tìm hiểu những điểm hay của ngôn ngữ lập trình mình giỏi nhất, rồi chia sẻ nó với bạn bè. Hoặc nếu bạn vừa học về OOP, SOLID , về SQL, hãy viết một post giải thích lại những điều mình học cho người khác, bạn sẽ nhớ và hiểu rõ hơn. Các cụ có câu “ Học thầy không tày học bạn “, có thể các bạn SV khác sẽ thấy những điều bạn viết dễ hiểu, dễ thấm hơn so với bài giảng lê thê buồn ngủ của các thầy thì sao? Bạn muốn viết một cái gì đó, nhưng người khác đã viết về nó rồi? Đừng lo, cứ viết, bằng ngôn ngữ của chính bạn . Có thể bạn sẽ tìm ra cách giải thích hay hơn, dễ hiểu hơn. Bạn sợ mình chưa nắm rõ vấn đề, viết lung tung sẽ bị ném đá. Đừng lo, cộng đồng mạng rất là rãnh rỗi và sẵn lòng hỗ trợ cho bạn. Nếu bài viết của bạn có đôi chỗ sai sót, họ sẵn lòng bỏ thời gian giảng giải (ném đá) cho bạn. Hãy chia sẻ kiến thức (có thể sai) của mình để nhận lại kiến thức đúng đắn hơn nhé. Nghe hay đấy, chỉ mình cách bắt đầu đi nào Lập một blog vô cùng đơn giản. Bạn chỉ cần vào , đăng kí một tài khoản, chọn một cái tên miền cho blog. Tiếp theo, bạn chỉ cần chọn themes, đặt một cái title thật kêu, đăng một cái banner thật ngầu và oách, thế là bạn đã có một blog . Tìm nội dung để viết cũng dễ thôi. Nếu bạn giỏi C, C++, hãy viết về nó, tài liệu tiếng Việt của mấy thằng này khá ít. Đọc một cuốn sách hay, hãy giới thiệu nó cho mọi người. Nghĩ ra cách học mới, hãy đăng lên để người khác vào chia sẻ. Điều quan trọng là phải giữ nhịp độ viết. Cuộc sống là một cuộc thi marathon, không phải thi chạy nước rút. Đừng viết nhiều khi sung, chán thì bỏ xó, hãy giữ nhịp độ 1,2 bài/tuần. Dần dần blog của bạn sẽ lớn dần, có nhiều nội dung hơn. Giai đoạn đầu, blog của bạn sẽ vắng như chùa bà đanh, một ngày chỉ khoảng 5-10 lượt xem. Đừng lo, đây là giai đoạn để bạn tạo content cho blog, hãy cứ giữ thói quen viết bài đều đặn , chịu khó quảng bá, dần dần mọi người sẽ biết tới blog của bạn thôi. Những tháng đầu, cả tháng mình chỉ được khoảng 1-200 views, trong khi hiện tại một ngày mình được 500-800 view lận. Hãy tự đặt mục tiêu, tự thưởng cho mình khi blog của bạn đạt mốc 1000 view , 50 bài viết , … bạn sẽ thấy hào hứng hơn nhiều, có khi còn vui hơn viết code ấy. Vậy thì bạn còn chờ gì nữa, ngồi xuống và bắt đầu viết blog thôi nào . Rate this: Like this: Related
This is not what I told myself, but what I want to tell you. I'll say it again: Sit down and write a blog. Before shaking your head, giving countless reasons to defend yourself: I don't have time, I don't know anything to write, I can't write anything... Please take the time to spare some of your precious time and read the entire article. Now let's start writing. Is there any benefit to blogging? Of course YES. Blogging is something that takes a lot of time and effort. If there were no benefits, who would blog? An IT blog will bring you the following benefits: Helps you build and enhance your brand: I received respect from my colleagues because I saw it online and followed my blog. If you are a senior, team leader, having a blog about IT will make your juniors respect you, and your boss will value you more. When applying for a job, as long as you have a CV on LinkedIn, an account with 2000 reps on stackoverflow, and an IT blog, you will be evaluated much higher than other candidates. Expanding my network of contacts: Thanks to blogging, I have met quite a few friends, from senior, junior to students. These relationships are quite useful if you want to change jobs and consult salary levels. Improve your writing skills and abilities: To have a blog, of course you must... write. You will have to push yourself to find something to write and how to write it well. In the process of reading books and learning interesting things to write about, your level will increase significantly. When you write them down, you will remember them clearly, remember them longer, and your presentation ability will also improve. This ability to present/chat/present is very important, sometimes it determines your position and salary. Sounds interesting, doesn't it? You are probably eager to start, but are hesitant for some of the reasons below... You don't have free time to write. I repeat: Blogging is quite a time-consuming thing. In addition to writing time, you also have to think about the topic, learn about what you want to write, and find illustrations. The time for an article is about 2-4 hours, not including articles with complex demo code. If you are not used to it, you can write 1 week/article, or more diligently, 2 weeks/article. Think about it, 4 hours/week is not a big number: only equal to 5 games of Dota, 8 games of LoL, or 1 night watching movies with bears. Just save a little time from Dota/LoL/Facebook/movies, you will have your own blog, with countless benefits that I mentioned above. I don't know anything to write. Do you think you're just a second-year student, just graduated, and don't know anything to write? It's easy, learn the good points of the programming language you're best at, then share it with your friends. Or if you have just learned about OOP, SOLID, or SQL, write a post explaining what you learned to others, you will remember and understand better. There is a saying "Learning from the teacher is not good enough to learn from you". Maybe other students will find what you write easier to understand and absorb than the teachers' long, sleepy lectures? You want to write something, but someone else has already written about it? Don't worry, just write, in your own language. Maybe you can find a better, easier to understand explanation. You are afraid that you don't understand the issue clearly and that if you write haphazardly, you will be criticized. Don't worry, the online community is very free and willing to support you. If your article has some mistakes, they are willing to take the time to explain it to you. Please share your (possibly wrong) knowledge to receive more correct knowledge. Sounds great, show me how to get started. Setting up a blog is extremely simple. You just need to go in, register an account, and choose a domain name for the blog. Next, you just need to choose a theme, put a catchy title, post a cool and powerful banner, and you have a blog. Finding content to write about is easy. If you are good at C, C++, write about it, Vietnamese documents of these guys are quite few. Read a good book, recommend it to everyone. Come up with a new way to learn, post it for others to share. It's important to keep your writing pace. Life is a marathon, not a sprint. Don't write too much when you're busy, if you get bored then leave it alone, keep the pace of 1-2 articles/week. Gradually your blog will grow and have more content. In the early stages, your blog will be as empty as a Ba Danh pagoda, with only about 5-10 views a day. Don't worry, this is the stage for you to create content for your blog. Keep up the habit of writing regularly and work hard to promote it. Gradually, people will know about your blog. In the first months, I only got about 1-200 views a month, while now I get 500-800 views a day. Set yourself a goal, reward yourself when your blog reaches 1000 views, 50 articles,... you will feel much more excited, maybe even more fun than writing code. So what are you waiting for, sit down and start blogging. Rate this: Like this: Related
Nối tiếp phần một , mình sẽ hướng dẫn các bạn 3 bước còn lại để hoàn tất thủ tục du học : Chờ offer letter, đóng tiền đặt cọc. Lấy CAS, xin Visa. Mua vé máy bay và lên đường. 4. Chờ offer letter, đóng tiền đặt cọc Sau khi nộp đơn, bạn sẽ phải chờ khoảng 2 tuần đến 1 tháng để trường xét duyệt hồ sơ. Một vài trường sẽ tổ chức một buổi phỏng vấn ngắn (Qua skype hoặc điện thoại) để đánh giá bạn. Mình từng phỏng vấn với 1 ông bên Dundee hỏi về công việc, 1 ông bên York hỏi về kiến thức lập trình, 1 ông bên Lancaster phỏng vấn gần 1 tiếng để được nhận vào suất học bổng 16000 bảng. Đa phần các trường khác chỉ xét hồ sơ , nếu thấy ok sẽ gửi cho bạn offer letter mời nhập học. Sau khi nhận được offer letter, bạn có thể chờ 1-2 tháng để suy nghĩ có nên accept hay không. Nhiều trường chỉ cho bạn 1 tháng, nếu không accept offer sẽ tự hủy . Sau khi accept offer, bạn phải chuyển tiền đặt cọc (Khoảng 600-1000 bảng), số tiền này sẽ được trừ vào học phí. 5. Lấy CAS, xin Visa Sau khi nhận tiền đặt cọc, trường sẽ gửi cho bạn 1 thư xác nhận gọi là CAS (Confirmaion of Acceptance for Studies). Có thư này bạn mới có thể xin Visa được. Bạn cũng phải đóng tiền bảo hiểm NHS cho sinh viên (Khoảng 300 USD/năm) trước khi làm thủ tục xin Visa. Phí xin Visa hình như là khoảng 550 USD, ở HCM thì mắc hơn 50 USD, không hiểu vì sao. Để xin Visa, bạn cần một số giấy tờ rắc rối khác nữa: Giấy khai sinh, sổ hộ khẩu. Giấy chứng minh số dư ngân hàng, giấy bảo lãnh nếu bố mẹ bạn đóng tiền. Bản gốc các giấy tờ nộp cho trường: Bằng ĐH, bằng IELTS, passport…. Sau khi làm hết thủ tục online, bạn cần mang toàn bộ giấy tờ đến trụ sở VFS để tiếp tục. Bạn cần thực hiện một cuộc phỏng vấn ngắn qua Lync lúc xin Visa, kết quả sẽ có sau 2 tuần. Đây là những câu hỏi thường được hỏi (kèm câu trả lời của mình): 1. Why did you choose UK to study? Because UK universites rank among the best in the world and qualifications are internationally valued and recognized. When I study in the UK I can meet people from different nationalities, sharing their backgrounds and discovering new perspectives. 2. Why did you choose this University? Lancaster University is a highly-reputed school. It ranked No. 9 in the UK and No.1 in the North West by the Complete University Guide, and is in the top 1% of universities globally. Moreover, I got a bursary of 16.000 pound from this school. 3. Why did you choose this major? I studied Software Engineering at FPT University, so I want to learn more about Information Technologi at higher level. The MSc International Innovation Computer Science pathway provides a unique blend of broad, contemporary academic modules and the professional training. 4. When is your course started? On 1st October 2015 5. When you intend to travel to UK? At the end of September, maybe on 21st or 23 September 6. Have you registered for HIS (immigration healthcare service)? If yes, when? Not yet? (Cái này khi nào nộp vậy chị?) 5. What are the benefits from this major will bring to you or help you? It can give me the practical knowledge and vocational skills I need as a software developer. I also have the opportunity to practise the knowledge and skills I have learned through organised industrial placements and projects. 6. What is your plan in the future? After finished the course, I will come back to Vietnam and work as a software developer, or open a start-up myself. It has been my dream since I graduated. 7. Where will be you stayed in the UK? I will stay in Lancaster City. I plan to stay in the university’s accomodation. 8. Do you have relatives in UK? No 9. Do you understand all the questions I asked you? Yes, I understand. 10. How long for your degree in UK this time, and which level? Two years, level 7 11. How long did you get the offer after submitting the application? More than one month, from the begining of April to late May 12. What kind of documents you applied to the University (school) to get the offer? Degree, Academic transcript, IELTS, CV, Personal statement, 2 reference letters, passport 13. How to accept the offer and pay the deposit? I accept the offer by logging into the application website of the university, then click the accept offer. After that, I got the payment information, and I went to Vietcombank to pay the deposit of 750 pounds 14. What is the most recent degree you have? I got the bachelor degree of Software Engineering at FPT University in 2014 15. Did you look over Universities besides this one? Yup, I got the unconditional offer from Southamption and Royal Holloway to. 16. What was the date you sent the application? April 4th Các giấy tờ của bạn sẽ bị VFS giữ khoảng 2 tuần. Sau đó các bạn sẽ nhận được 1 tin nhắn báo ra nhận lại Visa. Kết quả được niêm phong nên khi bạn mở phong bì ra, kiểm tra visa mới biết được. Visa ở Anh chỉ cho phép sinh viên đi làm thêm 20 tiếng/tuần nhé. 6. Mua vé máy bay và lên đường Nếu muốn chắc chắn về chuyện chỗ ở, bạn có thể vào mục Accommodation của trường. Hầu như các trường đều có kí túc xá, giá hơi cao so với thuê ngoài nhưng đi lại thuận tiện hơn. Nếu có bạn bè hoặc người quen, bạn có thể qua sớm vài ngày, xin ở nhờ rồi từ từ tìm nhà, giá cả sẽ mềm hơn chút đỉnh. Một trang web khá hay để săn vé máy bay giá rẻ là skyscanner.net . Bạn chỉ cần điền một số thông tin cơ bản như: Ngày đi, điểm xuất phát (HCM). Ở Anh chỉ có 1 số sân bay quốc tế: London, Manchester, … nếu thành phố bạn học không có sân bay quốc tế, hãy bay tới các sân bay này rồi đi tàu/xe về trường. Các trường đều có dịch vụ đưa đón tại sân bay, nhớ đăng ký trước nếu bạn sợ lạc đường. Tới đây chắc các bạn cũng đã có đủ những thông tin cần thiết rồi. Bạn nào muốn hỏi thêm hoặc có kinh nghiệm hay muốn chia sẻ thì cứ comment vào bài viết nhé. Nếu muốn biết về cuộc sống học tập tại UK, bạn có thể xem bài viết trước của mình. Rate this: Like this: Related
Continuing part one, I will guide you through the remaining 3 steps to complete the study abroad procedures: Wait for offer letter, pay deposit. Get CAS, apply for Visa. Buy plane tickets and hit the road. 4. Wait for the offer letter, pay the deposit After submitting the application, you will have to wait about 2 weeks to 1 month for the school to review the application. Some schools will hold a short interview (via skype or phone) to evaluate you. I interviewed with a man from Dundee to ask about work, a man from York asked about programming knowledge, a man from Lancaster interviewed for nearly an hour to be accepted for a 16,000 pound scholarship. Most other schools only review your application and, if found to be ok, will send you an offer letter inviting you to enroll. After receiving the offer letter, you can wait 1-2 months to think about whether to accept or not. Many schools only give you 1 month. If you don't accept the offer, it will automatically cancel. After accepting the offer, you must transfer a deposit (About 600-1000 pounds), this amount will be deducted from the tuition fee. 5. Get CAS, apply for Visa After receiving the deposit, the school will send you a confirmation letter called CAS (Confirmaion of Acceptance for Studies). Only with this letter can you apply for a Visa. You must also pay NHS insurance for students (about 300 USD/year) before applying for a visa. The visa application fee seems to be about 550 USD, in HCM it is more expensive than 50 USD, I don't understand why. To apply for a Visa, you need some other complicated documents: Birth certificate, household registration book. Bank balance proof, guarantee if your parents pay. Original documents submitted to the school: University degree, IELTS certificate, passport... After completing the online procedures, you need to bring all documents to VFS headquarters to continue. You need to do a short interview via Lync when applying for a Visa, the results will be available after 2 weeks. These are frequently asked questions (with my answers): 1. Why did you choose UK to study? Because UK universites rank among the best in the world and qualifications are internationally valued and recognized. When I study in the UK I can meet people from different nationalities, share their backgrounds and discover new perspectives. 2. Why did you choose this University? Lancaster University is a highly-reputed school. It ranked Không. 9 in the UK and Không.1 in the North West by the Complete University Guide, and is in the top 1% of universities globally. Moreover, I got a bursary of 16,000 pounds from this school. 3. Why did you choose this major? I studied Software Engineering at FPT University, so I want to learn more about Information Technology at higher level. The MSc International Innovation Computer Science pathway provides a unique blend of broad, contemporary academic modules and the professional training. 4. When is your course starting? On 1st October 2015 5. When you intend to travel to UK? At the end of September, maybe on 21st or 23 September 6. Have you registered for HIS (immigration healthcare service)? If yes, when? Not yet? (When will you submit this?) 5. What are the benefits from this major will bring to you or help you? It can give me the practical knowledge and vocational skills I need as a software developer. I also have the opportunity to practice the knowledge and skills I have learned through organized industrial placements and projects. 6. What is your plan in the future? After finishing the course, I will come back to Vietnam and work as a software developer, or open a start-up myself. It has been my dream since I graduated. 7. Where will be you staying in the UK? I will stay in Lancaster City. I plan to stay in the university’s accommodation. 8. Do you have relatives in UK? No 9. Do you understand all the questions I asked you? Yes, I understand. 10. How long for your degree in UK this time, and which level? Two years, level 7 11. How long did you get the offer after submitting the application? More than one month, from the beginning of April to late May 12. What kind of documents you apply to the University (school) to get the offer? Degree, Academic transcript, IELTS, CV, Personal statement, 2 reference letters, passport 13. How to accept the offer and pay the deposit? I accepted the offer by logging into the application website of the university, then click the accept offer. After that, I got the payment information, and I went to Vietcombank to pay the deposit of 750 pounds 14. What is the most recent degree you have? I got the bachelor degree of Software Engineering at FPT University in 2014 15. Did you look over Universities besides this one? Yup, I got the unconditional offer from Southamption and Royal Holloway to. 16. What was the date you sent the application? April 4th Your documents will be held by VFS for about 2 weeks. You will then receive a message notifying you of receiving your Visa. The results are sealed, so when you open the envelope and check the visa, you will know. Visa in the UK only allows students to work 20 hours/week. 6. Buy plane tickets and go. If you want to be sure about accommodation, you can go to the school's Accommodation section. Almost all schools have dormitories, the price is a bit higher than renting, but travel is more convenient. If you have friends or acquaintances, you can come over a few days early, ask to stay and then slowly look for a house, the price will be a little softer. A pretty good website to hunt for cheap airline tickets is skyscanner.net. You only need to fill in some basic information such as: Date of departure, departure point (HCM). In the UK there are only a few international airports: London, Manchester, ... if the city you study in does not have an international airport, fly to these airports and then take the train/bus back to school. All schools have airport shuttle services, remember to register in advance if you are afraid of getting lost. At this point, you probably have all the necessary information. If you want to ask more questions or have experiences or want to share, please comment on the article. If you want to know about study life in the UK, you can see my previous article. Rate this: Like this: Related
Trong khoảng thời gian gần đây, lập trình di động đang là một ngành hot. Các mẩu tin tuyển dụng gần nhất mình đọc thường tuyển Android developer, iOS developer, … với mức lương khá cao, không thua kém gì lập trình web hay lập trình hệ thống nhúng. Ngoài ra, nếu biết cách lập trình ứng dụng, bạn cũng có thể làm freelance, hoặc tự phát triển ứng dụng và kiếm tiền thông qua ứng dụng của mình. Bài viết này sẽ giúp các bạn có cái nhìn tổng quan về thị trường ứng dụng di động hiện nay, cũng như giới thiệu một số ngôn ngữ / công nghệ các bạn cần biết nếu muốn đi theo con đường này. Thế chân vạc trong trận chiến Mobile Trên thị trường ứng dụng di động hiện nay, 3 hệ điều hành chiếm thị phần cao nhất là : Android, iOS và Window phone, tiếp sau là 1 số hệ điều hành khác như BlackBerry… Trong phạm vi bài viết, mình chỉ phân tích về 3 OS đứng đầu là Android, iOS và Windows Phone nhé. Android – Kẻ chiếm miếng bánh lớn nhất Theo biểu đồ, ta dễ nhận ra Android luôn chiếm hơn 70% thị phần của mảng di động. Ứng dụng Android được viết bằng ngôn ngữ Java , do đó các bạn lập trình viên Java có thể dễ dàng chuyển hướng qua mảng này. Lập trình viên Android cũng đang là mục tiêu được các công ty săn đón. Các mẩu tin tuyển dụng Android developer chiếm tỉ trọng lớn nhất trong số các tin tuyển dụng của mảng mobile. Thuở còn làm đồ án tốt nghiệp, có 1 ông trong nhóm mình chưa biết gì về Android. Mình và ổng tự học và làm 2 tháng thực hiện đồ án, vừa xong đồ án thì ổng đi PV lập trình Android trong 1 công ty và được nhận luôn. Android có quá nhiều device với đủ kích cỡ màn hình, cùng với vô số phiên bản (Từ 2.0 cho tới 4.4). Điều này gây khá nhiều khó khăn cho lập trình viên khi viết app : Cần phải test đủ thứ, đảm bảo ứng dụng tương thích với nhiều device, không bị lỗi giao diện, v…v. Nếu bạn muốn đi theo con đường viết ứng dụng kiếm tiền, đưa ứng dụng lên Google Store, bạn sẽ phải mua 1 tài khoản Android Developer. Phí tài khoản này là 25$/năm . iOS – Vị vua không ngai Theo biểu đồ, iOS chỉ chiếm 20% thị phần, bằng 1/4 so với Android . Tuy nhiên nghe đồn là doanh thu của Apple Store lại cao hơn Google Play Store. Nguyên nhân là do người dùng iOS chơi sang hơn, chịu khó bỏ tiền mua ứng dụng hơn so với người dùng Android. Số lượng tuyển dụng iOS ít hơn Android, tuy nhiên lương cho lập trình viên iOS lại nhỉnh hơn bên Android chút đỉnh . Lý do không phải vì iOS tốt hơn Android, mà chỉ đơn thuần là qui luật cung cầu: Lập trình viên iOS hiếm hơn lập trình viên Android nên họ có giá cao hơn. Để tiếp cận iOS, bạn cần máy ảo hoặc máy Mac để cài hệ điều hành MacOS. Ứng dụng iOS được viết bằng ngôn ngữ Objective-C (Giống C nhưng có thêm OOP) hoặc Swift. Việc code và debug trên iOS phức tạp hơn Android. Bạn phải cài đặt Xcode, mua tài khoản Apple Developer mới có thể test ứng dụng và đưa ứng dụng lên Apple Store. Bộ phận kiểm duyệt của Apple Store cũng khắt khe hơn Google Play Store, nhiều khi bạn phải chờ khá lâu để ứng dụng của mình được duyệt. Nếu làm ở công ty, bạn sẽ được cũng cấp tài khoản Apple Developer cũng như device để test. Nếu muốn tự viết, bạn sẽ phải tự trả 100$/năm cho tài khoản Apple Developer, và mất thêm 1 khoản kha khá để mua thiết bị (iPhone, iPad) về test. Windows Phone – Kẻ sinh sau đẻ muộn Windows Phone đã chậm chân khi gia nhập thị trường di động, nơi Android và iOS đã làm mưa làm gió khá lâu. Mặc dù Microsoft đã có một số chính sách hỗ trợ devloper, hệ thống ứng dụng trên Window App Store vẫn còn khá nghèo nàn và nhàm chán (Mình tìm app Google Map mà còn không có). Thú thật, mình chả thấy công ty nào tuyển lập trình viên Windows Phone cả. Hầu như các công ty đều o bế cho ứng dụng trên Android, iOS trước rồi mới đến Windows Phone. Vì Windows Phone được viết bằng ngôn ngữ C# kết hợp với XAML, các lập trình viên C# có thể thử sức ở mảng này. Cá nhân mình từng code cả Android lẫn Windows Phone thì thấy Windows Phone dễ code hơn, debug nhanh và tiện hơn. Với Android, nếu không có device, ta phải debug trên máy ảo, chạy rất chậm… máy ảo của Window Phone lại rất mượt và nhanh . Nếu muốn viết app kiếm tiền, mình nghỉ các bạn nên thử Window Phone, vì những lý do sau (Nhớ cầu trời sau này Window App Store có nhiều người dùng hơn nhé, hiện tại ít người dùng nên chắc khả năng thu tiền lại cũng không cao đâu): Apple Store và Play Store đã có rất nhiều ứng dụng, tính cạnh tranh rất cao. Ngược lại, bạn ít khi gặp phải sự cạnh tranh trên Window Store. Microsoft đưa ra khá nhiều chính sách hỗ trợ Windows Phone, có thể trong tương lai sẽ thu hút nhiều người dùng hơn. Account Window Phone Developer có giá rất rẻ, chỉ có 19$ và dùng mãi mãi. Ở phần 2 , mình sẽ giới thiệu với các bạn những ngôn ngữ/framework dùng để viết 1 ứng dụng di động, cùng một số kĩ năng các bạn cần có nếu muốn theo con đường này, mong các bạn đón đọc. Rate this: Like this: Related
Recently, mobile programming is a hot industry. The most recent recruitment ads I read often recruit Android developers, iOS developers, ... with quite high salaries, not inferior to web programmers or embedded system programmers. In addition, if you know how to program applications, you can also freelance, or develop your own applications and make money through your application. This article will help you have an overview of the current mobile application market, as well as introduce some languages ​​/ technologies you need to know if you want to follow this path. The cauldron in the Mobile battle In the current mobile application market, the 3 operating systems with the highest market share are: Android, iOS and Window phone, followed by a number of other operating systems such as BlackBerry... Within the scope In this article, I only analyze the top 3 OS: Android, iOS and Windows Phone. Android - The one who occupies the largest piece of the pie According to the chart, it is easy to see that Android always accounts for more than 70% of the mobile market share. Android applications are written in Java language, so Java programmers can easily navigate through this area. Android programmers are also being sought after by companies. Android developer job postings account for the largest proportion of mobile job postings. When I was doing my graduation project, there was a guy in my group who didn't know anything about Android. He and I self-taught and worked for 2 months on the project. As soon as the project was finished, he went to work as an Android programmer in a company and was immediately accepted. Android has too many devices with all screen sizes, along with countless versions (From 2.0 to 4.4). This causes many difficulties for programmers when writing apps: Need to test everything, ensure the application is compatible with many devices, has no interface errors, etc. If you want to follow the path of writing money-making applications and uploading applications to the Google Store, you will have to buy an Android Developer account. This account fee is $25/year. iOS - The uncrowned king According to the chart, iOS only accounts for 20% of the market share, 1/4 of Android. However, rumor has it that Apple Store's revenue is higher than Google Play Store's. The reason is because iOS users are more luxurious and willing to spend money to buy applications than Android users. The number of iOS recruitment is less than Android, but the salary for iOS programmers is slightly better than Android. The reason is not because iOS is better than Android, but simply the law of supply and demand: iOS programmers are rarer than Android programmers, so they have a higher price. To access iOS, you need a virtual machine or Mac to install the MacOS operating system. iOS applications are written in Objective-C (Like C but with OOP) or Swift. Coding and debugging on iOS is more complicated than Android. You must install Xcode and purchase an Apple Developer account to be able to test the application and submit the application to the Apple Store. Apple Store's censorship department is also stricter than Google Play Store, sometimes you have to wait quite a long time for your application to be approved. If you work at a company, you will be given an Apple Developer account as well as a device to test. If you want to write it yourself, you will have to pay $100/year for an Apple Developer account, and spend a decent amount of money to buy a device (iPhone, iPad) to test. Windows Phone - A latecomer Windows Phone was slow to enter the mobile market, where Android and iOS have been dominating for quite a while. Although Microsoft has a number of devloper support policies, the application system on the Window App Store is still quite poor and boring (I searched for the Google Map app but it wasn't there). Honestly, I don't see any company hiring Windows Phone programmers. Almost all companies are focusing on applications on Android and iOS first, then Windows Phone. Because Windows Phone is written in C# language combined with XAML, C# programmers can try their hand at this field. Personally, I have coded for both Android and Windows Phone and find Windows Phone easier to code and debug faster and more convenient. With Android, if we don't have a device, we have to debug on a virtual machine, which runs very slowly... Windows Phone's virtual machine is very smooth and fast. If you want to write an app to make money, I think you should try Window Phone, for the following reasons (Remember to pray that the Window App Store will have more users in the future, currently there are few users so the ability to collect money is probably also good). not high): Apple Store and Play Store have many applications and are very competitive. On the contrary, you rarely encounter competition on the Window Store. Microsoft offers quite a few Windows Phone support policies, which may attract more users in the future. Account Window Phone Developer is very cheap, only $19 and can be used forever. In part 2, I will introduce to you the languages/frameworks used to write a mobile application, along with some skills you need to have if you want to follow this path. I hope you will read it. Rate this: Like this: Related
Bạn nào hay theo dõi blog của mình chắc cũng biết mình đã xách valy đi ngoài ra nước, nhầm, đi ra nước ngoài vào hôm 25/09. Sau gần hai năm đi làm , mình quyết định học lên Thạc Sĩ ở UK . Trong ngành IT, tấm bằng Thạc Sĩ không cải thiện được mức lương nhiều, nhưng mình thích đi để trải nghiệm. Bạn nào mong học Thạc Sĩ để lương cao hơn thì nên suy nghĩ lại nhe. Sẵn có vài bạn hỏi nên mình viết bài để chia sẻ cách tìm trường và đi du học luôn. Quá trình tìm trường, nộp hồ sơ du học cũng khá nhiều khê và phức tạp. Nhờ sự giúp đỡ, tư vấn của trung tâm tư vấn nên mình được nhận vào Đại học Lancaster (Top 10 ở UK), với học bổng 1600o bảng (gần 550tr), ngành MSc Internation Innovation (Computer Science). Mình viết bài này chia sẻ kinh nghiệm chuẩn bị, nộp hồ sơ cho các bạn có dự định đi du học (Về kinh nghiệm học tập, ôn luyện tiếng Anh thì các bạn xem bài khác nhé). Quy trình từ lúc nộp đơn tới nhập học như sau: Tổng thời gian sẽ mất khoảng 3-4 tháng. Vì các trường ở UK thường khai giảng vào tháng 9, các bạn nên bắt đầu lên kế hoạch vào tháng 4-5 là vừa. Phần một của bài viết sẽ hướng dẫn các bạn 3 bước đầu tiên trong quá trình làm thủ tục du học. 1. Chuẩn bị hồ sơ Đây là những hồ sơ các bạn cần chuẩn bị để nộp: Bằng Đại học, bảng điểm. Nếu tiếng Việt thì phải nhờ dịch vụ dịch sang tiếng Anh. Passport. Bảng điểm IELTS. Yêu cầu tiếng Anh của ngành IT tụi mình không khó lắm, chỉ cần trên 6.5 overall, cả 4 phần nghe nói đọc viết không phần nào dưới 6.0. 2 thư giới thiệu của giáo viên và cấp trên (Nếu bạn chưa đi làm thì xin 2 thư giới thiệu của 2 giáo viên cũng được). Một thư giới thiệu bản thân, do bạn tự viết để giới thiệu mình, giải thích lý do bạn chọn trường này, ngành này, dự định trong tương lai. Thư dài khoảng 2000 chữ là ok. Bạn nên scan toàn bộ các giấy tờ trên để tiện cho việc nộp online nhé. Thư giới thiệu thì bạn có thể gửi bản Word hoặc PDF, không cần in ra. 2. Chọn trường và tìm ngành học Các bạn có thể vào địa chỉ: để xem bảng xếp hạng các trường đại học ở UK ( Sao VN không có bảng xếp hạng nào như thế này nhỉ? ). Sau đó, chọn ngành mình muốn học bằng cách click vào link có tên ngành. Chia sẻ thêm là mình thấy Lancaster rank 25 ngành Computer Sciences, mình định vào trường hạng thấp để học vừa sức, dễ làm trùm. Ai ngờ Overall Rank của nó cao quá xá, lỡ đâm lao đành phải theo lao vậy. Trên bảng xếp hạng, bạn có thể bấm vào link 1 trường để xem các thông tin liên quan tới trường đó (Điểm số, hình ảnh). Các bạn nên chọn trường dựa theo kết quả học tập ở Đại học. Nếu điểm tốt nghiệp và các môn cao, bạn có thể thử sức với các trường trong top 20. Với bảng điểm vừa phải, trung bình, việc vào các trường trong top 50 cũng không quá khó. Bạn nên nhắm khoảng 5-10 trường mình thích, sau đó lên trang web của trường đó, tìm phần Postgraduate Study (Cao học). Như hình dưới là trang web của University of Exeter . Bạn nên đọc kĩ thông tin ngành học, những gì sẽ được dạy, cấu trúc môn học thế nào . Nếu thấy hứng thú với những gì có trong chương trình thì hẵng đăng kí học nhé. Hầu như các trường đều có mục Apply Online , cho phép bạn nộp hồ sơ nhập học online luôn. Nếu lười làm bạn có thể nhờ trung tâm làm hộ. Mỗi trường có 1 số học bổng riêng, tùy theo chương trình hay ngành học. Các bạn có thể tìm trang web trường với các từ khóa funding, bursary, schoolarship, … Các học bổng này thường chỉ hỗ trợ 1 phần chi phí sinh hoạt, rất hiếm học bổng toàn phần nhé. Lưu ý : Vào mùa tuyển sinh, các trường ở UK thường hay mở 1 số hội thảo du học ở VN. Nếu tham dự các hội thảo này, bạn có thể tìm hiểu về trường, trò chuyện với đại diện trường, cũng như nộp hồ sơ trực tiếp một cách nhanh chóng. Bạn hãy like page của một số trung tâm tư vấn du học trên facebook để có thêm thông tin nhé. 3. Nộp hồ sơ Như đã nói, bạn có thể nộp hồ sơ online bằng cách vào trang web của trường, bấm vào chữ Apply Online . Một số thông tin bạn cần cung cấp khi nộp hồ sơ: Ngày tháng năm sinh, họ và tên. Passport (Tên, số passport, ngày cấp, nơi cấp) và bản scan. Chứng chỉ IELTS (Tên, mã số của chứng chỉ, ngày thi) và bản scan. Trường Đại học, ngành đã học, điểm tốt nghiệp. Kinh nghiệm làm việc nếu có (Mình khuyên các bạn nên đi làm rồi hẵng học, có gì về cũng đỡ lo thất nghiệp). CV (CV dạng học thuật, ghi những môn mình đã học), đừng nhầm với Resume xin việc nhé. Bản scan 2 thư giới thiệu (Có chữ ký). Nhớ phải có logo của trường, địa chỉ mail của cty hoặc trường nhé, không được dùng mail cá nhân. Một số trường còn gửi mail xác nhận cho người viết thư. Nếu bạn nhờ sếp hay giáo viên viết thư, nhớ dặn họ check email và xác nhận giùm. Personal Statement. Đây là bức thư bạn viết để giới thiệu bản thân: Những thứ bạn đã học, kinh nghiệm đi làm, lý do bạn chọn trường và ngành, dự định trong tương lai… Mình khuyên các bạn viết sẵn một thư làm mẫu, sau đó sửa lại một chút cho phù hợp với trường muốn nộp. Bạn nào cần mẫu thư giới thiệu, personal statement có thể tham khảo của mình: . Mình nộp 15 trường và được 13 trường nhận nên chắc cũng có chút giá trị tham khảo :D. Các bạn đón xem phần 2 để xem 3 bước còn lại nhé. Rate this: Like this: Related
Those of you who follow my blog probably know that I packed my suitcase and went abroad, by mistake, on September 25. After nearly two years of working, I decided to study for a Master's degree in the UK. In the IT industry, a Master's degree doesn't improve the salary much, but I like to go and experience it. If you want to study for a Master's degree to get a higher salary, you should think again. A few people asked, so I wrote an article to share how to find a school and study abroad. The process of finding a school and applying to study abroad is quite difficult and complicated. Thanks to the help and advice of the consulting center, I was accepted into Lancaster University (Top 10 in the UK), with a scholarship of 1600 pounds (nearly 550 million), majoring in MSc International Innovation (Computer Science). I wrote this article to share my experience in preparing and submitting applications for those who plan to study abroad (For learning experiences and English practice, please see another article). The process from application to admission is as follows: Total time will take about 3-4 months. Because schools in the UK usually open in September, you should start planning in April-May. Part one of the article will guide you through the first 3 steps in the study abroad procedure. 1. Prepare documents These are the documents you need to prepare to submit: University degree, transcript. If it's in Vietnamese, you must ask for a translation service into English. Passport. IELTS score sheet. Our IT industry's English requirements are not very difficult, just above 6.5 overall, all 4 parts of listening, speaking, reading and writing are not below 6.0. 2 letters of recommendation from teachers and superiors (If you have not yet worked, you can also ask for 2 letters of recommendation from 2 teachers). A personal introduction letter, written by you to introduce yourself, explain why you chose this school, this major, and your future plans. A letter length of about 2000 words is ok. You should scan all of the above documents for ease of online submission. You can send a Word or PDF version of your recommendation letter, no need to print it. 2. Choose a school and find a major You can go to: to see the rankings of universities in the UK (Why doesn't Vietnam have any rankings like this?). Then, choose the major you want to study by clicking on the link with the major name. To share more, I saw Lancaster ranked 25th in the Computer Sciences major. I plan to go to a low-ranked school to study well and easily become a boss. Who would have thought that its Overall Rank was so high that if it crashed, it would have to follow it. On the rankings, you can click on a school's link to view information related to that school (scores, images). You should choose a school based on your academic results at University. If your graduation score and subjects are high, you can try schools in the top 20. With a moderate, average score, getting into schools in the top 50 is not too difficult. You should target about 5-10 schools you like, then go to that school's website and look for the Postgraduate Study section. As shown below is the website of the University of Exeter. You should carefully read the course information, what will be taught, and the course structure. If you are interested in what is in the program, please register. Almost all schools have an Apply Online section, allowing you to submit your admission application online. If you're lazy, you can ask the center to do it for you. Each school has its own number of scholarships, depending on the program or major. You can find the school website with the keywords funding, bursary, schoolarship, etc. These scholarships usually only support part of living expenses, full scholarships are very rare. Note: During the enrollment season, schools in the UK often open some study abroad seminars in Vietnam. If you attend these conferences, you can learn about the school, chat with school representatives, and quickly apply directly. Please like the pages of some study abroad consulting centers on Facebook to get more information. 3. Submit application As mentioned, you can submit your application online by going to the school's website and clicking Apply Online. Some information you need to provide when submitting your application: Date of birth, full name. Passport (Name, passport number, date of issue, place of issue) and scanned copy. IELTS certificate (Name, certificate code, test date) and scanned copy. University, major studied, graduation score. Work experience if any (I advise you to work first before studying, having something to return will help you avoid worrying about unemployment). CV (academic CV, recording the subjects you have studied), not to be confused with a job application Resume. Scanned copies of 2 letters of recommendation (signed). Remember to have the school logo, company or school email address, do not use personal email. Some schools also send a confirmation email to the letter writer. If you ask your boss or teacher to write a letter, remember to tell them to check their email and confirm it for you. Personal Statement. This is a letter you write to introduce yourself: What you have learned, work experience, why you chose the school and major, future plans... I advise you to write a sample letter, then Edit it a bit to suit the school you want to submit to. If you need a sample letter of introduction or personal statement, you can refer to mine: . I applied to 15 schools and was accepted by 13 schools, so it probably has some reference value :D. Please watch part 2 to see the remaining 3 steps. Rate this: Like this: Related
Như đã chia sẻ ở bài viết trước , trong năm 2016 mình sẽ dành thời gian trau dồi kĩ năng front-end , do đó số lượng các bài viết về front-end trên blog sẽ nhiều hơn một chút. Sau series C# hay ho được nhiều người đón nhận, năm nay blog sẽ có thêm series Javascript sida . Lý do là: càng học sẽ càng thấy C# nó hay ho, trong khi đó càng học lại càng thấy Javascript nó sida, bạn nào không tin cứ theo dõi series sẽ biết. Bạn nào theo dõi blog lâu cũng biết mình có một số tình cảm khá phức tạp cả yêu lẫn ghét dành cho javascript . Về bản thân ngôn ngữ , cá nhân mình thấy nó là một ngôn ngữ trời đánh, khá sida, làm bao nhiêu lần mình phải thốt lên đ.m hay WTF khi học. Javascript vốn được thiết kế một cách tạm bợ thô sơ , dùng để validate ở client side (Bạn nào tò mò muốn biết thêm về lịch sử của js có thể đọc thêm cuốn Professional JavaScript for Web Developers ). Song chẳng hiểu duyên trời đưa đẩy thế nào, JavaScript cùng với PHP lại trở thành hai ngôn ngữ được sử dụng ở khắp mọi nơi, dù hứng chịu biết bao gạch đá. Tuy ghét thì ghét, đã theo nghiệp web developer thì trước sau gì cũng phải làm việc hằng ngày với js. Bản thân js tuy xấu, nhưng nó lại đi kèm vô số thư viện/framework cực kì hay vào hữu ích (jQuery, AngularJS, …), nhờ NodeJS nó còn lấn sân qua luôn cả back-end. Do đó học và thuần thục JS chẳng bao giờ thiệt cả. Nhận ra vốn kiến thức về js của mình còn đôi chỗ lủng củng và thiếu sót, trong series Javascript sida mình sẽ viết bài chia sẻ về một số khái niệm từ đơn giản đến phức tạp trong js, vừa củng cố kiến thức của mình, vừa giúp ích cho các bạn. Ở bài đầu tiên, mình sẽ giới thiệu kiến thức cơ bản nhất trong JavaScript: object. Object là khỉ gì? Ai từng học qua môn Lập trình hướng đối tượng đều biết đến các khái niệm Class và Object (Có thể xem lại ở đây: ). Tuy nhiên, trong JavaScript không có Class mà chỉ có Object, do đó sẽ khiến một số bạn cảm thấy khó hiểu (Đấy, mình đã nói bao nhiêu lần là js nó sida rồi mà). Trong các ngôn ngữ OOP như C++, Java, C#, … Có thể tạm hiểu Class chính là cái khung, còn Object là vật thể tạo ra dựa vào cái khung đó. Js không có class, ta có thể khởi tạo 1 object mà không cần xác định class của nó, có thể hiểu toàn bộ object đều có class chung là Object . Ta có thể hiểu một object là một tập hợp các trường dữ liệu (property) và các hàm (method). Như ví dụ dưới đây, object Student có 2 trường là firstName và lastName, có hàm showName Khởi tạo object thế éo nào Trong một số ngôn ngữ khác, để khởi tạo object, ta dùng từ khóa new + tên class. Tuy nhiên, do trong JavaScript không có khái niệm class, ta có thể tạo object theo 1 trong 2 cách sau. Cách khởi tạo object bằng Object Literal thường được sử dụng nhiều hơn. Với các ứng dụng đơn giản, ta có thể tạm dùng 2 cách này. Tuy nhiên, với một số bài toán phức tạp hơn, nếu dùng object literal mỗi lần khởi tạo object sẽ khiến code dài và trùng lặp (Lần nào cũng phải khai báo lại các property và method). Để giải quyết vấn đề này, người ta sử dụng một pattern gọi là Constructor pattern. Một function sẽ đóng vai trò constructor để khởi tạo object (Cách này na ná khai báo class trong các ngôn ngữ khác). Một cách khác cũng hay được sử dụng đó là dùng prototype (Mình sẽ nói kĩ hơn về prototype trong những bài sau), nhưng mình thấy đa phần người ta sử dụng Constructor pattern nhiều hơn. Nghịch ngợm với object Để truy xuất một trường/hàm của object, ta có thể dùng dấu . (dot notation) và dấu [] (bracket notation). Dot notation thường được sử dụng nhiều hơn, nhưng bracket notation có thể làm được nhiều trò hay hơn. Để duyệt qua toàn bộ các trường của một object, ta chỉ cần dùng hàm for đơn giản Với các ngôn ngữ static typing như C#, Java, một object được khởi tạo dựa trên class, do đó chúng luôn có các trường và hàm cố định. Tuy nhiên, do JavaScript là ngôn ngữ dynamic typing, ta có thể dễ dàng thêm/xóa các trường trong code Để giao tiếp với server, JavaScript thường submit dữ liệu dưới dạng pair-value (thông qua form) hoặc JSON. Do đó, javascript hỗ trợ sẵn việc chuyển object sang chuỗi JSON và ngược lại Qua bài viết này, các bạn đã có cái nhìn tổng quát về object trong JavaScript. Do sự sida của nó, việc hiện thực các đặc tính của OOP như inheritance, encapsulation, polymophism trong js khá rắc rối và phức tạp. Các bạn hãy đón xem trong bài viết sau về OOP trong JavaScript nhé. Bạn nào từng học Java có thể xem thử bài này: . Bài viết có tham khảo từ nguồn tiếng Anh tại: . Rate this: Like this: Related
As shared in the previous article, in 2016 I will spend time honing my front-end skills, so the number of front-end articles on the blog will be a bit more. After the cool C# series that was well received by many people, this year the blog will have a Javascript sida series. The reason is: the more you learn, the more interesting C# becomes, while the more you learn, the more you realize Javascript is bad. If you don't believe it, just follow the series and you'll know. Anyone who has followed the blog for a long time knows that I have some pretty complicated love and hate feelings for javascript. Regarding the language itself, I personally find it to be a heavenly language, quite sida, how many times have I had to say "damn" or "WTF" while learning. Javascript was originally designed in a rudimentary way, used for validation on the client side (If you are curious to know more about the history of js, you can read the book Professional JavaScript for Web Developers). But somehow, JavaScript and PHP became two languages ​​used everywhere, despite receiving so much criticism. Even though I hate it, if I pursue a career as a web developer, I will eventually have to work every day with js. js itself is ugly, but it comes with countless extremely good and useful libraries/frameworks (jQuery, AngularJS, ...), thanks to NodeJS it also encroaches on the back-end. Therefore, learning and mastering JS is never a loss. Realizing that my knowledge of js is still lacking in some places, in the Javascript sida series, I will write an article to share some concepts from simple to complex in js, while consolidating my knowledge. Just helpful for you. In the first lesson, I will introduce the most basic knowledge in JavaScript: objects. What the hell is an Object? Anyone who has studied Object-Oriented Programming knows the concepts of Class and Object (Can be reviewed here: ). However, in JavaScript there is no Class but only Object, so it will make some of you feel confused (See, how many times have I said that js is sida). In OOP languages ​​such as C++, Java, C#, ... It can be temporarily understood that Class is the frame, and Object is the object created based on that frame. Js does not have a class, we can initialize an object without determining its class, it can be understood that all objects have a common class, Object . We can understand an object as a collection of data fields (properties) and functions (methods). As in the example below, the Student object has two fields: firstName and lastName, with a showName function How to initialize an object? In some other languages, to initialize an object, we use the keyword new + class name. However, because in JavaScript there is no concept of class, we can create objects in one of the following two ways. The Object Literal method of initializing objects is more commonly used. For simple applications, we can temporarily use these two methods. However, with some more complex problems, if you use an object literal each time you create an object, it will make the code long and repetitive (you have to re-declare properties and methods every time). To solve this problem, people use a pattern called the Constructor pattern. A function will act as a constructor to initialize the object (This is similar to declaring a class in other languages). Another commonly used way is to use prototypes (I will talk more about prototypes in the following articles), but I see that most people use the Constructor pattern more. Playing around with objects To access a field/function of an object, we can use the . (dot notation) and [] (bracket notation). Dot notation is more commonly used, but bracket notation can do more cool tricks. To iterate through all the fields of an object, we just need to use a simple for function With static typing languages ​​like C# and Java, an object is initialized based on the class, so they always have fixed fields and functions. However, because JavaScript is a dynamic typing language, we can easily add/remove fields in the code To communicate with the server, JavaScript often submits data as pair-value (through form) or JSON. Therefore, javascript supports converting objects to JSON strings and vice versa Through this article, you have an overview of objects in JavaScript. Due to its shortcomings, implementing OOP features such as inheritance, encapsulation, and polymophism in js is quite complicated and complicated. Please look forward to the following article about OOP in JavaScript. Anyone who has ever learned Java can try this article: . The article has references from English sources at: . Rate this: Like this: Related
Đầu tháng 6/2015 – Một tháng đầy biến động Tiếp theo phần 1 . Thiếu người, mình bị “ép” phải dựng toàn bộ wireframe, giao diện cho dự án Claimbook. Đúng là làm super junior nó khổ thế. Một lần nữa, anh H. lại tỏa sáng với khả năng ngoại giao của mình. Anh đã “lôi kéo” được một bác Technical Lead và 2 developer mới vào team. Anh còn dụ dỗ được team designer tham gia vào quá trình thiết kế cho dự án. Leader Team Designer là anh Sơn Đoàn – người yêu của Adrian Anh Tuấn. Trông anh Sơn đẹp trai và manly hơn ông Team Leader của mình cả chục lần . Suốt 2 tháng trời, cả nhóm dồn tâm sức làm prototype cho dự án Claimbook. Team cũng tổn thất khá nhiều. Anh technical lead do thái độ làm việc không ok, không phù hợp với văn hóa công ty, vào team mình được 1 tháng đã phải chuyển qua team khác, rồi nghỉ việc ngay sau đó vài tuần. Design của dự án cũng bị thay đổi xoành xoạch theo yêu cầu của khách hàng, team mình cũng ngại không dám liên hệ lại với team designer vì sợ bị chửi do tự ý sửa lung tung design của họ. Thay mặt anh H., xin gửi lời cảm ơn đến anh Sơn Đoàn đẹp trai, cùng toàn thể các bạn trong team designer đã góp phần vào thành công của dự án. Thấy team em được khen nhiều mà không nhắc đến các đóng góp của team anh nên cũng hơi cắn rứt. Đầu tháng 8/2015 – Nghỉ việc, tăng lương và cách xử sự của người lãnh đạo Vào khoảng tháng 5, mình cũng đã chia sẻ với anh Team Lead về ý định đi du học vào cuối năm, để tiện cho việc sắp xếp nhân sự. Mặc dù khá tiếc nuối nhưng anh vẫn ủng hộ lựa chọn của mình. Cuối tháng 7, đầu tháng 8, công ty bắt đầu xét tăng lương. Mấy thằng bạn mình ở team khác được tăng cũng kha khá. Anh H. Team Lead khá khó xử khi phải giải thích với mình rằng: Do mình sắp nghỉ, mình được thăng chức lên Software Engineer , không được tăng lương, để phần đó lại cho các bạn. Cảm thấy vừa buồn vừa hụt hẫng, mình viết một bức tâm thư gửi anh Manager và anh Team Leader (Thư dài nên mình tóm tắt nhé). Chào hai anh, anh H. đã có chia sẻ với em về việc em được promote lên vị trí Software Engineer và không tăng lương. Em rất hiểu và thông cảm lý do mà hai anh đưa ra quyết định này: Em cũng hiểu anh H. rất khó xử khi phải giải thích chuyện này cho em; anh K. chắc cũng phải đắn đo khi đưa ra quyết định này. Tuy nhiên, bản thân em cảm thấy rất buồn và thất vọng vì nhiều lý do sau: … Vì vậy, em mong hai anh có thể xem lại kết quả Performance Review của em, hoặc có cách gì compensate cho em đỡ cảm thấy thiệt thòi. Cảm ơn hai anh vì đã đọc. Chúc hai anh có ngày cuối tuần vui vẻ. Ngẫm lại, mình thấy mình kiềm chế cảm xúc khá tốt, không bù lu bù loa lên. Mình hiểu rằng ở vị trí Manager, có lúc phải đưa ra những quyết định thiệt thòi cho một cá nhân, để giữ lợi ích công ty và tập thể . Do đó mình cố gắng lịch sự khi viết thư, thử đặt mình vào vị trí của họ. Kinh nghiệm mình muốn chia sẻ là: Quan hệ và thương hiệu bản thân là những thứ rất khó xây dựng, đừng vì cảm xúc nhất thời mà hành động nông nổi rồi làm mất cả hai . Ngay chiều hôm sau , mình được anh team lead và chị S. Manager rủ đi cafe nói chuyện, chia sẻ chân thành. Lần đầu mình được nhận lời xin lỗi chân thành của cấp trên “ vì đã quên consider suy nghĩ của em khi đưa ra quyết định “. Mình cũng được nghe chị S. Manager chia sẻ về việc các công ty VN đối xử không tốt với người sắp nghỉ. Bản thân công ty cũng đã cố gắng thăng chức cho mình để khen ngợi những đóng góp của mình. Chỉ riêng việc Team Leader và Manager chịu bỏ thời gian ra giải thích , chia sẻ với junior như mình cũng làm mình cảm thấy được tôn trọng rất nhiều. Tới hôm 1/9/2015, trong cuộc họp toàn công ty, mình được tuyên dương và tặng quà chia tay. Chưa bạn nào rời công ty lại có được đãi ngộ như vậy. Mình cũng hiểu là budget của công ty có hạn, anh H. Team Lead và anh K. Manager phải trích budget riêng để có quà cho mình, để mình cảm thấy được coi trọng, có thể ngẩng cao đầu tự hào khi rời khỏi công ty. Cảm ơn tình cảm và sự quan tâm mà 2 anh đã dành cho em. (Tai nghe AKG nghe sướng lắm các bạn ạ). Gần 1 năm đã qua, buồn vui cũng nhiều. Khả năng code của mình cũng tiến bộ đáng kể. Mình cũng quan sát và học hỏi được rất nhiều về cung cách lãnh dạo, quản lý nhờ quan sát anh H., anh K. và các anh team leader khác. Cảm ơn các anh đã giúp đỡ em trên quãng đường này. ASWIG, hẹn gặp lại. P/S: Quảng cáo một chút: Công ty của mình đang tuyển nhiều vị trí như Dev/QA. Một năm được tận 20 ngày phép, 10 ngày nghỉ ốm, đi Company Trip nước ngoài. Thời gian làm việc flexible, ngày đủ 8 tiếng là được. Lương thưởng và các chính sách khác cũng rất khá. Không tin thì các bạn xem quảng cáo sẽ thấy: . Bạn nào muốn gia nhập cứ gửi CV cho mình tại nhé, nếu được nhận mình sẽ chia hoa hồng cho. Rate this: Like this: Related
Early June 2015 – A month full of upheavals Continued from part 1. Lacking people, I was "forced" to build the entire wireframe and interface for the Claimbook project. It's true that being a super junior is so difficult. Once again, Mr. H. shined with his diplomatic abilities. He "attracted" a Technical Lead and 2 new developers to the team. He also enticed the designer team to participate in the design process for the project. Team Designer Leader is Mr. Son Doan - Adrian Anh Tuan's lover. Mr. Son looks ten times more handsome and manly than his Team Leader. For 2 months, the whole group focused their efforts on making a prototype for the Claimbook project. The team also lost quite a lot. The technical lead had a bad working attitude and didn't fit the company culture. After 1 month of joining my team, he had to move to another team, then quit a few weeks later. The design of the project was also constantly changed according to the customer's request. Our team was also hesitant to contact the designer team again for fear of being scolded for arbitrarily changing their design. On behalf of Mr. H., we would like to thank the handsome Mr. Son Doan, along with everyone in the design team who contributed to the success of the project. Seeing that your team was praised a lot without mentioning my team's contributions, I felt a bit guilty. Early August 2015 - Quit job, salary increase and leader's behavior Around May, I also shared with the Team Lead about my intention to study abroad at the end of the year, to facilitate staff arrangements. the. Although quite regretful, he still supports his choice. At the end of July and beginning of August, the company started considering salary increases. My friends on other teams got quite a bit of increase. Mr. H. Team Lead was quite awkward when he had to explain to me: Because I was about to quit, I was promoted to Software Engineer, without a salary increase, leaving that part to you guys. Feeling both sad and disappointed, I wrote a letter to the Manager and Team Leader (It's a long letter so I'll summarize it). Hello guys, Mr. H. shared with me about the fact that I was promoted to the position of Software Engineer and did not get a salary increase. I very much understand and sympathize with the reasons why you two made this decision: I also understand that Mr. H. is very awkward when having to explain this to me; Mr. K. must have hesitated when making this decision. However, I personally feel very sad and disappointed for the following reasons: ... Therefore, I hope you two can review my Performance Review results, or is there any way to compensate me so I don't feel disadvantaged? . Thank you both for reading. Hope you both have a nice weekend. Looking back, I see that I controlled my emotions quite well and did not overcompensate. I understand that in a Manager position, there are times when you have to make decisions that are disadvantageous for an individual, to preserve the company and collective interests. Therefore, I try to be polite when writing letters, trying to put myself in their shoes. The experience I want to share is: Relationships and self-branding are very difficult things to build, don't act rashly because of temporary emotions and lose both. The next afternoon, I was invited by the team lead and Ms. S. Manager to go to coffee to talk and share sincerely. For the first time, I received a sincere apology from my superior "for forgetting to consider my thoughts when making decisions". I also heard Ms. S. Manager share about Vietnamese companies not treating people who are about to leave well. The company itself also tried to promote me to praise my contributions. Just the fact that the Team Leader and Manager took the time to explain and share with juniors like me makes me feel very respected. On September 1, 2015, at a company-wide meeting, I was praised and given a farewell gift. No one leaving the company has ever received such treatment. I also understand that the company's budget is limited, Mr. H. Team Lead and Mr. K. Manager have to set aside their own budget to have gifts for me, so that I feel valued and can hold my head high and proud when I leave the company. ty. Thank you for the love and care you two have given me. (AKG headphones sound great, guys). Nearly a year has passed, there are many joys and sorrows. My coding ability also improved significantly. I also observed and learned a lot about leadership and management by observing Mr. H., Mr. K. and other team leaders. Thank you for helping me on this journey. ASWIG, see you soon. P/S: A little advertisement: My company is recruiting many positions such as Dev/QA. 20 days of vacation per year, 10 days of sick leave, and company trip abroad. Flexible working hours, 8 hours a day is fine. Salary, bonus and other policies are also very good. If you don't believe it, watch the ad and you'll see: . If you want to join, just send me your CV here. If accepted, I will give you a commission. Rate this: Like this: Related
Ngày 4 tháng 9 năm 2015, mình chính thức nghỉ việc tại Aswig Solutions để bước trên một con đường mới – du học 2 năm ở UK tại Đại Học Lancaster . Bài viết này là đôi dòng tâm sự kể về một năm làm việc của mình ở đây: Buồn ít, Vui nhiều, học được vô số điều bổ ích về technical và cách hành xử trong công việc. Cuối tháng 9/2014 – Bị phỏng vấn như super junior Nộp CV vào công ty với vị trí Junior Developer, mình “được” 2 ông anh team leader phỏng vấn tới tận hơn 1 tiếng rưỡi (100% tiếng Anh), junior mà hỏi đủ thứ: C# , Linq , MVC, Entity Framework, Database, Front-end (HTML, CSS, Javascript ), OOP, Design Pattern , … riết rồi cứ tưởng tuyển siêu nhân chứ không phải junior gì hết. Sau vòng 1 căng thẳng, mình được vào nói chuyện nhẹ nhàng với anh K. Manager (Trong lòng chắc mẩm là đã đậu). Đến bây giờ mình vẫn ấn tượng câu hỏi “ Em nghĩ 3 điều gì là quan trọng nhất đối với developer? “. Sau này, mình mới biết vòng 2 là vòng đánh giá thái độ làm việc và tính cách, suýt nữa chém lung tung là rớt rồi. Sau khi deal lương, mình được hẹn phỏng vấn thêm lần 3 với Technical Manager nước ngoài – miếng ăn đến tận miệng còn chưa ăn được , trời ạ =_=. Cũng may là mọi chuyện đều suôn sẻ, đầu tháng 10 mình bắt đầu đi làm , với mức lương khá cao so với mặt bằng junior nói chung (8 chữ số). Công bằng mà nói, công ty khá là rộng rãi với nhân viên. Trong 2 tháng thử việc mình vẫn được tính 100% lương , còn được khám bệnh miễn phí. Cuối tháng 12 anh Manager vẫn xét thưởng tháng 13, được gần nửa tháng lương tiền thưởng :3 (Làm nguyên năm là được 2 tháng :o). Nghe đồn là anh Manager được thưởng nhiều quá, tiền đóng thuế đủ mua được cả 1 con xe tay ga… Đầu tháng 10/2014 – Chập chững vào công ty, bị ma cũ “ăn hiếp” Ngày đầu tiên đi làm, mình được anh Phóng – một anh cùng team hướng dẫn cài đặt máy, chỉ chỗ ăn này nọ (Công ty có hệ thống buddy, người mới gia nhập sẽ được “buddy” hướng dẫn và giới thiệu). Đến trưa, mình được anh H. Team Leader dắt đi ăn trưa (free). Tính mình dễ lắm, ai bao mình ăn là mình thương liền à. Quy định của công ty là phải sử dụng tiếng Anh trong công việc. Mới đầu mình cũng hơi ngộp, vì thấy vài ông du học về hoặc phát âm như gió, lúc họp hành thì chẳng nghe được khách hàng nói gì. Sau 2 tuần mình mới tập thành thói quen và thích nghi được. Mình lại ngồi đối diện anh Manager nên không dám ho he nhiều. Ngày xưa đi làm hôm nào mình cũng xem webtretho, vozforum, kenh14… Từ hồi qua đây, sáng nào mình cũng chỉ dám vào , , , , … Mình được assign vào team Foundation, một team chuyên lo việc authentication và authorization cho các ứng dụng khác của công ty. Phase 1 của dự án không thành công lắm, và anh H. đã phải có một quyết định đau thương và táo bạo: Đập nguyên phase 1, làm phase 2 lại từ đầu . Team ban đầu có 3 người, về sau thêm được 1 người nữa là 4. Nhờ khả năng kĩ thuật xuất chúng của các thành viên, và khả năng chém gió “thần sầu” của anh team leader, project đã thành công mĩ mãn . Kể chút về anh team leader của mình. Anh tên Hưng, gốc Hà Nội. Nghe đồn gia đình anh cũng thuộc hàng “có số” ở đấy. Do anh dụ dỗ một bé tiểu thư con giang hồ ngoài đấy, sống thử 4 năm mà không chịu cưới. Bị trùm giang hồ bắt cưới nhưng anh không chịu, trốn Hà Nội để vào HCM lập nghiệp. Mỗi lần ngồi bên bàn nhậu, anh lại kể về chiến tích ngày xưa của mình. Với tài năng xuất sắc và vẻ ngoài sáng chói , anh đã “bị” đưa lên báo để quảng bá cho công ty: . Giữa tháng 4/2015 – Company trip, Thái Lan vẫy gọi Mỗi năm công ty tổ chức company trip 1 lần, hầu như lần nào cũng đi nước ngoài. Kì này cả công ty được qua Thái Lan chơi, ngắm voi sẵn tiện chuyển giới luôn thể. Ở Bangkok 3 ngày nên mình cũng không đi chơi được gì nhiều. Các bố trong công ty rủ nhau đi “ mát xa tới Z ” bên Thái cho biết, nhưng nghe giá gần 1 củ rưỡi nên ông nào cũng tặc lưỡi: Thôi để tiền đó về Việt Nam rồi đi . Đến hôm cuối cùng, mấy ông trong team rủ nhau đi mua quà cho vợ, ông nào ông nấy xách nguyên vali vài chục kg về. Ngẫm lại mới thấy có vợ cũng chẳng sung sướng gì. Chuyện bên lề: Nhờ chuyến company trip này mà mình dụ dỗ được một bạn nữ khá xinh bên bộ phận Kế Toán của công ty. Chuyện riêng tư nên nói vậy cho các bạn thèm thôi :-“. Đầu tháng 5/2015 – Buồn thay chuyện kẻ ở người đi Sau chuyến đi Thái Lan, nhờ khả năng ngoại giao xuất chúng, anh H. đã lấy một dự án khá béo bở về cho team, mang tên Claimbook. Anh Sơn – thành viên thứ 4 của team lại quyết định nghỉ việc, qua Singapore làm… rửa chén cho 1 phòng lab ở bên đó (Nghe đồn lương cao đến hơn 4.000 đô Sing). Anh Sơn là cựu sinh viên – trợ giảng trường Bách Khoa . Khả năng technical của anh cũng rất khá, nhưng lúc nào anh cũng bảo: Cỡ anh chỉ là cắc ké ở BK thôi. Mình nhủ thầm: Cắc ké ở BK mà cỡ này, dân BK chắc ghê gớm lắm . Tới lúc thấy ổng show bằng Giỏi mới biết mình bị lừa, hóa ra trên đời không tin ai cho được =_=. Thiếu anh Sơn, đội ăn-nhậu-mát-xa mất đi một thành viên cộm cán, ai cũng buồn rười rượi…. Còn tiếp phần 2 . Rate this: Like this: Related
On September 4, 2015, I officially quit my job at Aswig Solutions to step on a new path - studying abroad for 2 years in the UK at Lancaster University. This article is a couple of lines about my year working here: A little sad, a lot of fun, I learned countless useful things about technique and how to behave at work. Late September 2014 - Interviewed as a super junior. Submitted my CV to the company as a Junior Developer. I was interviewed for more than 1 and a half hours (100% English) by the team leader. The junior asked questions. everything: C#, Linq, MVC, Entity Framework, Database, Front-end (HTML, CSS, Javascript), OOP, Design Pattern, ... so hard I thought I was hiring superheroes, not juniors at all. After the stressful first round, I was allowed to talk gently with Mr. K. Manager (in my heart I was sure I had passed). Until now, I'm still impressed by the question "What 3 things do you think are most important for developers?" “. Later, I found out that round 2 is the round to evaluate work attitude and personality. I almost failed by slashing around. After negotiating the salary, I was scheduled for a third interview with a foreign Technical Manager - I couldn't even eat enough to eat, oh my god =_=. Luckily everything went smoothly, in early October I started working, with a salary that is quite high compared to junior level in general (8 digits). To be fair, the company is quite generous with its employees. During the 2-month probationary period, I still received 100% of my salary and also received free medical examination. At the end of December, the Manager was still considered for the 13th month bonus, and received nearly half a month's salary as bonus :3 (If he worked a whole year, he would get 2 months :o). Rumor has it that the Manager got a lot of bonuses, enough tax money to buy a scooter... Early October 2014 - When I first joined the company, I was "bullied" by my ex's ghost. The first day of work, I got Mr. Phong - a member of the team who guides the installation of the machine, shows this and that place to eat (The company has a buddy system, new people who join will be guided and introduced by a "buddy"). At noon, I was taken to lunch by Team Leader H. (free). My personality is very easy, whoever tells me to eat makes me love him immediately. Company policy is to use English at work. At first, I was a bit suffocated, because I saw some men returning from studying abroad or speaking like the wind. During meetings, I couldn't hear what customers were saying. After 2 weeks, I got into a habit and adapted. I sat opposite the Manager so I didn't dare to cough too much. In the past, when I went to work every day, I would look at webtretho, vozforum, kenh14... Since then, every morning I only dare to go to , , , , ... I was assigned to the Foundation team, a team specializing in authentication and authorization for applications. other company uses. Phase 1 of the project was not very successful, and Mr. H. had to make a painful and bold decision: Destroy phase 1 and start phase 2 from scratch. The original team had 3 people, later adding 1 more person to make it 4. Thanks to the outstanding technical abilities of the members, and the team leader's "magical" ability to gossip, the project was a great success. Tell me a little about your team leader. His name is Hung, originally from Hanoi. Rumor has it that his family is also "someone" there. Because he seduced a young lady out there, living together for 4 years without getting married. Being forced to marry by a gangster, he refused and fled Hanoi to go to Ho Chi Minh City to start a business. Every time he sits at the drinking table, he talks about his past achievements. With excellent talent and brilliant appearance, he was "put" in the newspaper to promote the company: . Mid-April 2015 - Company trip, Thailand beckons. Every year the company organizes a company trip, almost every time going abroad. This time the whole company went to Thailand to see elephants that were ready to change gender. I was in Bangkok for 3 days so I didn't get to go out much. The fathers in the company invited each other to "massage to Z" in Thailand, but when they heard the price was nearly 1 and a half bulbs, they all clicked their tongues: Let's put that money back in Vietnam and go. On the last day, several men in the team invited each other to go buy gifts for their wives, each of them carrying an entire suitcase of several dozen kilograms. Looking back, I see that having a wife is not fun at all. Side story: Thanks to this company trip, I seduced a pretty girl from the company's Accounting department. It's a private matter, so I'll just say it for you guys :-". Early May 2015 - Sad story about those who stay and those who leave. After the trip to Thailand, thanks to his outstanding diplomatic skills, Mr. H. took a quite lucrative project for the team, called Claimbook. Mr. Son - the 4th member of the team decided to quit his job and go to Singapore to work... washing dishes for a lab there (Rumor has it that the salary is higher than S$4,000). Mr. Son is a former student - teaching assistant at Polytechnic School. His technical ability is also very good, but he always says: I'm just a kid at BK. I thought to myself: If the situation in BK is like this, the people of BK must be very terrible. It wasn't until I saw him show with Gioi that I realized I was being deceived, it turns out I can't trust anyone in this world =_=. Without Mr. Son, the dining, drinking, and massage team lost a valuable member, everyone was very sad... Continued part 2. Rate this: Like this: Related
Nhân dịp Microsoft ra mắt Window 10, khai tử IE và khai sinh trình duyệt Edge, mình viết bài này như một bài văn phúng điếu cho cuộc đời “lên voi xuống chó” của IE. Xem biểu đồ, ta thấy thị phần của IE bị Firefox và Chrome cạp dần. Có thật sự lý do chỉ là vì IE chậm, còn FF và Chrome nhanh và ổn định hơn? Thật ra, có một câu chuyện thú vị đằng sau sự căm thù của người dùng + developer dành cho IE đấy. Ngày xửa ngày xưa, có 1 trình duyệt tuyệt dzời tên là IE… IE bị mang tiếng là một trình duyệt chậm chạp, lạc hậu và nhiều lỗi. Thế nhưng không ai biết, nó từng có một quá khứ huy hoàng, mở đường cho bao nhiêu sáng tạo trên nền Web. 1996 – IE3 : IE3 là trình duyệt đầu tiên hỗ trợ CSS (Ghê chưa :o), ActiveX control, Java applet. 1997 – IE4: Ra mắt một engine render siêu nhanh. Hỗ trợ HTML động, Javascript có thể xử lý, chỉnh sửa HTML. IE4 còn cross-platform, chạy được trên Mac OS, Solaris và Windows. 1999 – IE5 : Microsoft đã phát minh ra Ajax (Ngạc nhiên chưa :o). Phiên bản này đã giới thiệu XMLHttpRequest trong Javascript, công nghệ nền tảng cho Ajax ngày nay. Giai đoạn 1996-1999, IE đã thổi một làn gió mới vào nền tảng Web. Để cạnh tranh với Netscape, các phiên bản IE ngày càng nhanh, nhiều chức năng và ổn định hơn, trở thành trình duyệt dẫn đầu thị trường. Thế rồi, đời ai học được chữ ngờ …. Khi Microsoft ngủ quên trên chiến thắng Một ngày đẹp trời nọ, Microsoft quyết định tích hợp IE làm trình duyệt mặc định cho Windows, nhằm hất cẳng Netscape khỏi cuộc chiến trình duyệt. Người dùng không thể gỡ bỏ IE, cảm thấy Microsoft chơi xấu và dần dần ghét Microsoft. Tuy nhiên mọi chuyện chưa dừng lại ở đây. Ngủ quên trên chiến thắng: Năm 2001, với sự ra mắt của IE6, IE đã chiếm lĩnh 95% thị phần trình duyệt Web. Không còn đối thủ cạnh tranh, các lập trình viên IE chẳng còn gắng sức cải thiện và phát triển IE nữa (Thế mới buồn). IE không được nâng cấp gì trong vòng 5 năm, kể cả sau khi Firefox ra đời. Hậu quả của “sáng tạo”: Microsoft đã cố gắng bổ sung vô số chức năng và IE, cái giá phải trả là trình duyệt này không đáp ứng được nhiều chuẩn trong nền tảng Web. Khi IE còn độc bá thị trường, các chuẩn này không quan trọng lắm. Khi FF và Chrome nhảy vào cuộc chơi, điểm yếu của IE bắt đầu lộ rõ. Chậm chạp và cứng nhắc: IE6 bị bỏ bê với vô số lỗi cùng lỗ hổng bảo mật không được sửa. Mãi đến 6 năm sau, IE7 mới ra đời, thêm 1 số chức năng nho nhỏ, vẫn không đáp ứng chuẩn, và chỉ tạo thêm việc cho developer. Gần 3 năm sau, IE8 ra đời, có thể xem nó là một trình duyệt kha khá. Tuy nhiên, lúc này, đa số mọi người đã rục rịch chuyển qua FF hoặc Chrome hết cả rồi. Lý do dân lập trình thù ghét IE Làm việc với IE là một cực hình: Hãy tưởng tượng, bạn phải code/design 1 trang web. Bạn bỏ 1 tiếng đồng hồ để test trên FF, Chrome, Safari, tất cả đều chạy ok. Bạn mở trang web đó trên IE6, IE7 và web “bể banh xác”. Bạn phải mất 1 tiếng để fix cho web chạy ok trên IE7, rồi mất thêm 1 tiếng nữa để fix trên IE6. Lý do đã nói phía trên, IE không tuân theo 1 số chuẩn của nền tảng web. Bạn phải tốn gấp 3 thời gian để hoàn thành công việc, vì 2 cái trình duyệt “khốn khiếp”. Là một lập trình viên, liệu bạn có “thích” IE nổi không? IE ở khắp mọi nơi: Cách đây mấy năm, hầu như các máy tính đều xài IE, một số trang web chỉ chạy được với IE. IE lại còn nằm chình ình trong Windows, không gỡ bỏ được. Việc bị ép buộc dùng IE mọi lúc mọi nơi làm cho IE “xưa đã bị ghét nay còn bị ghét hơn”. Tương lai nào cho IE Mặc dù các bản IE10, IE11 chạy khá nhanh, tuân theo các chuẩn trên Web, IE vẫn bị người dùng thờ ơ lạnh nhạt. Trước tình cảnh này, Microsoft đã “thí quân giữ tướng”, khai tử IE và khai sinh trình duyệt Spartan (Sau này nó cũng chìm nghỉm luôn). Thị phần trình duyệt đã gần như bị Chrome và Firefox chiếm giữ. Cũng phải khen lại Microsoft một tí. Với phiên bản Windows 10, Microsoft vừa giới thiệu trình duyệt Microsoft Edge mới, với lời quảng cáo “Nhanh hơn Chrome”. Mình có dùng thử thì thấy giao diện khá đẹp, rất nhanh. Hi vọng rằng Edge có thể lấy lại được hào quang đã mất của bậc đàn anh IE xưa kia. Bài viết có tham khảo từ nguồn: Rate this: Like this: Related
On the occasion of Microsoft launching Window 10, killing IE and giving birth to Edge browser, I wrote this article as a eulogy for IE's "up and down" life. Looking at the chart, we see that IE's market share is gradually being eaten up by Firefox and Chrome. Is it really just because IE is slow, while FF and Chrome are faster and more stable? Actually, there's an interesting story behind the user + developer hatred for IE. Once upon a time, there was a great browser called IE... IE was notorious for being a slow, outdated, and buggy browser. But no one knows, it once had a glorious past, paving the way for many innovations on the Web. 1996 – IE3: IE3 is the first browser to support CSS (Wow :o), ActiveX control, Java applets. 1997 – IE4: Launch of a super-fast rendering engine. Supports dynamic HTML, Javascript can process and edit HTML. IE4 is also cross-platform, running on Mac OS, Solaris and Windows. 1999 – IE5 : Microsoft invented Ajax (Surprise :o). This release introduced XMLHttpRequest in Javascript, the technology that underpins today's Ajax. During the period 1996-1999, IE blew a new breeze into the Web platform. To compete with Netscape, IE versions became faster, more functional and more stable, becoming the market leader. Then, in life, who learns the word doubt... When Microsoft rested on its laurels One fine day, Microsoft decided to integrate IE as the default browser for Windows, aiming to oust Netscape from the browser war. Users cannot uninstall IE, feel that Microsoft plays a bad role and gradually hate Microsoft. However, things don't stop here. Resting on victory: In 2001, with the launch of IE6, IE dominated 95% of the Web browser market share. With no more competitors, IE programmers no longer try to improve and develop IE (That's sad). IE has not been upgraded for 5 years, even after Firefox was released. Consequences of "innovation": Microsoft has tried to add countless functions to IE, the price to pay is that this browser does not meet many standards in the Web platform. When IE still dominated the market, these standards were not very important. When FF and Chrome jumped into the game, IE's weaknesses began to become apparent. Slow and sluggish: IE6 is neglected with countless bugs and security holes that are not fixed. It wasn't until 6 years later that IE7 was born, adding some small functions, still not meeting standards, and only creating more work for developers. Nearly 3 years later, IE8 was born, it can be considered a decent browser. However, at this time, most people have already moved to FF or Chrome. Reasons why programmers hate IE Working with IE is a torture: Imagine, you have to code/design a website. You spent 1 hour testing on FF, Chrome, Safari, all run ok. You open that website on IE6, IE7 and the "dead ball" website. It takes you 1 hour to fix the website so it runs ok on IE7, then another 1 hour to fix it on IE6. The reason mentioned above is that IE does not comply with some web platform standards. You have to spend 3 times as long to complete the job, because of 2 "dreadful" browsers. As a programmer, do you "like" IE? IE is everywhere: A few years ago, almost all computers used IE, some websites could only run with IE. IE is still stuck in Windows and cannot be removed. Being forced to use IE anytime, anywhere makes IE "hated in the past and now hated even more". What is the future for IE? Although IE10 and IE11 versions run quite fast and comply with Web standards, IE is still indifferent from users. Faced with this situation, Microsoft "sacrificed the soldiers", killed IE and gave birth to the Spartan browser (It later also sank). The browser market share is almost occupied by Chrome and Firefox. We also have to praise Microsoft a bit. With the Windows 10 version, Microsoft has just introduced the new Microsoft Edge browser, with the advertisement "Faster than Chrome". I tried it and found the interface to be quite nice and very fast. Hopefully Edge can regain the lost glory of its old IE predecessor. The article is referenced from the source: Rate this: Like this: Related
Như mình giới thiệu ở bài trước, CI mang lại rất nhiều lợi ích cho một dự án phần mềm. Ở các công ty, sẽ có một server để cài đặt Team City, Hudson, Jenkin, TFS… phục vụ cho CI. Tuy nhiên, nếu các bạn làm bài tập nhóm, làm freelance hoặc project riêng, việc setup 1 server riêng cho CI khá là khó khăn. May thay, với Travis-CI, mọi công việc cài đặt phức tạp đã được thực hiện sẵn cho bạn. Travis-CI có hỗ trợ tích hợp với github . Bạn chỉ cần config project github một chút là xong ngay. (Mình đã có 1 bài hướng dẫn tích hợp Visual Studio và github, nếu cần bạn có thể xem lại nhé). Cùng bắt đầu nào! Để test chức năng của CI, mình sẽ dùng1 project có sử dụng Unit Test. Các bạn có thể sử dụng lại project “ Viết Unit Test với NUnit ” trong bài trước (Lưu ý là CI chạy trên nền Mono, chỉ chạy được NUnit, không chạy được MSTest đâu). Nếu lười, các bạn có thể fork project của mình tại đây: . Bắt buộc các bạn phải có tài khoản github . Vào trang ravis-ci.org , bấm “Sign in with Github” góc trên bên phải. Sau khi đăng nhập, bấm vào dấu + bên trái, nhấp vào project muốn test để nó chuyển sang màu xanh là ok. Chờ một chút để Travis tích hợp vào project bên github. Tiếp theo, bạn vào project trên github, kiểm tra xem nó đã nhận được Travis hay chưa?. Bấm Settings -> Webhooks & Services. Nếu không thấy TravisCI thì bấm Add Service, thêm TravisCI vào. Bạn có thể bấm “Test service” để thử xem Github và Travis đã kết nối với nhau chưa. Bước tiếp theo khá đơn giản, bạn chỉ cần tạo 1 file .travis.yml, commit lên thư mục trên github là xong. Bạn có thể tham khảo nội dung file .travis.yml trong folder của mình language: csharp solution: TravisSample.sln install: – nuget restore TravisSample.sln – nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: – xbuild /p:Configuration=Release TravisSample.sln – mono TravisCI sẽ thực hiện build dựa theo file .travis.yml này. Đầu tiên, nó sẽ restore các nuget package của solution. Sau đó build file `TravisSample.sln` và chạy các unit test . Ngay khi bạn vừa push lên git, bạn có thể vào web của Travis-CI để xem quá trình build bắt đầu chạy. Toàn bộ unit test cũng đã pass. Giả sử khi sửa code, bạn vô ý làm cho build bị lỗi, hoặc Unit Test chạy sai. Khi commit code lên, TravisCI sẽ tự động build, chạy unit test và báo lỗi. Lỗi sẽ được báo ngay trên CI. Không chỉ thế, TravisCI còn gửi mail báo cáo về tình trạng bản build. Không cần lấy code về, mình vẫn biết được code chạy được hay không, quá tiện lợi phải không nào? Với TravisCI, bạn có thể truy ra “thủ phạm” làm build bị lỗi, code chạy sai, không còn cảnh đùn đẩy đổ thừa qua lại khi code lỗi. Qua bài viết, hi vọng các bạn hiểu thêm phần nào về công dụng cũng như cách áp dụng Continous Integration vào các dự án thực tế. Bạn nào có thắc mắc hay muốn tìm hiểu thêm về CI cứ để lại comment nhé. Rate this: Like this: Related
As I introduced in the previous article, CI brings many benefits to a software project. In companies, there will be a server to install Team City, Hudson, Jenkin, TFS... to serve CI. However, if you do group assignments, freelance work or private projects, setting up a separate server for CI is quite difficult. Luckily, with Travis-CI, all the complicated installation work is done for you. Travis-CI has integration support with github. You just need to configure the github project a bit and you're done. (I have a tutorial on integrating Visual Studio and github, if you need, you can review it). Let's get It Started! To test the functionality of CI, I will use a project that uses Unit Test. You can reuse the project "Writing Unit Test with NUnit" in the previous article (Note that CI runs on Mono platform, can only run NUnit, cannot run MSTest). If you're lazy, you can fork your project here: . You must have a github account. Go to ravis-ci.org, click “Sign in with Github” in the upper right corner. After logging in, click on the + sign on the left, click on the project you want to test so it turns green and it's ok. Wait a moment for Travis to integrate into the project on github. Next, go to the project on github, check to see if it has received Travis or not?. Click Settings -> Webhooks & Services. If you don't see TravisCI, click Add Service and add TravisCI. You can click “Test service” to see if Github and Travis are connected. The next step is quite simple, you just need to create a .travis.yml file, commit it to the folder on github and you're done. You can refer to the content of the .travis.yml file in your folder language: csharp solution: TravisSample.sln install: – nuget restore TravisSample.sln – nuget install NUnit.Runners -Version 2.6.4 -OutputDirectory testrunner script: – xbuild /p:Configuration=Release TravisSample.sln – mono TravisCI will perform the build based on this .travis.yml file. First, it will restore the solution's nuget packages. Then build the `TravisSample.sln` file and run the unit tests. As soon as you push to git, you can go to Travis-CI's website to watch the build start running. All unit tests also passed. Suppose when editing the code, you accidentally cause the build to fail, or the Unit Test runs incorrectly. When committing code, TravisCI will automatically build, run unit tests and report errors. Errors will be reported immediately on CI. Not only that, TravisCI also sends emails reporting on the build status. No need to download the code, I still know if the code works or not, too convenient, right? With TravisCI, you can find the "culprit" that caused the build to fail, the code to run incorrectly, and there is no more shifting blame back and forth when the code fails. Through this article, we hope you will understand more about its uses and how to apply Continuous Integration to real projects. If you have any questions or want to learn more about CI, please leave a comment. Rate this: Like this: Related
Ở bài viết trước , mình đã giới thiệu tổng quát về các hệ điều hành di động nổi tiếng hiện nay. Trong bài viết này, mình sẽ đưa ra một số hướng phát triển ứng dụng, cùng với những ưu nhược điểm của nó. Hiện nay, có 3 hướng chính để phát triển một ứng dụng di động , đó là: Web App, Native App và Hybrid App . Mỗi hướng sẽ cần những kĩ năng riêng, có những ưu nhược điểm riêng, sẽ được nói rõ hơn bên dưới. Web App Hướng Mobile Web thường được áp dụng khi các bạn đã có sẵn một website đang hoạt động. Ta sẽ tạo thêm 1 trang web riêng cho mobile , sử dụng HTML, CSS, một số framework hỗ trợ mobile và responsive (Bootstrap, jQuery Mobile, Materialize). Người dùng sẽ trang web dành cho mobile để dùng ứng dụng. Các xử lý khác liên quan đến backend như database sẽ được thực hiện phía trên server. Với một số công nghệ như AngularJS , một trang web có thể giống y hệt một ứng dụng di động thật sự . Mình có viết 1 game đơn giản trên nền web, bạn hãy thử vào bằng di động, nó cũng khá giống 1 ứng dụng thật sự: Ưu điểm Chỉ cần có kiến thức về web là viết được Viết một lần, chạy được trên mọi hệ điều hành Người dùng không cần phải cài app, có thể vào thẳng trang web Không cần phải thông qua App Store, tiết kiệm tiền Dễ nâng cấp (Chỉ việc nâng cấp web là xong) Nhược điểm Với một số máy đời cũ, Web App sẽ bị bể giao diện, hiển thị sai, hoặc javascript không chạy. Performance chậm Không thể tận dụng được các tính năng của di động: Push notification, chụp hình, nghiêng máy, định vị GPS… Kĩ năng cần có Kiến thức HTML, CSS, Javascript cơ bản. Kiến thức về một số framework responsive/mobile như: jQuery Mobile, Bootstrap, … Một số framework javascript để viết Single Page Application: AngularJS , EmberJS, … Native App Viết Native App nghĩa là lập trình viên sẽ sử dụng IDE, SDK mà nhà sản xuất cung cấp để lập trình ra một ứng dụng, build ứng dụng đó thành file cài và gửi lên App Store để kiểm duyệt. Người dùng sẽ phải tìm ứng dụng trên App Store, tải về máy và chạy. Đây là hướng phát triển được áp dụng nhiều nhất, điển hình là game Flappy Bird của Nguyễn Hà Đông. Với những ứng dụng game, xử lý ảnh, cần tính toán nhiều, Native App là lựa chọn duy nhất . Với những hệ thống lớn, cần đồng bộ, ta vẫn phải viết phần back-end trên server . Server sẽ đưa ra một số API. Native app lấy dữ liệu về máy, truyền dữ liệu lên server thông qua các API này. Ưu điểm Tận dụng được toàn bộ những tính năng của device : Chụp ảnh, nghiêng máy, rung, GPS, notification. Có thể chạy được offline. Performance rất nhanh, vì code native sẽ được chạy trực tiếp. Là lựa chọn duy nhất cho các ứng dụng game, xử lý hình ảnh hay video … Khuyết điểm Cần cài đặt nặng nề (Eclipse, XCode, Android SDK, …), khó tiếp cận. Với mỗi hệ điều hành, ta phải viết một ứng dụng riêng. Khó đảm bảo sự đồng bộ giữa các ứng dụng (1 button trên Android sẽ khác 1 button trên iOS, pop cũng khác). Cần phải submit app lên App Store , mỗi lần update phải thông báo người dùng. Code mệt và lâu hơn so với Mobile Web. Kĩ năng cần có Ngôn ngữ lập trình: Java cho Android, Objective-C hoặc Swift cho iOS, C# cho Windows Phone. Kiến thức chuyên sâu về ứng dụng: View, Action, Adapter trong Android … Cách xây dựng Web Serivce, Restful API, cách gọi API từ device, … Hybrid App Hybrid App kết hợp những ưu điểm của Mobile Web và Native App. Ta xây dựng một ứng dụng bằng HTML, CSS, Javascript, chạy trên WebView của mobile. Tuy nhiên, Hybrid App vẫn có thể tận dụng những tính năng của device: chụp hình, GPS, rung, …. Hybrid App sẽ được viết dựa trên một cross-platform framework : Cordova, Phonegap, Titanium, …. Ta sẽ gọi những chức năng của mobile thông qua API mà framework này cung cấp, dưới dạng Javascript. Bạn chỉ cần viết một lần, những framework này sẽ tự động dịch ứng dụng này ra các file cài đặt cho Android, iOS và Windows Phone. Một số ứng dụng không quá nặng về xử lý , cần tận dụng chức năng của device sẽ chọn hướng phát triển này. Đây là một game dạng hybrid app mình viết bằng ionic Platform, các bạn dùng Android có thể cài vào chơi thử nhé: Ưu điểm Chỉ cần biết HTML, CSS, JS (Thế nên mình mới khuyên các bạn nên học Javascript ). Viết một lần, chạy được trên nhiều hệ điều hành Tận dụng được các chức năng của device. Khuyết điểm Không ổn định, khó debug . Framework sẽ dịch code của bạn thành code native, việc sửa lỗi ứng dụng khá khó vì bạn không biết code sẽ được dịch ra như thế nào. Performance chậm. Cần cài đặt nhiều thứ (Titanium, Cordova đều bắt phải cài đặt SDK này nọ thì mới build ứng dụng được). Kiến thức cần biết HTML, CSS, Javscript cơ bản. Cách dùng một số framework CSS, Javascript: jQuery Mobile, Ionic Framework, AngularJS, Bootstrap, … Kiến thức về các cross-platform framework : Titanium, Cordova, Phonegap. Cách xây dựng Web Serivce, Restful API, cách gọi API từ device, … (Hybrid app cũng sẽ kết nối với server thông qua API như Native App). Sau 2 phần của bài viết, mình đã giúp các bạn đã có cái nhìn tổng quát về thị trường di động. Hi vọng các bạn có thể chọn được con đường mình muốn đi, cũng như biết được mình cần phải học gì . Các bạn có thể đóng góp hay đưa ý kiến cho bài viết bằng cách comment nhé. Rate this: Like this: Related
In the previous article, I gave a general introduction to today's famous mobile operating systems. In this article, I will give some application development directions, along with their advantages and disadvantages. Currently, there are 3 main directions to develop a mobile application: Web App, Native App and Hybrid App. Each direction will require its own skills and have its own advantages and disadvantages, which will be discussed more clearly below. Web App Mobile Web direction is often applied when you already have an active website. We will create a separate website for mobile, using HTML, CSS, some frameworks that support mobile and responsive (Bootstrap, jQuery Mobile, Materialize). Users will go to the mobile website to use the application. Other backend-related processing such as the database will be performed on the server. With some technologies like AngularJS, a website can look exactly like a real mobile app. I wrote a simple web-based game, try accessing it on your mobile phone, it's quite similar to a real application: Advantages You only need to have knowledge about the web to write Write once, run on all operating systems Users do not need to install the app, they can go straight to the website No need to go through the App Store, save money Easy to upgrade (Just upgrade the website and you're done) Defect With some older devices, the Web App will have a broken interface, incorrect display, or javascript will not run. Performance is slow Unable to take advantage of mobile features: Push notifications, taking pictures, tilting the camera, GPS positioning... Necessary skills Basic knowledge of HTML, CSS, Javascript. Knowledge of some responsive/mobile frameworks such as: jQuery Mobile, Bootstrap, ... Some javascript frameworks to write Single Page Application: AngularJS, EmberJS, ... Native App Writing a Native App means that the programmer will use the IDE and SDK provided by the manufacturer to program an application, build that application into an installation file and submit it to the App Store for approval. Users will have to find the application on the App Store, download it and run it. This is the most commonly applied development direction, typically the game Flappy Bird by Nguyen Ha Dong. For game applications, image processing, and applications that require a lot of calculation, Native App is the only choice. With large systems that need synchronization, we still have to write the back-end on the server. The server will expose some APIs. Native app retrieves data to the device and transmits data to the server through these APIs. Advantage Take advantage of all the device's features: Take photos, tilt the camera, vibrate, GPS, notification. Can run offline. Performance is very fast, because native code will be run directly. The only choice for game applications, image processing or video... Weakness Needs heavy installation (Eclipse, XCode, Android SDK, ...), difficult to access. For each operating system, we have to write a separate application. It is difficult to ensure synchronization between applications (a button on Android will be different from a button on iOS, pop will also be different). It is necessary to submit the app to the App Store, and each update must notify the user. Coding is tiring and takes longer than Mobile Web. Necessary skills Programming language: Java for Android, Objective-C or Swift for iOS, C# for Windows Phone. In-depth knowledge of applications: View, Action, Adapter in Android... How to build Web Serivce, Restful API, how to call API from device, ... Hybrid App Hybrid App combines the advantages of Mobile Web and Native App. We build an application using HTML, CSS, Javascript, running on mobile WebView. However, Hybrid App can still take advantage of the device's features: taking pictures, GPS, vibration, etc. Hybrid App will be written based on a cross-platform framework: Cordova, Phonegap, Titanium, .... We will call mobile functions through the API that this framework provides, in the form of Javascript. You only need to write it once, these frameworks will automatically translate this application into installation files for Android, iOS and Windows Phone. Some applications that are not too heavy on processing and need to take advantage of the device's functions will choose this development direction. This is a hybrid app game I wrote using ionic Platform, you can use Android to install it and try it out: Advantages Just need to know HTML, CSS, JS (That's why I recommend you learn Javascript). Write once, run on many operating systems Take advantage of the device's functions. Weakness Unstable, difficult to debug. The framework will translate your code into native code, debugging the application is quite difficult because you don't know how the code will be translated. Performance is slow. Need to install many things (Titanium and Cordova both require SDKs to be installed to build the application). Knowledge you need to know Basic HTML, CSS, Javascript. How to use some CSS and Javascript frameworks: jQuery Mobile, Ionic Framework, AngularJS, Bootstrap, ... Knowledge of cross-platform frameworks: Titanium, Cordova, Phonegap. How to build Web Serivce, Restful API, how to call API from device, ... (Hybrid app will also connect to the server via API like Native App). After 2 parts of the article, I have helped you have an overview of the mobile market. Hopefully you can choose the path you want to take, as well as know what you need to learn. You can contribute or give your opinion on the article by commenting. Rate this: Like this: Related
NoSQL đang dần nổi lên như một thế lực trong giới lập trình. Nhà nhà quảng cáo NoSQL, người người sử dụng NoSQL. MEAN stack (MongoDB, Express, AngularJS, NodeJS) đang dần lấn lướt, thay thế cho LAMP stack (Linux, Apache, MySQL, PHP/Python) đã lỗi thời. Bài viết này giới thiệu tổng quan về NoSQL, giúp các bạn có thêm kiến thức khi phỏng vấn xin việc hoặc chém gió với nhau lúc trà dư tửu hậu. Trước NoSQL, từng có một thứ gọi là … SQL Nhắc lại một chút, database ( DB ) là một cơ sở dữ liệu, gồm các bảng, hàng, cột. Những thứ mình sẽ nhắc đến trong bài như: MySQL, Microsoft SQL server, MongoDB, .. là hệ quản trị cơ sở dữ liệu ( DBMS ). Các bạn đừng nhầm lẫn 2 khái niệm này. Thật ra, SQL không phải là … DB, cũng không phải là DBMS. Nó là viết tắt của Structure Query Language (Ngôn ngữ truy vấn cấu trúc). Ngôn ngữ này truy vấn trên nền một RDBMS (Hệ quản trị CSDL quan hệ). Đây là thứ các bạn sinh viên được dạy trong môn “Cơ sở dữ liệu”. Trong RDBMS, dữ liệu được lưu vào nhiều bảng. Mỗi bảng sẽ có nhiều cột, nhiều row. Ta sử dụng SQL để truy vấn như sau: RDBMS (MySQL, Microsoft SQL Server, Oracle, …) được sử dụng rất rộng rãi , trong hầu hết các ứng dụng, vì một số lý do sau: Tính ACID (Atomicity, Consistency, Isolation, Durability) của một transaction được đảm bảo. Với database chuẩn 3, dữ liệu được đảm bảo tính đồng nhất và toàn vẹn (consistency). Có rất nhiều driver cho mọi ngôn ngữ : Java, C# , PHP. Số lượng lập trình viên biết và dùng SQL rất nhiềuuuuuuuuu. Sau SQL, có một thứ gọi là … NoSQL Tuy nhiên, RDBMS vẫn còn một số khuyết điểm: Việc mapping giữa các bảng trong database với các object trong code khá rắc rối và phức tạp. ( Mặc dù 1 số ORM như Entity Framework, Hibernate đã đơn giản hóa chuyện này) . Performance sẽ bị chậm khi phải join nhiều bảng để lấy dữ liệu (Đó là lý do ta sử dụng “giảm chuẩn” để tăng hiệu suất cho RDBMS). Việc thay đổi cấu trúc dữ liệu (Thêm/xóa bảng hoặc thêm/xóa một field) rất mệt mỏi, kéo theo vô số thay đổi trên code. Không làm việc được với dữ liệu không có cấu trúc (un-structure). RDBMS được thiết kế để chạy trên một máy chủ. Khi muốn mở rộng, nó khó chạy trên nhiều máy (clustering). NoSQL Database (Phải là NoSQL Database nhé) ra đời, giải quyết được những khuyết điểm của RDBMS: Dữ liệu trong NoSQL DB được lưu dưới dạng document, object. Truy vấn dễ dàng và nhanh hơn RDBMS nhiều. NoSQL có thể làm việc hoàn toàn ok với dữ liệu dạng không có cấu trúc. Việc đổi cấu trúc dữ liệu (Thêm, xóa trường hoặc bảng) rất dễ dàng và nhanh gọn trong NoSQL. Vì không đặt nặng tính ACID của transactions và tính nhất quán của dữ liệu, NoSQL DB có thể mở rộng, chạy trên nhiều máy một cách dễ dàng. Trong tương lai, NoSQL sẽ … thế chỗ SQL ??? Tóm lại, NoSQL database chỉ là một kiểu database có cách lưu trữ, truy vấn dữ liệu hoàn toàn khác so với RDBMS và SQL. NoSQL bỏ qua tính toàn vẹn của dữ liệu và transaction để đổi lấy hiệu suất nhanh và khả năng mở rộng (scalability). Với những ưu điểm trên, NoSQL đang được sử dụng nhiều trong các dự án Big Data, các dự án Real-time, số lượng dữ liệu nhiều. Liệu NoSQL có thay thế được hoàn toàn RDBMS và SQL được không? Câu trả lời là KHÔNG . Trong tương lai, RDBMS vẫn sẽ giữ được chỗ đứng của mình. Một ứng dụng không chỉ sử dụng một database duy nhất, và có thể kết hợp cả SQL lẫn NoSQL. Ở bài viết sau , mình sẽ giới thiệu một số kiểu NoSQL Database cơ bản, cũng như các DBMS nổi tiếng và được sử dụng nhiều. Mong các bạn đón xem. Rate this: Like this: Related
NoSQL is gradually emerging as a force in the programming world. NoSQL advertisers, NoSQL users. MEAN stack (MongoDB, Express, AngularJS, NodeJS) is gradually taking over, replacing the outdated LAMP stack (Linux, Apache, MySQL, PHP/Python). This article introduces an overview of NoSQL, helping you gain more knowledge when interviewing for a job or chatting with each other over drinks. Before NoSQL, there was something called... SQL To reiterate, a database (DB) is a database, consisting of tables, rows, and columns. The things I will mention in the article such as: MySQL, Microsoft SQL server, MongoDB, .. are database management systems (DBMS). Please do not confuse these two concepts. Actually, SQL is not... DB, nor is it DBMS. It stands for Structure Query Language. This language queries on the basis of an RDBMS (Relational Database Management System). This is what students are taught in the "Database" subject. In RDBMS, data is saved into multiple tables. Each table will have many columns and rows. We use SQL to query as follows: RDBMS (MySQL, Microsoft SQL Server, Oracle, ...) is used very widely, in most applications, for the following reasons: Calculate the ACID (Atomicity, Consistency, Isolation, Durability) of a guaranteed transaction. With standard 3 database, data is guaranteed uniformity and integrity. There are many drivers for every language: Java, C#, PHP. The number of programmers who know and use SQL is very large. After SQL, there is something called... NoSQL However, RDBMS still has some shortcomings: Mapping between tables in the database and objects in the code is quite confusing and complicated. (Although some ORMs like Entity Framework and Hibernate have simplified this). Performance will be slow when having to join many tables to get data (That's why we use "reducing benchmarks" to increase performance for RDBMS). Changing the data structure (adding/deleting a table or adding/deleting a field) is very tiring, entailing countless changes in the code. Cannot work with unstructured data. RDBMS is designed to run on a server. When you want to expand, it is difficult to run on multiple machines (clustering). NoSQL Database (Must be NoSQL Database) was born, solving the shortcomings of RDBMS: Data in NoSQL DB is stored as documents and objects. Querying is much easier and faster than RDBMS. NoSQL can work perfectly fine with unstructured data. Changing data structures (Adding, deleting fields or tables) is very easy and fast in NoSQL. Because it does not place too much emphasis on ACID of transactions and data consistency, NoSQL DB can scale and run on many machines easily. In the future, NoSQL will... replace SQL??? In short, NoSQL database is just a type of database that has a completely different way of storing and querying data than RDBMS and SQL. NoSQL bypasses data and transaction integrity in exchange for fast performance and scalability. With the above advantages, NoSQL is being used a lot in Big Data projects, Real-time projects, and large amounts of data. Can NoSQL completely replace RDBMS and SQL? The answer is NO. In the future, RDBMS will still maintain its position. An application does not only use a single database, and can combine both SQL and NoSQL. In the following article, I will introduce some basic NoSQL Database types, as well as famous and widely used DBMSs. Hope you guys look forward to watching. Rate this: Like this: Related
Giới thiệu tổng quan về Unit Test Ở trường đại học chắc các bạn đã được học khái niệm về Unit Test trong môn “Kiểm thử chất lượng phần mềm”. Nói một cách dễ hiểu, unit test tức là code dùng để test code ta đã viết . Một số đặc điểm của unit test: Một số bạn sẽ thắc mắc: “Ơ hay, trong business class thì phải gọi data access chứ?”, và “code mình dính chùm lắm, làm sao test từng class riêng được”. Để viết unit test, các class của bạn phải có quan hệ “lõng lẽo” với nhau (loose coupling), nếu không viết được unit test nghĩa là các class dính với nhau quá chặt, sẽ khó thay đổi sau này. Hãy áp dụng các nguyên lý SOLID vào code, viết code với tư tưởng “viết sao để unit test được” sẽ là code của bạn uyển chuyển, dễ test hơn. Về vấn đề Business Class và Data Access, các class không nên gọi trực tiếp lẫn nhau mà gọi thông qua interface. Khi unit test, ta sẽ thay các hiện thực interface này bằng các class giả, thay thế cho class data access thật. Mình sẽ nói rõ về vấn đề này ở những bài viết về Inversion of Control, Dependency Injection trong tương lai. Một số lợi ích của Unit Test: Nếu viết Unit Test một cách cẩn thận, code của bạn sẽ ít lỗi hơi , vì Unit Test sẽ phát hiện lỗi cho bạn. Phát hiện những hàm chạy chậm và không hiệu quả thông qua thời gian chạy của Unit Test. Tăng sự tự tin khi code, vì đã có Unit Test phát hiện lỗi. Khi refactor code , sửa code hay thêm chức năng mới, Unit Test đảm bảo chương trình chạy đúng , phát hiện những lỗi tiềm tàng mà ta bỏ lỡ. Gần đây, mô hình phát triển TDD (Test Driven Development) đang trở nên hot, được áp dụng nhiều. Mô hình này dựa trên khái niệm: Với mỗi chức năng, ta viết Unit Test trước, sau đó viết hàm hiện thực chức năng để unit test pass. Một số công ty ở Việt Nam cũng đang áp dụng mô hình này, trong khi phỏng vấn xin việc cũng có nhé :D. Các bạn có thể xem thêm về Unit Test và TDD ở đây: Unit Test trong C# với NUnit Trước đây, để viết Unit Test trong C#, ta thường phải tạo một project test riêng, sử dụng thư viện MSTest của Microsoft. MSTest hỗ trợ khá nhiều chức năng: Test dữ liệu từ database, đo performance hệ thống, xuất dữ liệu report. Tuy nhiên, do MSTest đi kèm với Visual Studio, không thể chạy riêng rẽ, lại khá nặng nề, do đó NUnit được nhiều người ưa thích hơn. NUnit có 1 bộ runner riêng, có thể chạy UnitTest độc lập không cần VisualStudio, ngoài ra nó cũng hỗ trợ một số tính năng mà MSTest không có (parameter test, Assert Throw). Nếu bạn chưa bao giờ viết Unit Test, bắt đầu với NUnit cũng là 1 lựa chọn không tồi. Đầu tiên, ta hãy tạo 1 project console trong Visual Studio. Ta viết 1 class Calculator với các 2 hàm Add và Subtract: Bây giờ, ta sẽ viết UnitTest để test 2 hàm này. Thông thường, code Unit Test sẽ được nằm ở một project Test riêng biệt, do đó ta sẽ tạo 1 project mới, thêm “.Test” đằng sau tên. Các bạn nhớ chọn kiểu project là Class Library nhé. Ở project mới, bấm vào Tools -> Library Package Manager -> Package Manager Console, gõ vào: `Install-Package NUnit -Version 2.6.4` để cài đặt NUnit nhé. Ta tạo 1 class mới có tên là CalculatorTest. Bắt đầu viết thôi: Giải thích một số annotation: Annotation [TextFixture] đặt vào đầu class chứa các unit test, đánh dấu đây là một bộ các unit test. Annotation [SetUp] để đánh dấu hàm setup. Hàm này sẽ được chạy vào đầu mỗi unit test. Annotation [Test] để đánh dấu hàm bên dưới là một unit test. Nhiều khi bạn viết unit test xong nhưng không thấy hiện unit test lên là do quên annotation này nhé. Để chạy Unit Test, ta cần cài NUnit.TestAdapter , đây là bộ runner cho phép chạy các Unit Test của NUnit trong Visual Studio. Bạn cũng có thể dùng 1 trong 2 cách sau: Để cài TestAdapter cho Visual Studio, ta vào Tool, Extentions and Updates, tìm NUnit và cài đặt. Cài xong nhớ Restart lại Visual Studio nhé. Bấm Test -> Run -> All Tests để bắt đầu chạy. Ta sẽ thấy toàn bộ các case đã pass, màu xanh hiền hòa như trong ảnh. Ta cố ý sửa lại code để code chạy sai. Chạy lại Unit Test, ta sẽ thấy các case đã fail. Unit Test đã tự động bắt lỗi chương trình cho bạn rồi đấy. Bấm vào từng test case, ta sẽ thấy kết quả mong muốn ở đoạn “ Excepted “, kết quả code chạy ở đoạn “ But was “. Mục đích của bài viết là hướng dẫn các bạn nhập môn việc viết Unit Test cho C# bằng NUnit nên mình sẽ dừng ở đây. Nếu được ủng hộ, mình sẽ giới thiệu một số kĩ thuật phức tạp hơn như: Sử dụng Mock Object, Parameterlized Test, … ở những bài sau. Bạn nào muốn viết unit test cho javascript có thể thử tìm hiểu về Jasmine , mình đã có 2 bài giới thiệu tổng quát. Cảm ơn và hẹn gặp lại. Rate this: Like this: Related
Overview of Unit Test In college, you probably learned the concept of Unit Test in the subject "Software Quality Testing". To put it simply, unit testing is the code used to test the code we have written. Some characteristics of unit testing: Some of you will wonder: "Hey, in the business class, do we have to call data access?", and "My code is so crowded, how can I test each class separately?" To write unit tests, your classes must have a "loose coupling" relationship with each other. If you cannot write unit tests, it means the classes are too tightly coupled and will be difficult to change later. Apply SOLID principles to code, writing code with the mindset of "write it so it can be unit tested" will make your code more flexible and easier to test. Regarding Business Class and Data Access, classes should not call each other directly but through the interface. When unit testing, we will replace these interface implementations with dummy classes, replacing the real data access class. I will talk clearly about this issue in future articles about Inversion of Control and Dependency Injection. Some benefits of Unit Test: If you write Unit Test carefully, your code will have fewer errors, because Unit Test will detect errors for you. Detect slow and ineffective functions through Unit Test runtime. Increase confidence when coding, because Unit Test detects errors. When refactoring code, modifying code or adding new functionality, Unit Testing ensures the program runs correctly, detecting potential errors that we might miss. Recently, the TDD (Test Driven Development) development model is becoming hot and widely applied. This model is based on the concept: For each function, we write a Unit Test first, then write a function that implements the function so that the unit test passes. Some companies in Vietnam are also applying this model, also during job interviews :D. You can see more about Unit Test and TDD here: Unit Test in C# with NUnit Previously, to write Unit Test in C#, we often had to create a separate test project, using Microsoft's MSTest library. MSTest supports many functions: Test data from the database, measure system performance, export report data. However, because MSTest comes with Visual Studio, it cannot be run separately, and is quite heavy, so NUnit is preferred by many people. NUnit has its own runner, which can run UnitTest independently without VisualStudio, and it also supports some features that MSTest does not have (parameter test, Assert Throw). If you have never written Unit Test, starting with NUnit is also not a bad choice. First, let's create a project console in Visual Studio. We write a Calculator class with two functions Add and Subtract: Now, we will write UnitTest to test these two functions. Normally, Unit Test code will be located in a separate Test project, so we will create a new project, adding ".Test" after the name. Remember to choose the project type as Class Library. In the new project, click Tools -> Library Package Manager -> Package Manager Console, type: `Install-Package NUnit -Version 2.6.4` to install NUnit. We create a new class named CalculatorTest. Let's start writing: Explain some annotations: Annotation [TextFixture] is placed at the beginning of the class containing unit tests, marking this as a set of unit tests. Annotation [SetUp] to mark the setup function. This function will be run at the beginning of each unit test. Annotation [Test] to mark the function below as a unit test. Many times, when you finish writing a unit test but don't see the unit test appear, it's because you forgot this annotation. To run Unit Test, we need to install NUnit.TestAdapter, this is a runner that allows running NUnit Unit Tests in Visual Studio. You can also use one of the following two ways: To install TestAdapter for Visual Studio, go to Tools, Extentions and Updates, find NUnit and install. After installation, remember to restart Visual Studio. Click Test -> Run -> All Tests to start running. We will see all the passed cases, in gentle blue color as in the photo. We intentionally modify the code so that it runs incorrectly. Run the Unit Test again, we will see the failed cases. Unit Test has automatically caught program errors for you. Click on each test case, we will see the desired result in the "Exceptiond" paragraph, the code run result in the "But was" paragraph. The purpose of the article is to guide you through writing Unit Tests for C# using NUnit, so I will stop here. If supported, I will introduce some more complex techniques such as: Using Mock Object, Parameterlized Test, ... in the following articles. Those who want to write unit tests for javascript can try learning about Jasmine, I have 2 general introduction articles. Thank you and see you again. Rate this: Like this: Related
Với các bạn sinh viên, khái niệm Continuous Integration (Tích hợp liên tục) là một cái gì đó nghe rất cao siêu và hoành tráng. Mình sẽ nêu khái niệm, sau đó đưa ra một câu chuyện đơn giản để giải thích cho khái niệm này. Tích hợp liên tục (CI) là phương pháp phát triển phần mềm đòi hỏi các thành viên trong nhóm tích hợp công việc thường xuyên. Mỗi ngày, các thành viên đều phải theo dõi và phát triển công việc của họ ít nhất một lần. Việc này sẽ được một nhóm khác kiểm tra tự động, nhóm này sẽ tiến hành kiểm thử truy hồi để phát hiện lỗi nhanh nhất có thể. Cả nhóm thấy rằng phương pháp tiếp cận này giúp giảm bớt vấn đề về tích hợp hơn và cho phép phát triển phần mềm gắn kết nhanh hơn. Trích từ: Ngày xửa ngày xưa, Nam còn là sinh viên ngành IT của trường B. Mỗi lần code, làm bài tập nhóm đối với Nam là một cực hình. Cả team ngồi phác thảo ra từng module nho nhỏ, sau đó chia ra, mạnh ai về nhà code. Cuối tuần, cả nhóm hẹn nhau ra quán cafe để “ráp code”, cóp các phần đã làm qua USB, bỏ vào một project chung. Mỗi lần “ráp code”, chương trình không build được, một núi lỗi xuất hiện, cả nhóm phải hì hục mất nguyên buổi chiều để sửa. “Ráp code” trở thành một cơn ác mộng đối với Nam và các bạn trong nhóm. Ra trường rồi đi làm , Nam đi phỏng vấn xin việc , được nhận vào công ty phần mềm C. Ở đây, mọi người đã biết dùng SVN nên không còn cảnh phải copy code qua lại nữa. Từ “ráp code” cũng biến mất mà thay vào đó là từ “tích hợp”. Tuy nhiên, team của Nam vẫn còn làm việc khá ẩu. Mỗi sáng, các thành viên trong team update code từ SVN/ Git về, code say sưa, sau đó commit code lên trước khi về nhà. Đôi khi code không build được, cả team lại nháo nhào “truy tìm thủ phạm”: anh Phạm Văn A sửa code mà quên commit file mới lên, chị Lê Thị B sửa connection string, … Đời nhiều khi còn trái ngang hơn, anh A sửa code, chị B sửa code làm phần của Nam chạy bị lỗi, thế là Nam lãnh đủ. Mỗi cuối tuần, cả team lại phải OT để tích hợp và sửa lỗi. Phần mềm không bán được vì quá nhiều lỗi, release chậm, công ty cũ phá sản, Nam phải đi tìm việc mới. Với khả năng của mình, Nam được nhận vào công ty C. Công ty này khá chuyên nghiệp, có áp dụng Agile, CI – tích hợp liên tục. Nhờ có CI, team của Nam hiện tại không còn gặp những rắc rối khi tích hợp: Mỗi khi có người commit code, hệ thống CI sẽ tự lấy code từ SVN, thực hiện build. Hệ thống sẽ gửi mail thông báo cho toàn bộ thành viên nếu như build bị lỗi. Cả nhóm chỉ việc đọc mail, xem ai là người commit revision đó, và “nắm đầu” thủ phạm, bắt hắn sửa lỗi. Project của Nam được viết Unit Test rất cẩn thận, đầy đủ. Khi anh A, chị B sửa code, commit lên, hệ thống sẽ build và chạy lại toàn bộ các Unit Test. Nếu có case nào bị fail, cả team sẽ nhận được thông báo, và anh A, chị B phải nhanh chóng fix code để các case này pass. Việc tích hợp được diễn ra hàng ngày, nhiều lần trong ngày. Mỗi khi ai đó commit code làm hư build hoặc gây lỗi, cả team có thể giải quyết vấn đề NGAY LẬP TỨC. “Tích hợp” không còn là nỗi ác mộng mà trở thành chuyện thường ngày đối với Nam. Nói tóm lại, CI – tích hợp liên tục là phương pháp mà các team Agile sử dụng để đảm bảo code của toàn dự án luôn build được, luôn chạy đúng (Pass toàn bộ các test case). Hiện tại, hầu như các công ty phần mềm đều áp dụng CI, thông qua một số framework như: TFS, TeamCity, Hudson, Jenkin, Travis, … Tự trang bị cho mình những kiến thức về CI sẽ khiến bạn có giá hơn trong mắt nhà tuyển dụng nhé. Nếu muốn hiểu chuyên sâu về Continous Integration và áp dụng, bạn nên xem một bài viết chi tiết. cụ thể về Continous Integration của Martin Folwer: . Ở bài tiếp theo, mình sẽ hướng dẫn các bạn cách áp dụng “tích hợp liên tục” vào project, thông qua Travis-CI và github. Rate this: Like this: Related
For students, the concept of Continuous Integration is something that sounds very sublime and majestic. I will state the concept, then give a simple story to explain this concept. Continuous integration (CI) is a software development method that requires team members to integrate work regularly. Every day, members must monitor and develop their work at least once. This will be checked automatically by another team, which will conduct retrospective testing to detect errors as quickly as possible. The team found that this approach resulted in fewer integration problems and enabled faster development of cohesive software. Excerpt from: Once upon a time, Nam was an IT student at school B. Every time he coded, doing group exercises for Nam was a torture. The whole team sat down and sketched out each small module, then divided it up and the strongest person went home to code. On the weekend, the whole group met up at a cafe to "assemble code", copy the completed parts via USB, and put them into a common project. Each time "assembling the code", the program could not be built, a mountain of errors appeared, the whole team had to spend the whole afternoon trying to fix it. “Assembling the code” became a nightmare for Nam and his team mates. After graduating from school and going to work, Nam went to a job interview and was accepted into software company C. Here, everyone knows how to use SVN so there is no longer the need to copy code back and forth. The word "code assembly" also disappeared and was replaced by the word "integrate". However, Nam's team is still working quite carelessly. Every morning, team members update code from SVN/Git, code passionately, then commit the code before going home. Sometimes when the code fails to build, the whole team scrambles to "find the culprit": Mr. Pham Van A edits the code but forgets to commit the new file, Ms. Le Thi B fixes the connection string,... Life is sometimes even more contradictory, Mr. A edits the code, Ms. B edits the code causing Nam's part to run incorrectly, so Nam suffers enough. Every weekend, the whole team has to go OT to integrate and fix errors. The software could not be sold because of too many errors, slow release, the old company went bankrupt, Nam had to find a new job. With his abilities, Nam was accepted into company C. This company is quite professional, applying Agile and CI - continuous integration. Thanks to CI, Nam's team no longer has trouble integrating: Every time someone commits code, the CI system will automatically get the code from SVN and perform the build. The system will send email notification to all members if the build fails. The whole group just needs to read the email, see who committed that revision, and "capture" the culprit, forcing him to fix the error. Nam's project was written with Unit Test very carefully and completely. When Mr. A and Ms. B edit the code and commit it, the system will build and run all the Unit Tests again. If any case fails, the whole team will receive a notification, and Mr. A and Ms. B must quickly fix the code so that these cases pass. Integration happens every day, multiple times a day. Every time someone commits code that breaks the build or causes an error, the whole team can solve the problem IMMEDIATELY. “Integration” is no longer a nightmare but has become an everyday thing for Nam. In short, CI - continuous integration is the method Agile teams use to ensure the code of the entire project can always be built and always run correctly (Pass all test cases). Currently, almost all software companies apply CI, through a number of frameworks such as: TFS, TeamCity, Hudson, Jenkin, Travis, etc. Equipping yourself with CI knowledge will make you more valuable in your career. eyes of the recruiter. If you want to understand Continuous Integration in depth and apply it, you should read a detailed article. specifically about Martin Folwer's Continuous Integration: . In the next article, I will show you how to apply "continuous integration" to your project, through Travis-CI and github. Rate this: Like this: Related
Trước đây, để quản lý source code, ta thường sử dụng SVN, host toàn bộ source code trên google code. Trong vòng nhiều năm gần đây, Git đang trở thành 1 xu thế mới, thay thế dần cho SVN. Hầu như các thư viện javascript , css nổi tiếng hiện giờ đều đặt đại bản doanh trên github. Google Code sẽ đóng cửa vào năm sau, vì vậy hầu như các project mới bây giờ đều được host trên Github. Mình viết bài này nhằm hướng dẫn các bạn dùng Visual Studio có thể lấy code, submit code lên github dễ hàng với Visual Studio nhé. Phiên bản VS hỗ trợ Github là bản VS 2012, 2013 và bản 2015 mới nhất. Đầu tiên, bạn cần vào Tool -> Options -> Source Version Control, chọn Microsft Git Provider. Bài viết sẽ hướng dẫn các bước cơ bản để làm việc với git: Bước 1 : Tạo 1 project C# mới, ở đây mình tạo Console cho nhẹ, nhớ bỏ dòng Add to Source Control nhé. Sau khi tạo 1 project mới, mình sẽ add thêm thư viện Newtonsoft.JSON. Các bạn hãy dùng Nuget để tải thư viện. Nếu ta add thư viện dưới dạng file, khi commit code lên git sẽ khá nặng. Khi dùng Nuget, mọi thư viện tải về sẽ được nuget quản lý, ta không cần commit các file thư viện lên. Khi người khác tải về và build, Nuget sẽ tự tải thư viện cần thiết. Nhớ bấm chuột phải vào Solution, chọn “Enable Nuget package restore” và chọn Yes nhé: Project giờ đã hoàn thành, ta bấm chuột phải vào solution, chọn “Add Solution to Source Control”, chọn “Git” và bấm OK. Ta sẽ thấy dấu + hiện lên bên trái các file, đánh dấu đây là file mới. Ta bấm qua Tab “Team Explorer”, bấm Change để xem danh sách các file. Chuột phải vào thư mục packages, bấm Exclude để loại bỏ thư mục đó ra, sau đó điền comment và commit code nhé. Ta đã commit code thành công, nhưng đây chỉ là local repository, tức là repository trên máy bạn mà thôi. Tiếp theo, chúng ta sẽ tạo 1 repository trên github để commit code lên. Ta lên tạo 1 git mới, nhớ tuyệt đối không đánh vào ô “Initialize readme.md” , làm vậy bạn sẽ không commit được đâu. Bạn sẽ thấy project mới được tạo. Hãy copy cái đống ; .Đó là đường link dẫn tới repository github của bạn. Quay lại Visual Studio, bấn nút “Sync” màu xanh xanh ấy. Dán đường dẫn github bạn đã copy vào, bấm Publish, code sẽ được đồng bộ từ local repository lên repository trên github. Kết quả: Bước 2 : Cách lấy code từ github về local. Sau khi đã đưa code lên github, bạn copy link HTTPS clone URL (góc dưới bên phải), gửi cho bạn bè. Các bạn bật Visual Studio lên, mở lại tab Team Explorer, bấm vào hình các phích cắm (Connect to team projects). Chọn clone, sau đó dán url vào: Sau khi đã lấy code về, nhấp vào project GitExample, sau đó nhấp vào file GitSample.sln để mở project. Tiến hành build, ta thấy Nuget sẽ tự động tải packages Newtonsoft.JSON về. Bước 3 : Chỉnh sửa code, commit lại code trên github. Quy trình làm việc với github như sau: Mình sẽ chỉnh 1 chút code trong file Program.cs. File có màu đỏ đánh dấu đã chỉnh rồi. Bấm qua Tab “Team Explorer”, bấm vào Change. Nhập comment vào rồi Commit. Commit rất nhanh (Chưa tới 1s), vì ta chỉ commit trên local. Bấm Sync để đồng bộ dữ liệu lên github. Visual Studio sẽ hỏi username và password github của bạn. Nhớ kêu bạn bè add vào project thì mới commit code được nhé. Kết quả cuối cùng: Vì Visual Studio hướng tới sự đơn giản, dễ sử dụng nên nó không có command line . Nếu muốn sử dụng Git Command Line, các bạn hãy tải thêm plug-in cho VS. Bài viết tới đây là kết thúc, mong rằng nó sẽ có ích cho công việc của các bạn. Rate this: Like this: Related
Previously, to manage source code, we often used SVN, hosting the entire source code on Google Code. In recent years, Git is becoming a new trend, gradually replacing SVN. Almost all famous javascript and css libraries are now headquartered on github. Google Code will close next year, so most new projects are now hosted on Github. I wrote this article to guide Visual Studio users so they can get code and submit code to github easily with Visual Studio. VS versions that support Github are VS 2012, 2013 and the latest 2015 version. First, you need to go to Tools -> Options -> Source Version Control, select Microsft Git Provider. This article will guide you through the basic steps to work with git: Step 1: Create a new C# project, here I will create a Console for ease, remember to remove the Add to Source Control line. After creating a new project, I will add the Newtonsoft.JSON library. Please use Nuget to download the library. If we add the library as a file, committing the code to git will be quite heavy. When using Nuget, all downloaded libraries will be managed by nuget, we do not need to commit the library files. When others download and build, Nuget will automatically download the necessary libraries. Remember to right-click on the Solution, select “Enable Nuget package restore” and select Yes: The project is now completed, right-click on the solution, select “Add Solution to Source Control”, select “Git” and click OK. We will see a + sign appear to the left of the files, marking this as a new file. Click on the "Team Explorer" Tab, click Change to see the list of files. Right-click on the packages folder, click Exclude to remove that folder, then fill in the comment and commit the code. We have successfully committed the code, but this is only a local repository, that is, the repository on your computer. Next, we will create a repository on github to commit the code. Let's create a new git, remember absolutely not to check the "Initialize readme.md" box, doing so you will not be able to commit. You will see the new project created. Copy the pile ; .That is the link to your github repository. Return to Visual Studio, press the blue “Sync” button. Paste the github link you copied, click Publish, the code will be synchronized from the local repository to the repository on github. Results: Step 2: How to get code from github to local. After posting the code to github, copy the HTTPS clone URL (lower right corner) and send it to your friends. You turn on Visual Studio, reopen the Team Explorer tab, click on the plug image (Connect to team projects). Select clone, then paste the url: After getting the code, click on the GitExample project, then click on the GitSample.sln file to open the project. Proceeding to build, we see that Nuget will automatically download the Newtonsoft.JSON package. Step 3: Edit the code, commit the code again on github. The working process with github is as follows: I will edit a little code in the Program.cs file. The file is marked in red as edited. Click over to the “Team Explorer” Tab, click Change. Enter comment then Commit. Commit is very fast (Less than 1 second), because we only commit locally. Click Sync to synchronize data to github. Visual Studio will ask for your github username and password. Remember to ask your friends to add you to the project so you can commit the code. Final result: Because Visual Studio aims for simplicity and ease of use, it does not have a command line. If you want to use Git Command Line, please download the plug-in for VS. This article ends here, I hope it will be useful for your work. Rate this: Like this: Related
Như đã giới thiệu ở bài trước , NoSQL Database đang được sử dụng ngày một nhiều hơn, chiếm dần vị trí của Relational Database. Bài viết này sẽ giới thiệu một số dạng NoSQL và ứng dụng của chúng. Hiện nay, trên thị trường có khá nhiều NoSQL Database Management System: MongoDB, RavenDB, Redis, Neo4j,… Ta có thể chia NoSQL thành 4 loại: Key-Value Database Document Database Column-Family Database Graph Database Key-Value Database Giới thiệu : Dữ liệu được lưu trữ trong database dưới dạng key-value, giống như một Dictionary trong C# . Để truy vấn dữ liệu trong database, ta dựa vào key để lấy value ra. Các database dạng này có tốc độ truy vấn rất nhanh. Database tiêu biểu : Riak, Redis, MemCache, Project Voldemort, CouchBase Ứng dụng : Do tốc độ truy xuất nhanh, key-value database thường được dùng để làm cache cho ứng dụng (Tiêu biểu là Redis và MemCache). Ngoài ra, nó còn được dùng để lưu thông tin trong sessions, profiles/preferences của user… Document Database Giới thiệu : Mỗi object sẽ được lưu trữ trong database dưới dạng một document. Dữ liệu sẽ được lưu trữ dưới dạng BSON/JSON/XML dưới database. Dữ liệu không schema cứng như SQL, do đó ta có thể thêm/sửa field, thay đổi table , … rất nhanh và đơn giản. Database dạng này có tốc độ truy vấn nhanh, có thể thực hiện các câu truy vấn phức tạp, dễ mở rộng (scalability). Mỗi database có một kiểu truy vấn riêng , khá là loạn xà ngầu (RavenDB dùng Lucene, MongoDB lại dùng query document). Database tiêu biểu : MongoDB, RavenDB, CouchDB, TerraStone, OrientDB Ứng dụng : Do nhanh và linh động, document database thường đóng vài trò làm database cho các ứng dụng prototype , big data , e-commerce, CMS. Ngoài ra, ta còn dùng nó để lưu log hoặc history. Mình khuyên các bạn nên thử học MongoDB hoặc RavenDB nhé. Column-Family Database Giới thiệu : Dữ liệu được lưu trong database dưới dạng các cột, thay vì các hàng như SQL. Mỗi hàng sẽ có một key/id riêng. Điểm đặt biệt là các hàng trong một bảng sẽ có số lượng cột khác nhau . Câu lệnh truy vấn của nó khá giống SQL. Database tiêu biểu : Cassandra (Phát triển bởi Facebook), HyperTable, Apache HBase Ứng dụng : Column-Family Database được sử dụng khi ta cần ghi một số lượng lớn dữ liệu, big data . Nó còn được ứng dụng trong 1 số CMS và ứng dụng e-commerce. Graph Database Giới thiệu : Dữ liệu trong graph database được lưu dưới dạng các node. Mỗi node sẽ có 1 label, 1 số properties như một row trong SQL. Các node này được kết nối với nhau bằng các relationship. Graph database tập trung nhiều vào relationship giữa các node, áp dụng nhiều thuật toán duyệt node để tăng tốc độ. Database tiêu biểu : Neo4j, InfiniteGraph, OrientDB, HYPERGRAPHDB Ứng dụng : Khi cần truy vấn các mối quan hệ, graph database truy vấn nhanh và dễ hơn nhiều so với database. Nó được dùng trong các hệ thống: mạng nơ ron, chuyển tiền bạc, mạng xã hội (tìm bạn bè), giới thiệu sản phẩm (dựa theo sở thích/lịch sử mua sắm của người dùng)… Neo4j là một database free, lại có một cộng đồng rất lớn, với vô số bài hướng dẫn, các bạn nên học thử. Mapping thuật ngữ trong Relational Database và NoSQL database Bảng này chỉ có tính tương đối. Các node trong Graph DB không có key, mà các properties của nó sẽ đóng vai trò thay thế key. Xu thế trong tương lai – Polyglot persistance Như mình đã phân tích ở bài trước, NoSQL DB sẽ không thể nào thay thế được hoàn toàn RDBMS. Ngày trước, toàn bộ dữ liệu của một ứng dụng đều được lưu trữ dưới SQL Database. Giờ đây, NoSQL sẽ dần chiếm vị trí của RDBMS. Một số chức năng của ứng dụng không quá coi trọng tính toàn vẹn của dữ liệu, nhưng lại cần tốc độ truy vấn nhanh, dễ truy vấn. Các chức năng này sẽ sử dụng NoSQL để truy vấn/lưu trữ dữ liệu. Điều này tạo nên một xu hướng mới – áp dụng nhiều kiểu lưu trữ cho một ứng dụng, còn gọi là polyglot persistance . Các bạn đừng lo lắng kiến thức SQL của mình sẽ lỗi thời, vì cái ngày NoSQL chiếm chỗ của RDBMS còn lâu lắm . Tuy vậy, nếu các bạn muốn đi đầu về công nghệ, hoặc tham gia các công ty start-up , hãy tự trang bị cho mình kiến thức NoSQL nhé. Bài viết có tham khảo từ sách NoSQL Distilled và bài viết của tác giả: Rate this: Like this: Related
As introduced in the previous article, NoSQL Database is being used more and more, gradually taking over the position of Relational Database. This article will introduce some types of NoSQL and their applications. Currently, there are many NoSQL Database Management Systems on the market: MongoDB, RavenDB, Redis, Neo4j,... We can divide NoSQL into 4 types: Key-Value Database Document Database Column-Family Database Graph Database Key-Value Database Introduction: Data is stored in the database as key-value, like a Dictionary in C#. To query data in the database, we rely on the key to get the value. Databases of this type have very fast query speeds. Typical databases: Riak, Redis, MemCache, Project Voldemort, CouchBase Applications: Due to fast access speed, key-value databases are often used to cache applications (Typically Redis and MemCache). In addition, it is also used to store information in sessions, profiles/preferences of users... Document Database Introduction: Each object will be stored in the database in the form of a document. Data will be stored in BSON/JSON/XML format under the database. The data is not as rigid as SQL, so we can add/edit fields, change tables, etc. very quickly and simply. This type of database has fast query speed, can perform complex queries, and is easy to expand (scalability). Each database has its own query style, which is quite chaotic (RavenDB uses Lucene, MongoDB uses query document). Typical databases: MongoDB, RavenDB, CouchDB, TerraStone, OrientDB Applications: Because they are fast and flexible, document databases often act as databases for prototyping, big data, e-commerce, and CMS applications. In addition, we also use it to save log or history. I recommend that you try learning MongoDB or RavenDB. Column-Family Database Introduction: Data is stored in the database as columns, instead of rows like SQL. Each row will have its own key/id. The special point is that rows in a table will have different numbers of columns. Its query statement is quite similar to SQL. Typical databases: Cassandra (Developed by Facebook), HyperTable, Apache HBase Applications: Column-Family Database is used when we need to record a large amount of data, big data. It is also used in some CMS and e-commerce applications. Graph Database Introduction: Data in graph database is stored as nodes. Each node will have a label and some properties like a row in SQL. These nodes are connected to each other by relationships. Graph database focuses a lot on relationships between nodes, applying many node browsing algorithms to increase speed. Typical databases: Neo4j, InfiniteGraph, OrientDB, HYPERGRAPHDB Application: When needing to query relationships, graph database queries are much faster and easier than databases. It is used in systems: neural networks, money transfers, social networks (find friends), product recommendations (based on user preferences/shopping history)... Neo4j is a free database, There is a very large community, with countless tutorials, you should try it out. Mapping terms in Relational Database and NoSQL database This table is only relative. Nodes in Graph DB do not have keys, but their properties will act as key replacements. Future trend - Polyglot persistence As I analyzed in the previous article, NoSQL DB will not be able to completely replace RDBMS. In the past, all data of an application was stored under SQL Database. Now, NoSQL will gradually take the place of RDBMS. Some application functions do not attach much importance to data integrity, but need fast query speed and ease of querying. These functions will use NoSQL to query/store data. This creates a new trend – applying multiple storage types to one application, also known as polyglot persistence. Don't worry about your SQL knowledge being outdated, because the day NoSQL takes the place of RDBMS is still a long way off. However, if you want to be at the forefront of technology, or join start-up companies, equip yourself with NoSQL knowledge. The article references the NoSQL Distilled book and the author's article: Rate this: Like this: Related
Mình bắt đầu viết blog này vào ngày 31/12 năm trước, thấm thoắt mà cũng đã được gần 8 tháng rồi nhỉ. Bài viết này ra đời nhân kỉ niệm lượng bài viết của blog đã đạt đến con số 50. Bạn nào từng theo dõi blog chắc cũng thấy mình từng viết 1 bài viết ăn mừng blog đạt được 1000 view đầu tiên vào khoảng cách đây 2 tháng. Một chuyện dở khóc dở cười là, ngay sau khi mình chia sẻ và giới thiệu blog của mình với bạn bè trên facebook, lượng view trong ngày 09-05 đạt gần 1000 – bằng với lượng view của blog trong 4 tháng . Thế mới thấy, sức mạnh của quảng cáo bá đạo như thế nào. Lúc mới lập blog, do lượng content chưa nhiều và thực sự hữu ích, mình chưa thực hiện PR và quảng cáo rầm rộ. Hiện nay lượng bài viết trên blog cũng đã kha khá, mình nghĩ nó sẽ giúp ích (không ít thì nhiều) cho các bạn. Nhờ quảng bá trên facebook, mình cũng có được một số bạn đọc trung thành, quen được nhiều bạn mới. Lượng view mỗi ngày tăng từ 20 cho đến 100-140, vô cùng cảm ơn sự quan tâm các bạn đã dành cho mình. Như đã chia sẻ trong phần About me , mình viết blog này để chia sẻ kinh nghiệm lập trình và phát triển nghề nghiệp cho các bạn sinh viên/ mới ra trường. Blog của mình vẫn sẽ giữ tôn chỉ như vậy trong tương lai. Nếu các bạn thấy một bài viết trên blog này có ích, hãy chia sẻ giới thiệu nó cho bạn bè nhé. Mình tự cảm nhận thấy mình đã học được nhiều qua việc chia sẻ trên blog này: Mình không còn ngại khi phải viết những bài viết dài hơi, biết cách sắp xếp các ý khi diễn đạt, biết cách giải thích một vấn đề sao cho đơn giản dễ hiểu. Mình chân thành khuyên mỗi bạn lập trình hãy thử viết một blog nho nhỏ. Đừng nghĩ rằng: Mình có biết gì mà chia sẻ. Có khi những kiến thức, kinh nghiệm nho nhỏ mà bạn cho là vô dụng lại vô cùng quí giá với người khác đấy. Bạn không giúp được tất cả mọi người, nhưng đối với những người được giúp, họ sẽ thấy nó rất có ý nghĩa. (Bản thân mình rất vui vì được nhiều bạn khen bài viết hay, blog có ích). Mình được truyền cảm hứng từ câu chuyện nhỏ nhỏ dưới đây của dượng Tony buổi sáng , nay chia sẻ lại cho các bạn. Cứ mỗi chiều trên bãi biển nọ, người ta thấy một ông lão lang thang nhặt những con sao biển bị mắc cạn ném xuống biển. Ông làm việc này một cách cần mẫn. Nếu không, ngày mai khi nắng lên, chúng sẽ bị chết khô. Có người bảo việc làm của ông chỉ vô ích, vì mỗi ngày có hàng vạn con sao biển bị sóng đánh lên bờ, mà ông thì chỉ có hai tay hai chân và 24 giờ thôi, thì cả đời ông cũng không sao cứu hết chúng được. Ông lão mới trả lời, cả cuộc đời tôi không thể nào cứu hết những con sao biển, nhưng đối với từng con sao biển được tôi cứu giúp, nó lại có một cuộc đời. Dưới đây là tổng hợp 1 số series, bài viết hay, được nhiều người xem trên blog của mình. Chúng khá thú vị + hữu ích cho các bạn. Ngoài ra, để ăn mừng post thứ 50 (cũng như tặng thưởng cho các bạn chịu khó đọc tới cuối bài), 2 bạn đầu tiên comment cho post này sẽ có quyền yêu cầu mình viết một bài viết (về kĩ thuật, hoặc công việc) về lĩnh vực mà bạn muốn tìm hiểu nhé. Nếu có thắc mắc hay khó khăn gì, các bạn có thể gửi mail hoặc liên lạc trực tiếp qua facebook mình. Chỉ cần không phải là hỏi code hay nhờ fix bug, làm bài tập hộ thì mình rất sẵn lòng giúp đỡ. Rate this: Like this: Related
I started writing this blog on December 31st of last year, so it's been almost 8 months already. This article was created to celebrate the blog's number of articles reaching 50. Anyone who has followed the blog will probably see that I wrote an article to celebrate the blog reaching its first 1,000 views about 2 months ago. . A funny story is that, right after I shared and introduced my blog to my friends on Facebook, the number of views on May 9 reached nearly 1,000 - equal to the number of views of the blog in 4 months. That's how powerful advertising is. When I first started the blog, because the amount of content wasn't much and really useful, I didn't do much PR and advertising. Currently, the number of articles on the blog is quite good, I think it will be helpful (more or less) for you. Thanks to promoting on Facebook, I also gained a number of loyal readers and met many new friends. The number of views per day increased from 20 to 100-140. Thank you very much for your interest in me. As shared in the About me section, I wrote this blog to share programming experiences and career development for students/new graduates. My blog will still keep the same principle in the future. If you find an article on this blog useful, please share and recommend it to your friends. I feel like I have learned a lot through sharing on this blog: I am no longer afraid to write long articles, know how to organize ideas when expressing, know how to explain a problem in a way that simple and easy to understand. I sincerely advise every programmer to try writing a small blog. Don't think: I don't know anything to share. Sometimes the little knowledge and experiences that you consider useless are extremely valuable to others. You can't help everyone, but for those who are helped, they will find it very meaningful. (I'm very happy because many people praise my good article and useful blog). I was inspired by Uncle Tony's little story below this morning, and now I'm sharing it with you. Every afternoon on the beach, people see an old man wandering around picking up stranded starfish and throwing them into the sea. He did this diligently. Otherwise, when the sun comes up tomorrow, they will dry up. Some people said that his work was useless, because every day tens of thousands of starfish were washed ashore by the waves, and he only had two arms, two legs and 24 hours, so in his entire life he could not save them all. Okay. The old man replied, I cannot save all the starfish in my whole life, but for each starfish I save, it has a life. Below is a summary of some good series and articles that are viewed by many people on my blog. They are quite interesting + useful for you. In addition, to celebrate the 50th post (as well as reward those who are willing to read to the end of the post), the first 2 people to comment on this post will have the right to ask me to write an article (about technology, or technology). job) about the field you want to learn about. If you have any questions or difficulties, you can send an email or contact us directly via Facebook. As long as it's not asking for code or asking to fix bugs or do homework for you, I'm happy to help. Rate this: Like this: Related
Sau khi đọc xong phần 1 , hi vọng các bạn đã chuẩn bị được cho mình 1 mẫu CV rõ ràng mạch lạc. Nếu mọi chuyện đều ổn, khoảng 1-5 ngày sau khi gửi CV, bạn sẽ được một/nhiều công ty gọi điện thoại mời đi phỏng vấn . Sau khi nhận điện thoại, hãy kiểm tra hộp mail, sau đó gửi mail xác nhận rằng mình sẽ có mặt tại công ty lúc X giờ, ngày Y để thực hiện phỏng vấn nhé, quên gửi mail là chết đấy. Một số công ty còn có thêm vòng interview qua điện thoại. Một số công ty lớn (Fsoft, Harvey Nash, …) có cả entry test – bài thi đầu vào dành cho ứng viên, bao gồm: Thi tiếng Anh, kiến thức lập trình cơ bản, các bạn nên chú ý. Những việc bạn cần làm trước khi đi PV Tìm đường đến nơi PV : Nếu có thể, hay đi ngang nơi phỏng vấn trước đó 1 ngày. Điều này giúp bạn ước lượng được khoảng thời gian đi. Tới hôm phỏng vấn, bạn sẽ khá hồi hộp, lo lắng; biết trước đường tới nơi phỏng vấn sẽ giúp bạn tự tin hơn so với tới hôm PV mới tìm. Tìm hiểu công ty bạn PV : Đây là điều quan trọng nhất mà khá nhiều bạn bỏ sót. Hãy lên trang web của cty đó, xem và ghi nhớ những thông tin quan trọng như: Công ty tập trung vào lĩnh vực nào, môi trường làm việc ra sao, công ty coi trọng những giá trị nào của nhân viên… Biết những điều này, bạn sẽ có cái nhìn tổng quan về công việc mình sắp làm, cũng như ghi điểm với nhà tuyển dụng. Xem xét giá cả thị trường, yêu cầu lương hợp lý : Có một thực tế phũ phàng là, nếu bạn không đòi hỏi mức lương, nhà tuyển dụng sẽ trả cho bạn mức lương thấp nhất có thể (Ai cũng muốn tiết kiệm mà). Mức lương có thể được ghi rõ trong mẫu quảng cáo việc làm, có thể không. Bạn có thể tham khảo mức lương từ những người quen làm công ty đó, hoặc người quen có vị trí tương đương vị trí bạn muốn apply (VD bạn muốn apply vị trí senior dev , bạn có thể hỏi người quen làm senior dev để biết khoảng lương). Ôn lại kiến thức : Xem lại kiến thức cơ bản về lập trình, OOP, tiếp theo là những kiến thức liên quan đến phần mà nhà tuyển dụng yêu cầu ( C# , Java, SQL, MVC, Struts, …). Bạn có thể google C# interview questions hoặc tương tự để tìm những câu hỏi phỏng vấn hay được hỏi. Bạn nên dành 3-5 ngày cho việc này. Quy trình phỏng vấn Như mình đã nói ở đầu bài, quy trình phỏng vấn ở các công ty thường khác nhau, tuy nhiên nó thường bao gồm các bước sau. Phone interview hoặc entry test Đây là vòng để sàng lọc ứng viên, tiết kiệm thời gian cho nhà tuyển dụng. Bạn sẽ bị hỏi một số kiến thức cơ bản về ngôn ngữ , framework mình ghi trong CV (C#, MVC, …). Qua buổi phỏng vấn ngắn (20-30p), người phỏng vấn sẽ quyết định có nên mời bạn đến cty phỏng vấn hay không Face interview – Vòng quan trọng nhất Nếu mọi chuyện êm xuôi, bạn sẽ tới công ty để phỏng vấn. Hãy nhớ rằng đây cũng là cơ hội để bạn phỏng vấn ngược lại nhà tuyển dụng. Bạn có thể quan sát công ty để có cái nhìn tổng quan về không khí làm việc, môi trường làm việc. Dưới đây là những câu hỏi bạn sẽ được hỏi khi phỏng vấn: Giới thiệu bản thân? Bạn có thể nói sơ về số năm kinh nghiệm, sở thích về công nghệ, vị trí muốn làm (Khoảng 2p thôi nhé). Hãy nói về 1 project bạn đã làm? Bạn làm vai trò gì? Người PV sẽ hỏi khá kĩ về cấu trúc project, công việc bạn làm, khó khăn bạn gặp phải, cũng như cách xử lý. Họ sẽ đánh giá được nhiều điều từ bạn qua câu hỏi này. Một loạt các câu hỏi technical liên quan tới những gì bạn ghi trong CV . Bạn sẽ được hỏi từ backend (Database, SQL, Entity Framework, LINQ , Delegate ), cho tới front end (HTML, CSS, jQuery, AngularJS,…), và những điều liên quan tới framework (MVC routing, model mapping, …). Ngoài những câu lý thuyết, có thể bạn sẽ được yêu cầu giải quyết vấn đề. Vd: Anh muốn submit một form bằng Ajax phải thế nào? Một loạt câu hỏi liên quan đến OOP, kiểu dữ liệu, thuật toán v..v . Đây là những câu hỏi về kiến thức fundamental , dùng để đánh giá kiến thức nền tảng của bạn, không liên quan đến ngôn ngữ hay framework nhé. Có thể bạn sẽ bị bắt viết code trên giấy hoặc trên máy để giải một số câu hỏi đánh giá trình độ. Một số câu hỏi cá nhân để không khí bớt căng thẳng: Bạn có sở thích gì? Bạn có điểm yếu điểm mạnh gì? Cứ trả lời thành thật nhé. Người PV không chỉ đánh giá bạn qua khả năng kĩ thuật, mà còn đánh giá qua thái độ làm việc, thái độ trả lời câu hỏi. Có nhiều câu hỏi bạn không biết, nhưng nếu cố gắng trả lời, thể hiện thái độ muốn học hỏi bạn vẫn sẽ được đánh giá cao nhé. Cuối buổi phỏng vấn, bạn sẽ được hỏi câu cuối cùng: Bạn có câu hỏi gì không? Mình khuyên các bạn nên hỏi về những điều sau đây: Môi trường làm việc ra sao, có bắt OT không? Chính sách review tăng lương tăng thưởng thế nào? Công ty có tổ chức seminar hay chính sách gì để giúp nhân viên phát triển không?. Những câu hỏi này sẽ thể hiện bạn có tinh thần làm việc nghiêm túc, biết suy nghĩ đến tương lai. Người PV bạn có thể là PM, Team Leader của một dự án. Nếu mọi chuyện ok, bạn sẽ phỏng vấn với quản lý, nhân sự hoặc chính người PV để đàm phán về lương bổng cũng như thời gian bạn có thể bắt đầu đi làm . Sau khoảng 2-10 ngày làm việc, bạn sẽ nhận được điện thoại, mail thông báo kết quả PV. Nếu bạn được nhận, mail có thể đính kèm offer letter. Bạn nhớ chuẩn bị đầy đủ giấy tờ để nộp cho phòng nhân sự vào ngày đầu tiên đi làm của mình nhé. * Sau buổi phỏng vấn, nhớ gửi một email cảm ơn cho người đã phỏng vấn mình. Đây là một điều nho nhỏ, hiệu quả lại lơn lớn mà các bạn thường “quên” không làm. Ngoài ra, mọi người có thể tìm đọc cuốn What color is your parachute? . Đây là một cuốn sách khá hay về xác định bản thân, phỏng vấn và xin việc . Hi vọng bài viết này sẽ có ích cho các bạn. Rate this: Like this: Related
After reading part 1, I hope you have prepared yourself a clear and coherent CV template. If everything goes well, about 1-5 days after sending your CV, you will receive a call from one/many companies inviting you for an interview. After receiving the phone call, check your email box, then send an email confirming that you will be at the company at Some companies also have an additional round of phone interviews. Some large companies (Fsoft, Harvey Nash, ...) have entry tests - entrance exams for candidates, including: English test, basic programming knowledge, you should pay attention. Things you need to do before going to PV Find your way to the interview location: If possible, go by the interview location a day before. This helps you estimate travel time. On the day of the interview, you will be quite nervous and worried; Knowing in advance how to get to the interview location will help you feel more confident than when the interviewer started looking for you. Get to know your company PV: This is the most important thing that many people miss. Go to that company's website, view and remember important information such as: What fields does the company focus on, what is the working environment like, what values ​​does the company value in its employees... Know these things. With this, you will have an overview of the work you are about to do, as well as score points with employers. Consider the market price, ask for a reasonable salary: There is a harsh reality that, if you do not ask for a salary, the employer will pay you the lowest possible salary (Everyone wants to save). . Salary may be stated clearly in the job advertisement, but it may not be. You can refer to the salary from acquaintances who work at that company, or acquaintances with similar positions to the position you want to apply for (for example, if you want to apply for a senior dev position, you can ask an acquaintance who works as a senior dev to know). salary range). Review knowledge: Review basic knowledge of programming, OOP, followed by knowledge related to the part required by the employer (C#, Java, SQL, MVC, Struts, ...). You can google C# interview questions or similar to find commonly asked interview questions. You should spend 3-5 days for this. Interview process As I said at the beginning of the article, the interview process at companies is often different, however it usually includes the following steps. Phone interview or entry test This is the round to screen candidates, saving time for employers. You will be asked some basic knowledge about the language and framework you wrote in your CV (C#, MVC, ...). Through a short interview (20-30 minutes), the interviewer will decide whether to invite you to the company for an interview or not. Face interview - The most important round If everything goes well, you will come to the company for an interview. Remember that this is also your opportunity to reverse interview the employer. You can observe the company to get an overview of the working atmosphere and working environment. Here are the questions you will be asked during the interview: Introduce yourself? You can briefly talk about your years of experience, your interests in technology, and the position you want to work in (about 2 minutes). Let's talk about a project you did? What role do you play? The reporter will ask quite carefully about the project structure, the work you do, the difficulties you encounter, as well as how to handle them. They will evaluate many things from you through this question. A series of technical questions related to what you write in your CV. You will be asked questions from the backend (Database, SQL, Entity Framework, LINQ, Delegate), to the front end (HTML, CSS, jQuery, AngularJS, ...), and things related to the framework (MVC routing, model mapping, ... ). In addition to theoretical questions, you may be asked to solve problems. Ex: How do you want to submit a form using Ajax? A series of questions related to OOP, data types, algorithms, etc. These are questions about fundamental knowledge, used to evaluate your fundamental knowledge, not related to languages ​​or frameworks. You may be asked to write code on paper or on a computer to solve some proficiency assessment questions. Some personal questions to reduce tension: What are your hobbies? What are your strengths and weaknesses? Just answer honestly. The interviewer not only evaluates you by your technical ability, but also by your working attitude and answering questions. There are many questions you don't know, but if you try to answer and show an attitude of wanting to learn, you will still be appreciated. At the end of the interview, you will be asked the last question: Do you have any questions? I advise you to ask about the following: What is the working environment like, is there OT required? What is the policy for reviewing salary increases and bonuses? Does the company organize seminars or any policies to help employees develop? These questions will show that you have a serious working spirit and know how to think about the future. Your PV person can be the PM, Team Leader of a project. If everything is ok, you will interview with the manager, human resources or the PV person to negotiate salary as well as the time you can start working. After about 2-10 working days, you will receive a phone call or email informing you of the PV results. If you are accepted, the email may include an offer letter. Remember to prepare all documents to submit to the human resources department on your first day of work. * After the interview, remember to send a thank you email to the person who interviewed you. This is a small thing with great effectiveness that you often "forget" to do. In addition, people can read the book What color is your parachute? . This is a pretty good book about defining yourself, interviewing, and applying for a job. Hope this article will be useful to you. Rate this: Like this: Related
Chẳng là gần đây, công ty mình vưa tuyển thêm 1 anh Technical Lead. Đợt mình hỏi ông leader phỏng vấn thế nào, ổng nhận xét “Kiến thức base C# khá vững, nói được những thay đổi của C# từ 1.0 tới 5.0”. Mặc dù mình chỉ là junior dev nhưng mình thấy phần này không khó, do lỡ tìm hiểu rồi nên post bài này chia sẻ cho các bạn luôn. Kiến thức ở bài viết này khá có ích, thích hợp đem đi chém gió, phỏng vấn hoặc hù mem mới. Lưu ý nhỏ: C# thường được release với .NET. C# là ngôn ngữ lập trình, còn .NET là 1 thư viện /framework (Ta có VB.NET, F#, ASP.NET v…v). Trong phạm vi bài viết, mình chỉ đề cập vê những thay đổi trong bản thân ngôn ngữ C# , không giới thiệu những công nghệ mới qua từng phiên bản .NET như EF, WIF, v…v nhé. Có một số phần mình đã viết rồi, chỉ dẫn link tới bài viết cũ nhé. 1. C# 2 – Giải quyết vấn đề từ C# 1 a. Kiểu dữ liệu Generic : Nói đơn giản, nó là kiểu <T> mà các bạn hay dùng ấy. Với generic, code trở nên gọn gàng sáng sủa hơn, ta cũng có thể tái sử dụng function cho nhiều kiểu dữ liệu khác nhau. b. Kiểu dữ liệu nullable: Trong nhiều trường hợp, ta cần thể hiện giá trị null với kiểu dữ liệu tham trị như int, double v…v. Với 1 số ngôn ngữ khác, ta phải chuyển nó sang dạng tham chiếu như Interger, Double. Với C# 2, ta có thể dùng kiểu nullable, khai báo bằng cách: Nullable<int> hoặc int?. Rất ngắn gọn và đơn giản/ c. Delegate : Đã có thể sử dụng anonymous delegate , viết ngắn học hơn so với C# 1 d. Partial class: Một partial class có thể được khai báo trong nhiều file khác nhau. Partial class được áp dụng trong Winform, class tự sinh từ Entity Framework, giúp ta dễ dàng thêm chức năng vào form, class mà không cần động tới những class được C# tự tạo ra. d. Iterator (IEnumerable) : Để duyệt từng phần tử một mảng, ta có thể dùng hàm foreach. Iterator là một cực hình khi implement trong C# 1. Với từ khóa yield, việc tạo Iterator trong C# đã trở nên rất dễ ràng 2. C# 3 – Cải tiến trong data access, LINQ chào đời a. Một số thay đổi nhỏ trong compiler: Một số thay đổi nho nhỏ được C# thêm vào, giúp việc code trở nên nhẹ nhàng hơn, bạn có thể xem code của các thay đổi này trong 2 phần đầu của series C# hay ho . Tự implement getter, setter thông qua properties Khởi tại object và array một cách dễ dàng Khai báo bằng biến var Anonymous class b. Lambda expression : Lambda expression giúp việc viết delegate trở nên dễ dàng hơn rất nhiều. Mình đã viết 1 bài khá kĩ về thứ này, bạn có thể xem lại nếu quên. c. Extension method : Bạn đọc lại phần mình viết về extension method ở bài viết trong link nhé. d. Query và LINQ : Đây là phiên bản C# đầu tiên LINQ ra đời, đã làm võ lâm dậy sóng, giang hồ chấn động . Những cải tiến như var, anonymous class, lamda expression, extension method đều là nền tảng để xây dựng LINQ. e. Ứng dụng khác của LINQ: Ban đầu, LINQ được dùng để filter, sort v…v các object trong bộ nhớ. Nhờ sự trợ giúp của expression tree, LINQ đã có 1 số ứng dụng khác như: LINQ to SQL (Dịch lambda expression thành SQL, query trực tiếp dưới database), LINQ to XML, Parellel LINQ. 3. C# 4 – Thay đổi nho nhỏ a. Cải tiến nhỏ giúp code ngắn gọn hơn: Thêm named arguments và optional parameters b. Lập trình với dynamic : Đây là thay đổi lớn nhất và đáng chú ý nhất trong C#. Với dynamic, giờ đây ta có thể làm việc với các object từ những ngôn ngữ dynamic như Python, Ruby, Javascript, … Nghe có vẻ hoành tráng nhưng mình thấy dynamic ít được xài trong cái project thật, không hiểu vì sao :(. 4. C# 5 – Giảm thiểu đau đầu khi code bất đồng bộ Điểm nhấn lớn nhất của phiên bản C# 5 này chính là 2 từ khóa async và await . Nhiều function trong C# đã được hỗ trợ call async và await. Phần này thì mình xin thú thật là mình cũng đọc rồi, nhưng do chưa áp dụng nhiều nên không hiểu mấy, có lẽ khi mình hiểu sâu hơn về vấn đề này, mình sẽ viết 1 bài hướng dẫn. (Ngày xưa mấy cái như event, delegate mình cũng ngu vậy ấy, về sau gặp trong code nhiều là tự động khá lên à.) Cảm ơn sự quan tâm theo dõi của các bạn đọc trong thời gian qua. Trong 4 tháng mình đạt được mốc 1000 view, nhưng mới quảng cáo trên fb 1 ngày đã được hơn 1000 view, ngày hôm sau được ~400 view nữa :'(, sức mạnh của quảng cáo thật là to lớn quá a :'(. Rate this: Like this: Related
Recently, my company just hired another Technical Lead. When I asked the leader how his interview was, he commented, "Basic C# knowledge is quite solid, can talk about changes in C# from 1.0 to 5.0". Even though I'm only a junior dev, I don't find this part difficult. Because I've already learned it, I'm posting this article to share with you all. The knowledge in this article is quite useful, suitable for gossiping, interviewing or scaring new memes. Small note: C# is often released with .NET. C# is a programming language, and .NET is a library/framework (We have VB.NET, F#, ASP.NET, etc.). Within the scope of the article, I only mention changes in the C# language itself, not introducing new technologies through each .NET version such as EF, WIF, etc. There are some parts I have already written, just link to the old article. 1. C# 2 – Solving problems from C# 1 a. Generic data type: Simply put, it is the <T> type that you often use. With generics, the code becomes cleaner and brighter, we can also reuse functions for many different data types. b. Nullable data type: In many cases, we need to represent null values ​​with reference data types such as int, double, etc. With some other languages, we have to convert it to a reference form like Interger, Double. With C# 2, we can use the nullable type, declared by: Nullable<int> or int?. Very short and simple/ c. Delegate: Can use anonymous delegate, writing is shorter than C# 1 d. Partial class: A partial class can be declared in many different files. Partial class is applied in Winform, a self-generated class from Entity Framework, helping us easily add functions to forms and classes without touching the classes created by C# itself. d. Iterator (IEnumerable): To browse each element of an array, we can use the foreach function. Iterator is a torture to implement in C# 1. With the yield keyword, creating an Iterator in C# has become very easy 2. C# 3 – Improvements in data access, LINQ was born a. Some small changes in the compiler: Some small changes were added by C#, making coding easier. You can see the code of these changes in the first 2 parts of the cool C# series. Implement getter and setter yourself through properties Initialize objects and arrays easily Declare with var variable Anonymous class b. Lambda expression: Lambda expression makes writing delegates much easier. I wrote a pretty detailed article about this, you can review it if you forgot. c. Extension method: Please re-read the part I wrote about extension methods in the article in the link. d. Query and LINQ: This is the first C# version of LINQ released, causing a stir in the martial arts world and a shock in the streets. Improvements such as var, anonymous class, lamda expression, extension method are all fundamental to building LINQ. e. Other applications of LINQ: Initially, LINQ was used to filter, sort, etc. objects in memory. Thanks to the help of expression trees, LINQ has a number of other applications such as: LINQ to SQL (Translate lambda expression into SQL, query directly in the database), LINQ to XML, Parellel LINQ. 3. C# 4 – Small changes a. Small improvements to make the code more concise: Add named arguments and optional parameters b. Programming with dynamic: This is the biggest and most notable change in C#. With dynamic, we can now work with objects from dynamic languages ​​such as Python, Ruby, Javascript, etc. It sounds grand but I see dynamic is rarely used in real projects, I don't understand why :(. 4. C# 5 - Minimize headaches when coding asynchronously The biggest highlight of this version of C# 5 is the two keywords async and await . Many functions in C# already support calling async and await To be honest, I have read it, but because I haven't applied it much, I don't understand it much. Maybe when I understand this issue more deeply, I will write a tutorial on things like events and delegates It's also stupid, after seeing it in code a lot, it automatically gets better.) Thank you for your attention and following during the past 4 months, I reached the 1000 view mark, but just advertised above One day fb got more than 1000 views, the next day ~400 more views :'(, the power of advertising is so great :'(. Rate this: Like this: Related
Mình từng post một comic khá đơn giản về chuyện “ Thiết kế của một trang web có thể trở nên banh chành như thế nào “. Đó là một câu chuyện về ảnh hưởng của khách hàng đã làm “banh chành” một sản phẩm của designer. Tuy chỉ là chuyện hài, nhưng nó vốn là một chuyện buồn có thật mà những người trong nghề như chúng ta đều gặp phải. Tuy nhiên, thật ra ai có lỗi trong chuyện này …? Sự khác biệt giữa “người lao động chân tay” và “chuyên viên” là ở chỗ: người lao động làm theo lệnh của cấp trên, còn chuyên viên thì đưa ra hướng giải quyết cho cấp trên. Người lao động được thuê để làm việc theo chỉ dẫn, còn chuyên viên được trả tiền để đưa ra chỉ dẫn đúng đắn . *Khi chọn cách dịch này, mình không có ý coi thường hay xem nhẹ việc lao động chân tay nhé, mình chỉ dùng từ như vậy để dễ so sánh 2 đặc thù công việc khác nhau thôi. Hãy tượng tượng 1 cuộc nói chuyện giữa bệnh nhân và bác sĩ : Bệnh nhân: Tôi đau tay. Bác sĩ: Giờ anh muốn tôi làm gì? Bệnh nhân: Làm tay tôi hết đau Bác sĩ: Để tôi cắt tay anh là xong nhé? Dễ lắm Bệnh nhân: Không, tôi chỉ muốn hết đau thôi Bác sĩ: Cắt hết dây thần kinh nối tới tay anh là xong, hết đau ngay Bệnh nhân: Còn cách nào nhẹ nhàng hơn ko? Bác sĩ: Xin lỗi, hết giờ làm rồi Dĩ nhiên bác sĩ bình thường không hành xử thế này. Dù bệnh nhân là khách hàng, bệnh nhân trông cậy vào bác sĩ đưa ra câu trả lời, phương pháp giải quyết Một phiên bản khác của cuộc nói chuyện này Bệnh nhân: Tôi muốn chặt tay. Bác sĩ: Tay anh bị gì? Bệnh nhân: Đau vl, mệt lắm rồi, cắt cmn đi Bác sĩ: Đưa tay tôi xem? Chắc bị bong gân hay trật khớp thôi. Phải chụp X-quang. Bệnh nhân: Không, cắt cmn đi Bác sĩ: Xin lỗi anh, tôi không chặt tay lành lặn Bệnh nhân: Nhưng tôi trả tiền mà. Tôi nói gì ông phải làm chứ? Bác sĩ: Không. Nếu chặt tay anh, tôi sẽ vi phạm đạo đức của một người hành nghề y. Bạn muốn làm một bác sĩ thế nào? Quay lại ngành của chúng ta, bạn muốn là một developer như thế nào? Lập trình viên, cũng là “chuyên viên”. Bạn có nhiều kiến thức về thiết kế, hiện thực phần mềm hơn khách hàng/cấp trên của bạn. Bạn được trả tiền cho chuyện đó. Tất cả quy kết lại một điều. Chuyên viên là người phải dám nói KHÔNG. Khi cấp trên/khách hàng đưa ra 1 định hướng, yêu cầu vô lý, nhiệm vụ của bạn là phải từ chối yêu cầu đó. Có nguy hiểm gì không? Đương nhiên là có. Nhưng, là một chuyện viên, đồng nghĩa với việc bạn phải dám giữ lập trường của mình. Có những chuẩn mực mà người chuyên viên không bao giờ nên vi phạm . Dĩ nhiên, nói KHÔNG chỉ là một phần. Là một chuyên viên, bạn phải sử dụng kĩ năng của mình, đưa ra những lựa chọn thay thế khả thi, phù hợp. Người chuyên viên phải biết đàm phán với cấp trên, để đưa ra những định hướng, giải pháp thỏa mãn yêu cầu của cả hai bên. Trong mẩu truyện mình đã đăng, chàng web-designer đã không hành xử như một chuyên viên . Anh làm việc như một “người lao động tay chân”. Đống shit ở cuối truyện là do lỗi của anh. Lẽ ra anh phải biết nói KHÔNG , và đàm phán/giải thích với khách hàng, thay vì làm mọi việc khách hàng yêu cầu. Trong truyện, chàng designer là nạn nhân – giỏi giang nhưng yếu thế, còn khách hàng là một gã ngu đần lại còn lậm quyền. Sự thật thì, anh designer đã tự biến mình thành nạn nhân, chối bỏ trách nhiệm, không chịu nói KHÔNG trước những yêu cầu vô lý của khách hàng. Là một lập trình viên/chuyên viên, bạn đừng bao giờ để mình trở thành một nạn nhân như vậy nhé. Bài viết được lược dịch từ trang : . Tác giả bài viết là Robert Martin, người viết cuốn sách Clean Code . Ông cũng là một cây đa cây đề trong ngành phần mềm . Rate this: Like this: Related
I once posted a fairly simple comic about "How cool the design of a website can be". It's a story about how a customer's influence "popped" a designer's product. Although it's just a comedy, it is a real sad story that people in the profession like us all encounter. However, who is actually at fault in this matter...? The difference between "manual workers" and "specialists" is that workers follow orders from their superiors, while specialists give solutions to their superiors. Workers are hired to work according to instructions, and specialists are paid to give correct instructions. *When choosing this translation, I do not mean to belittle or underestimate manual labor, I only use such words to easily compare two different job characteristics. Imagine a conversation between a patient and a doctor: Patient: My arm hurts. Doctor: Now what do you want me to do? Patient: Stop the pain in my hand. Doctor: Let me cut your hand and that's it, okay? It's easy. Patient: No, I just want the pain to go away. Doctor: Cut all the nerves connecting to your hand and that's it, the pain will go away immediately. Patient: Is there a gentler way? Doctor: Sorry, time's up. Of course, normal doctors don't behave like this. Even though the patient is the customer, the patient relies on the doctor to provide answers and solutions. Another version of this conversation Patient: I want to cut off my hand. Doctor: What's wrong with your hand? Patient: It hurts so much, I'm tired, cut it off Doctor: Can I see your hand? Probably sprained or dislocated. X-rays must be taken. Patient: No, cut it off. Doctor: I'm sorry, I didn't cut off my healthy hand. Patient: But I paid for it. What do I say you should do? Doctor: Không. If I cut off your hand, I would violate my ethics as a medical practitioner. How do you want to be a doctor? Back to our industry, what kind of developer do you want to be? Programmers are also "experts". You have more knowledge about software design and implementation than your customers/supervisors. You get paid for that. It all boils down to one thing. An expert is someone who must dare to say NO. When your superior/customer gives you an unreasonable direction or request, your task is to refuse that request. Is there anything dangerous? Of course yes. But, being a reporter means you have to dare to stand your ground. There are standards that professionals should never violate. Of course, saying NO is only part of it. As a professional, you must use your skills and come up with viable, appropriate alternatives. The specialist must know how to negotiate with superiors to provide directions and solutions that satisfy the requirements of both parties. In the story I posted, the web-designer did not act like a professional. He worked as a “manual laborer.” The shit at the end of the story is your fault. You should have known how to say NO, and negotiate/explain with the customer, instead of doing everything the customer asked. In the story, the designer is the victim - talented but weak, and the customer is a stupid guy who also abuses power. In truth, the designer turned himself into a victim, denied responsibility, and refused to say NO to the customer's unreasonable requests. As a programmer/professional, you should never let yourself become such a victim. The article is translated from page: . The author of the article is Robert Martin, who wrote the book Clean Code. He is also a veteran in the software industry. Rate this: Like this: Related