Friday, August 12, 2022

Prerequisites for Algorithms by Jeff Erickson

Author lists below as the prerequisites for reading his book: (Below content has been copied from the Prerequisites pages of his book)

• Discrete mathematics: High-school algebra, logarithm identities, naive set theory, Boolean algebra, first-order predicate logic, sets, functions, equivalences, partial orders, modular arithmetic, recursive definitions, trees (as abstract objects, not data structures), graphs (vertices and edges, not function plots). 

• Proof techniques: direct, indirect, contradiction, exhaustive case analysis, and induction (especially “strong” and “structural” induction). Chapter 0 uses induction, and whenever Chapter n−1 uses induction, so does Chapter n. 

• Iterative programming concepts: variables, conditionals, loops, records, indirection (addresses/pointers/references), subroutines, recursion. I do not assume fluency in any particular programming language, but I do assume experience with at least one language that supports both indirection and recursion. 

• Fundamental abstract data types: scalars, sequences, vectors, sets, stacks, queues, maps/dictionaries, ordered maps/dictionaries, priority queues. 

• Fundamental data structures: arrays, linked lists (single and double, linear and circular), binary search trees, at least one form of balanced binary search tree (such as AVL trees, red-black trees, treaps, skip lists, or splay trees), hash tables, binary heaps, and most importantly, the difference between this list and the previous list. 

• Fundamental computational problems: elementary arithmetic, sorting, searching, enumeration, tree traversal (preorder, inorder, postorder, levelorder, and so on). 

• Fundamental algorithms: elementary algorism, sequential search, binary search, sorting (selection, insertion, merge, heap, quick, radix, and so on), breadth- and depth-first search in (at least binary) trees, and most importantly, the difference between this list and the previous list.

• Elementary algorithm analysis: Asymptotic notation (o, O, Θ, Ω, ω), translating loops into sums and recursive calls into recurrences, evaluating simple sums and recurrences. 

• Mathematical maturity: facility with abstraction, formal (especially recursive) definitions, and (especially inductive) proofs; writing and following mathematical arguments; recognizing and avoiding syntactic, semantic, and/or logical nonsense.


Books:

Margaret M. Fleck. Building Blocks for Theoretical Computer Science, unpublished textbook, most recently revised January 2013. Available from http://mfleck.cs.illinois.edu/building-blocks/. 

• Eric Lehman, F. Thomson Leighton, and Albert R. Meyer. Mathematics for Computer Science, unpublished lecture notes, most recent (public) revision June 2018. Available from https://courses.csail.mit.edu/6.042/spring18/. (I strongly recommend searching for the most recent revision.) 

• Pat Morin. Open Data Structures, most recently revised January 2016 (edition 0.1Gβ). A free open-content textbook, which Pat maintains and regularly updates. Available from http://opendatastructures.org/.



Monday, June 20, 2022

How to run bundler with a lower version

~/xxxxx/xxxxx/xxxxx/xxxx/xxxxxx/xxxxxxxx$ gem list | grep bundler
bundler (2.1.4, 1.17.3, 1.16.4, 1.16.1)

~/xxxxx/xxxxx/xxxxx/xxxx/xxxxxx/xxxxxxxx$ bundle _1.17.3_ install
https://stackoverflow.com/questions/9725811/how-to-downgrade-bundler-or-upgrade-rails

Monday, May 23, 2022

Install nvm on MacOS

https://stackoverflow.com/questions/67241196/error-no-template-named-remove-cv-t-in-namespace-std-did-you-mean-remove

https://tecadmin.net/install-nvm-macos-with-homebrew/

Sunday, May 1, 2022

Upgrading from Rails 6.1 to Rails 7.0

https://edgeguides.rubyonrails.org/7_0_release_notes.html

https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-6-1-to-rails-7-0

https://medium.com/geekculture/whats-new-in-rails-7-b97d44eecdb2

https://dev.to/thomasvanholder/how-to-upgrade-rails-61-to-rails-7-33a3

https://dev.to/thomasvanholder/rails-7-framework-defaults-part-1-2a59

https://www.fastruby.io/blog/rails/upgrades/upgrade-rails-6-1-to-7-0.html

https://www.youtube.com/watch?v=SjdV_1k1QWY ---> Upgrade from Rails 6 to Rails 7 – web-crunch.com

Tuesday, April 12, 2022

Rails ActiveRecord: 2 ways to write 'where' clause

result = Product.where("description LIKE ?", "%Lorem%")

result = Product.where("description LIKE :term", {term: "%Lorem%"})

Thursday, March 31, 2022

MySQL - finding out slow queries

 SELECT * FROM `mysql`.slow_log ORDER BY query_time DESC;

Sunday, March 6, 2022

sed command example

 https://stackoverflow.com/questions/71318743/kubectl-versions-error-exec-plugin-is-configured-to-use-api-version-client-auth

Below command will take a backup of the file and substitute v1alpha1 with v1beta1

sed -i .bak -e 's/v1alpha1/v1beta1/' ~/.kube/config


Friday, March 4, 2022

React Native project - Sep 19 2021

  Build Uber Eats with React Native & YELP API | Redux | Firebase | Google API

React Native project - Jul 30, 2021

Let's build Uber 2.0 with REACT NATIVE! (Navigation, Redux, Tailwind CSS & Google Autocomplete)  

Rails improvements in 2021 - DHH

 https://world.hey.com/dhh/no-railsconf-faa7935e

Tuesday, March 1, 2022

Checklist app in SwiftUI using Core Data

Checklist app in SwiftUI using Core Data - Part 1

Jul 19, 2021

https://www.youtube.com/watch?v=6qtUL8Qgmcw


Checklist app in SwiftUI using Core Data - Part 2

Jul 21, 2021

https://www.youtube.com/watch?v=4RJrHbk-VgE

Build a macOS Menu Bar Realtime Crypto Tracker with SwiftUI & WebSocket - Feb 4, 2022

 

SwiftUI Basic Components

 https://betterprogramming.pub/swiftui-basic-components-ac2c62dc7b95

New CSS features in 2022

 https://www.smashingmagazine.com/2022/03/new-css-features-2022/

Tech Interview Prep

 https://aikikode.me/blog/interview-preparation-2022/

SwiftUI - Alternative to MVVM OR cleaner MVVM

 

iOS related: UI Design for Developers

https://www.youtube.com/playlist?list=PLDaHCLWmCcQLvG6AOpw5VxopkBKIcH9m7 

Above needs subscription 

Adapt SwiftUI app for iPad, Landscape, and Dark Mode

 

Tuesday, February 8, 2022

Sha256 Algorithm Explained

https://sha256algorithm.com/ 

Principles for Designing and Deploying Scalable Applications on Kubernetes - Feb 2022

 https://elastisys.com/designing-and-deploying-scalable-applications-on-kubernetes/

AWS Lambda and ffmpeg

https://aws.amazon.com/blogs/media/processing-user-generated-content-using-aws-lambda-and-ffmpeg/ 

https://aws.amazon.com/blogs/media/2020-resolution-add-user-generated-content-to-your-applications/

Signed Cookies and Signed Urls on AWS CloudFront

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-signed-urls.html 

Video-on-demand on AWS

https://aws.amazon.com/solutions/implementations/video-on-demand-on-aws/ 

YouTube vs Vimeo

https://blog.hubspot.com/marketing/youtube-vs-vimeo 

HTML5 Streaming

 https://flussonic.com/blog/news/html5-streaming/

Saturday, January 8, 2022

Rails related: Concerns, Module-method extraction Vs Class-based extraction, Concerning module

1) Single-use Modules are probably better off as Classes as per the below article.

 https://www.cloudbees.com/blog/when-to-be-concerned-about-concerns

By and large, maintainers tend to agree that smaller composable classes are the best way to isolate code and keep things clean.

....

....

I'm not saying that you need to go out and refactor all your single-use modules into classes. I am saying if you find yourself reaching to do a module-method extraction, stop. Consider what road you're starting down and these lessons I've shared. What would a class-based extraction look like instead?

2) https://blog.appsignal.com/2020/09/16/rails-concers-to-concern-or-not-to-concern.html 

3) https://api.rubyonrails.org/v5.0/classes/Module/Concerning.html

4) https://scoutapm.com/blog/rails-concerns - sort of consolidates content from the above articles

5) https://rails.devcamp.com/trails/dissecting-rails-5/campsites/data-management-rails/guides/how-to-use-concerns-rails-5

 

Friday, January 7, 2022

Ruby - differences between Proc and Lambda

 https://medium.com/rubycademy/procs-and-lambdas-46433b93080d

Is module_function really the same as extend self?

https://apidock.com/ruby/Module/module_function

https://medium.com/rubycademy/is-module-function-really-the-same-as-extend-self-ac1e96a1cda0

Rails related - Performance improvement

View performance: 

https://blog.appsignal.com/2020/01/22/rails-is-fast-optimize-your-view-performance.html 

ActiveRecord performance:

https://blog.appsignal.com/2021/02/24/troubleshooting-activerecord-performance.html

Building a Rails App With Multiple Subdomains

 https://blog.appsignal.com/2020/03/04/building-a-rails-app-with-multiple-subdomains.html

Building a Multi-Tenant Ruby-on-Rails app

 https://blog.appsignal.com/2020/12/02/building-a-multi-tenant-ruby-on-rails-app-with-subdomains.html

Rails - How to implement Routes for Many-to-Many

https://stackoverflow.com/questions/31258275/rails-4-how-to-implement-routes-for-a-many-to-many-relationship

https://edgeguides.rubyonrails.org/routing.html#routing-concerns

https://edgeapi.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Concerns.html#method-i-concern


Sunday, January 2, 2022

Draft Pull Requests

 https://software.rajivprab.com/2021/12/26/our-engineering-principles-and-best-practices/

Draft Pull-Requests

For each pull-request, first create a draft pull-request, demonstrating the proposed implementation at a high level. Use TODOs and placeholders to indicate which classes/methods you will be touching. Send it off for review and then immediately start working on the actual code and tests.

This mitigates the amount of wasted effort, if your reviewer then suggests a completely different way of implementing things. Once your reviewer approves the draft, link to it in your pull-request, to make sure everyone knows what was already discussed and agreed on.


CORS related

 https://nickolinger.com/blog/2021-08-04-you-dont-need-that-cors-request/

https://www.reddit.com/r/programming/comments/rurxhl/you_dont_need_that_cors_request/

Computer Networking Introduction - Ethernet and IP (Heavily Illustrated)

 https://iximiuz.com/en/posts/computer-networking-101/

Container Networking Is Simple!

https://iximiuz.com/en/posts/container-networking-is-simple/ 

Sunday, August 8, 2021

CSS Layout related

https://www.youtube.com/c/LayoutLand/videos 

CSS Custom Properties In The Cascade, CSS Variables With Inline Styles

CSS Custom Properties In The Cascade - July 2019
https://www.smashingmagazine.com/2019/07/css-custom-properties-cascade/

CSS Variables With Inline Styles - Nov 2019

Efficient Infinite Utility Helpers Using Inline CSS Custom Properties and calc() - July 2021



 

Is it Time to Ditch the Design Grid? - July 2021

https://css-irl.info/is-it-time-to-ditch-the-design-grid/ 

Detecting Hover-Capable Devices - June 2021

 https://css-irl.info/detecting-hover-capable-devices/

Jen Simmons - Everything You Know About Web Design Just Changed - Oct 2018

 

Polypane - browser tool for web developers and designers

https://polypane.app 

Find that one element on your web page that is causing a 1px horizontal scroll

https://twitter.com/shrutibalasa/status/1424088805003304961?s=21 

Why I Don't Like Tailwind CSS - Aleksandr Hovhannisyan

https://www.aleksandrhovhannisyan.com/blog/why-i-dont-like-tailwind-css/ 

Flourish - Data Visualisation

https://tiiny.host/blog/creating-beautiful-html-visualizations-with-flourish-a-complete-guide/ 

Thursday, July 1, 2021

Rails - unregister a Resque worker

workers = Resque.workers.select {|w| w.to_s.include? "942ng"}

workers.each do |w|

  w.unregister_worker

end 

Sunday, June 13, 2021

increment.com - General Trends in Software Industry

 https://increment.com/issues/

codesdope.com

 https://www.codesdope.com/course/algorithms-introduction/

https://www.codesdope.com/course/data-structures-introduction/

Quantum Communications - Dual band stabilization

https://www.zdnet.com/article/researchers-created-an-un-hackable-quantum-network-over-hundreds-of-kilometers-using-optical-fiber/ 

Excerpt:

To tackle the instable conditions inside optical fibers, Toshiba's researchers developed a new technique called "dual band stabilization". The method sends two signals down the optical fiber at different wavelengths. The first wavelength is used to cancel out rapidly varying fluctuations, while the second wavelength, which is at the same wavelength as the qubits, is used for finer adjustments of the phase. 

Put simply, the two wavelengths combine to cancel environmental fluctuations inside the fiber in real time, which according to Toshiba's researchers, enabled qubits to travel safely over 600 kilometers. 

Already, the company's team has used the technology to trial one of the most well-known applications of quantum networks: quantum-based encryption. 

Known as Quantum Key Distribution (QKD), the protocol leverages quantum networks to create security keys that are impossible to hack, meaning that users can securely exchange confidential information, like bank statements or health records, over an untrusted communication channel such as the internet.  

kalkicode.com - DSA practice website

https://kalkicode.com/ 

Do You Really Need Redis? How to Get Away with Just PostgreSQL

 https://spin.atomicobject.com/2021/02/04/redis-postgresql/

Saturday, June 12, 2021

Priority Queue Using Heap

 https://www.codesdope.com/blog/article/priority-queue-using-heap/

https://www.codesdope.com/course/algorithms-introduction/

https://www.codesdope.com/course/data-structures-introduction/

http://web.eecs.utk.edu/~leparker/Courses/CS302-Fall06/Lecture_notes/09-26-Priority-queues-1.pdf

https://sites.fas.harvard.edu/~libs111/files/lectures/unit9-3.pdf


mocki.io - create fake json API

https://mocki.io/ 

Designing Software with Predicate Logic

https://buttondown.email/hillelwayne/archive/designing-software-with-predicate-logic/ 

Wormhole: Instant Encrypted File-Sharing Powered by WebTorrent

 https://torrentfreak.com/wormhole-instant-encrypted-file-sharing-powered-by-webtorrent-210611/

https://torrentfreak.com/webtorrent-brings-bittorrent-to-the-web-impresses-netflix-151213/


Good and Bad Elixir

https://keathley.io/blog/good-and-bad-elixir.html 

glitch.com - online IDE

 https://glitch.com/

Hash.ai - where models and simulations live

 https://hash.ai/index

Wednesday, January 6, 2021

OPTIMIZE YOUR REDUX SELECTORS WITH USESELECTOR HOOK AND MEMOIZE THEM WITH RESELECT – PART 1

 https://programmerden.com/2020/04/06/optimize-your-redux-selectors-with-useselector-hook-and-memoize-them-with-reselect/

React related - React Query

https://www.reddit.com/r/reactjs/comments/krezz4/redux_context_api_and_react_query/ 

You can fetch data and store it in Redux, but it wasn't purpose-built for that use case. So (as of right now) you have to write most of the fetching and updating code yourself. React-Query, on the other hand, is entirely built to simplify the process of fetching data and caching it, and it's built to take advantage of React hooks. So, if the only thing you're doing is data fetching, React-Query is going to make that a lot simpler.

Followers

Blog Archive