.Net, Rails, and other stuff
Sai Jyothi Prasad Ponduru's learning blog
Sunday, May 5, 2024
Tuesday, March 26, 2024
Sunday, March 24, 2024
AI Book - Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD
Deep Learning for Coders with Fastai and PyTorch: AI Applications Without a PhD
testcontainers.com
An open source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container.
Saturday, March 23, 2024
Sunday, March 17, 2024
Thursday, March 14, 2024
Thursday, March 7, 2024
Thursday, February 29, 2024
Monday, February 26, 2024
Sunday, February 25, 2024
c2pa.org - Coalition for Content Provenance and Authenticity
The Coalition for Content Provenance and Authenticity (C2PA) addresses the prevalence of misleading information online through the development of technical standards for certifying the source and history (or provenance) of media content. C2PA is a Joint Development Foundation project, formed through an alliance between Adobe, Arm, Intel, Microsoft and Truepic.
Sunday, January 21, 2024
Tuesday, January 9, 2024
Monday, January 8, 2024
Monday, January 1, 2024
Tuesday, December 12, 2023
Leetcode type problem - Sub-Arrays problem
Generate number of sub arrays with a particular sum: E.g. nums = [1,1,1] with sum 2
arr = [1,1,1] SUM =2 #arr = [1,2,2,3,4,5] #SUM = 5 sub_arrays = [] arr = arr.sort arr.each_with_index do |n, index| if n == SUM sub_arrays << [n] next end rest_of_array = arr[(index+1)..-1] temp_arr = [n] rest_of_array.each do |m| temp_arr << m if temp_arr.sum == SUM # We found a sub_array! sub_arrays << temp_arr # There might be duplicates of m, so let us remove m from temp_arr and continue temp_arr = temp_arr[0..temp_arr.length-2] end if temp_arr.sum < SUM # do nothing; we can continue to add more elements end if temp_arr.sum > SUM # discard all elements except n temp_arr = [n] end end end puts sub_arrays.to_s
Sunday, December 10, 2023
Sunday, November 26, 2023
Tuesday, November 21, 2023
Saturday, November 11, 2023
Monday, October 16, 2023
Wednesday, October 11, 2023
Rails and JS - No Build for JS
https://world.hey.com/dhh/you-can-t-get-faster-than-no-build-7a44131c
We're making it using vanilla ES6 with import maps for Hotwire, and vanilla CSS with nesting and variables for styling. All running on a delightfully new simple asset pipeline called Propshaft.
Monday, October 2, 2023
Wednesday, September 20, 2023
Saturday, September 16, 2023
Rails: class_attribute
https://chat.openai.com/c/388e1263-46a6-4406-b16d-8094b8232dfb
In essence, whenever you find yourself thinking, "I need a class-level configuration that should have a default, but I also want the flexibility to customize it for certain subclasses or instances,"
class_attribute
is a tool you might consider using.
Rails: Join multiple nested associations
Join multiple nested associations:
https://gist.github.com/abhionlyone/84dec0aa7a5d30b9e2bc6d7bd2094f20
Thursday, September 14, 2023
Tuesday, September 12, 2023
Monday, September 11, 2023
Friday, September 8, 2023
'Nested set model' data structure - ChatGPT discussion
https://chat.openai.com/c/14a54f06-d8e7-42af-b60e-402d821412be
Adjacency List Model vs Nested Set Model - https://www.youtube.com/watch?v=0G58ot8obFs
Wednesday, September 6, 2023
Monday, September 4, 2023
Thursday, August 31, 2023
Tuesday, August 29, 2023
Sunday, August 20, 2023
Redis project
https://rohitpaulk.com/articles/redis-3
Solution to Redis project (step 4)
Wednesday, August 16, 2023
Wednesday, July 26, 2023
Wednesday, July 12, 2023
Saturday, July 8, 2023
Tuesday, June 27, 2023
Sunday, June 25, 2023
Friday, June 23, 2023
Friday, June 16, 2023
Sunday, June 11, 2023
Thursday, June 8, 2023
Friday, May 5, 2023
Thursday, April 27, 2023
Tuesday, April 25, 2023
Monday, April 24, 2023
Tuesday, April 11, 2023
Sunday, April 9, 2023
Saturday, April 8, 2023
Friday, April 7, 2023
Thursday, April 6, 2023
Tuesday, April 4, 2023
Thursday, March 30, 2023
Monday, March 20, 2023
Wednesday, March 15, 2023
Saturday, March 11, 2023
Thursday, March 2, 2023
Wednesday, March 1, 2023
Tuesday, February 28, 2023
Introducing MRSK: Deploy web apps anywhere from bare metal to cloud VMs using Docker with zero downtime.
Introducing MRSK: Deploy web apps anywhere from bare metal to cloud VMs using Docker with zero downtime. No need to brave running k8s yourself. This video builds an app from scratch and deploy to two different clouds in less than 20 mins!
Monday, February 27, 2023
Saturday, February 18, 2023
Wednesday, February 15, 2023
How to learn Machine Learning
https://twitter.com/machsci/status/1625569733126033408?s=21&t=Urcac12Ha89dnjd31vAAIg
https://vickiboykis.com/2022/11/10/how-i-learn-machine-learning/
https://pytorch.org/tutorials/beginner/deep_learning_60min_blitz.html
https://twitter.com/jhoang314/status/1624829824782028806?s=21&t=Urcac12Ha89dnjd31vAAIg
https://www.ninoristeski.com/how-to-find-the-best-resources-on-machine-learning/
...
Start with tabular data and linear/logistic regression. Then grab lightgbm with automl, learn the common explainability methods and focus on anything BUT selecting an algorithm. When you got that, learn all other algorithms in and out and look for model innovations.
...
Just learn BigQuery and it's machine learning capabilities and read books alot and avoid youtube videos as much as possible.
...
Start with SQL, Python. Pick a popular ML library e.g. Sklearn, Keras, XGBoost and apply it to a dataset
...
Start by getting familiar with the fundamentals of machine learning, such as linear algebra, calculus and probability theory. Also read up on popular algorithms to get a better understanding of how they work.
...
Learn statistics and probability a lot of concepts require simple concepts from those fields, if you want to go a little further learn abstract geometry is going to allow you to learn about how nonlinear models implement hyperplanes.
Monday, February 13, 2023
Friday, February 3, 2023
Wednesday, February 1, 2023
Monday, January 23, 2023
Tuesday, January 17, 2023
Saturday, January 14, 2023
Tuesday, January 10, 2023
Saturday, December 31, 2022
Wednesday, December 28, 2022
Wednesday, December 14, 2022
CSS websites
Other CSS links mentioned in https://podcasts.apple.com/in/podcast/js-party-javascript-css-web-development/id1209616598?i=1000589631048
- Take the State of JS survey!
- Kevin Powell website
- Kevin’s Youtube Channel
- Flexbox Froggy
- Flexbox Zombies
- Grid Garden
- Grid Critters
- Designing Intrinsic Layouts
- CSS Stats
- MJML (for emails)
- Utopia.fyi
- CSS-Tricks
- Smashing Magazine
- Josh Comeau)
- ModernCSS
- SmolCSS
- I am not a fan of what React has done to the web, but it’s VERY nice
Saturday, December 3, 2022
Friday, December 2, 2022
Wednesday, November 23, 2022
Tuesday, November 8, 2022
Saturday, November 5, 2022
Friday, November 4, 2022
Friday, October 28, 2022
Wednesday, October 26, 2022
Rails - i18n
Best practices:
https://www.mashupgarage.com/playbook/rails/i18n_practices.html
Lessons Learned: Naming and Managing Rails I18n Keys:
https://phrase.com/blog/posts/ruby-lessons-learned-naming-and-managing-rails-i18n-keys/
Tuesday, October 25, 2022
Monday, October 24, 2022
Applied Machine Learning (Cornell CS5785) - course from 2020
Applied Machine Learning (Cornell CS5785)
"Starting from the very basics, covering all of the most important ML algorithms and how to apply them in practice. Executable Jupyter notebooks (and as slides)"
Lectures: https://www.youtube.com/playlist?list=PL2UML_KCiC0UlY7iCQDSiGDMovaupqc83
Notebooks: https://github.com/Machine-Learning-Tokyo/AI_Curriculum#applied-machine-learning
Sunday, October 23, 2022
Tuesday, October 18, 2022
A component toolkit for creating live-running code editing experiences, using the power of CodeSandbox
A component toolkit for creating live-running code editing experiences, using the power of CodeSandbox
Wednesday, October 12, 2022
Tuesday, October 11, 2022
Monday, October 10, 2022
Saturday, October 8, 2022
Friday, October 7, 2022
Docker related - Rails On Docker Simplified
Rails on Docker:
https://huzefabiyawarwala.medium.com/rails-on-docker-simplified-84c1bfb485c3
Kitematic open-source GUI tool to watch/start/stop containers:
https://github.com/docker/kitematic/wiki/Early-Linux-Development
How Docker and Kubernetes work together
https://containerjournal.com/topics/container-ecosystems/how-docker-and-kubernetes-work-together/
Rails - Single Table Inheritance
https://medium.com/@dcordz/single-table-inheritance-using-rails-5-02-6738bdd5101a
https://huzefabiyawarwala.medium.com/single-table-inheritance-in-rails-fc28a56a3f9
https://stackoverflow.com/questions/555668/single-table-inheritance-and-where-to-use-it-in-rails
https://old.alexreisner.com/code/single-table-inheritance-in-rails - very good overview of which options, we'll typically have, when faced with a design problem
Monday, October 3, 2022
Sunday, October 2, 2022
Friday, September 30, 2022
Saturday, September 24, 2022
Friday, September 23, 2022
Thursday, September 22, 2022
Java + Spring Boot + Microservices Example - Step by Step Guide
Java + Spring Boot + Microservices Example - Step by Step Guide
Wednesday, September 21, 2022
Tuesday, September 20, 2022
Courses suggested by Javinpaul (Twitter)
Best Software Architecture and Design Pattern Courses
1. Design Patterns in Java - bit.ly/3nYGrYR
2. Grokking the OOP Design - bit.ly/3pA4wFD
3. Master Microservices - bit.ly/2FNlleF
4. Software Architecture Patterns - bit.ly/38Ixqg5
5 Free Courses for Data Structure and Algorithms
1. Data Structure - bit.ly/3l4VxMj
2. Algorithms - bit.ly/3P45Gqi
3. A Visual Intro to Algorithms - bit.ly/3NcwIKx
4. Data Structures Java - bit.ly/2F5V1uW
5. more - bit.ly/3w2YQJY
5 Best Courses for Microservices
1. Microservice Architecture - bit.ly/3w1zGva
2. Principles - bit.ly/3ruSCR7
3. Scalable Microservices - bit.ly/3MaP7GS
4. Microservice with Java - bit.ly/2FNlleF
5. more - bit.ly/3PQzR3v
6 System Design Problems
6 System Design Problems [Solved]
1. Instagram- bit.ly/3BqamCL
2. Youtube Design - bit.ly/3bbNnAN
3. WhatsApp - bit.ly/3SbA9Eu
4. Parking Lot - bit.ly/3eMUosX
5. Library design- bit.ly/3SfwJQe
6. URL Shortner - bit.ly/3dZoQ2G
Friday, September 16, 2022
Streaming 101: The world beyond batch
https://www.oreilly.com/radar/the-world-beyond-batch-streaming-101/
The Lambda Architecture: 2011 -
http://nathanmarz.com/blog/how-to-beat-the-cap-theorem.html
Questioning the Lambda Architecture - 2014 - in favour of Kafka -
http://radar.oreilly.com/2014/07/questioning-the-lambda-architecture.html
Podcasts and YouTube channels recommended by Hussein Nasser
Below is from his Youtube video - https://www.youtube.com/watch?v=4NsWnT_-FoE
Podcasts and YouTube channels recommended by Hussein Nasser
Recommended Podcastshttps://softwareengineeringdaily.com/
https://www.dataengineeringpodcast.com/
https://changelog.com/podcast
Recommended YouTube Channels
https://www.youtube.com/user/TechGuyWeb
https://www.youtube.com/user/99baddawg
https://www.youtube.com/channel/UCRPMAqdtSgd0Ipeef7iFsKw
https://www.youtube.com/channel/UCn1XnDWhsLS5URXTi5wtFTA
Wednesday, September 14, 2022
Tuesday, September 13, 2022
Sunday, September 11, 2022
Thursday, September 8, 2022
Tuesday, September 6, 2022
Monday, September 5, 2022
Saturday, September 3, 2022
React Native related - error trying to start Simulator using 'i' shortcut
Error: xcrun exited with non-zero code: 2
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Unable to boot device because we cannot determine the runtime bundle.
No such file or directory
https://stackoverflow.com/questions/31179706/how-can-i-launch-the-ios-simulator-from-terminal
Friday, September 2, 2022
Thursday, September 1, 2022
Monday, August 29, 2022
Sunday, August 21, 2022
Tuesday, August 16, 2022
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/.
Thursday, August 11, 2022
Tuesday, August 9, 2022
Monday, August 1, 2022
Sunday, July 31, 2022
Sunday, July 24, 2022
Thursday, July 21, 2022
Wednesday, July 20, 2022
Tuesday, July 19, 2022
Saturday, July 16, 2022
Wednesday, July 13, 2022
Wednesday, July 6, 2022
Wednesday, June 22, 2022
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
Sunday, June 19, 2022
Friday, June 3, 2022
Monday, May 30, 2022
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 15, 2022
Thursday, May 12, 2022
Saturday, May 7, 2022
Thursday, May 5, 2022
Monday, May 2, 2022
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 26, 2022
Wednesday, April 20, 2022
Monday, April 18, 2022
Thursday, April 14, 2022
Wednesday, April 13, 2022
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%"})
Friday, April 8, 2022
Wednesday, April 6, 2022
Thursday, March 31, 2022
Tuesday, March 29, 2022
Sunday, March 27, 2022
Saturday, March 26, 2022
Friday, March 25, 2022
Thursday, March 24, 2022
Wednesday, March 23, 2022
Tuesday, March 22, 2022
Monday, March 21, 2022
Tuesday, March 15, 2022
Monday, March 14, 2022
Thursday, March 10, 2022
Monday, March 7, 2022
Sunday, March 6, 2022
sed command example
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)
Wednesday, March 2, 2022
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
Wednesday, February 23, 2022
Tuesday, February 22, 2022
Monday, February 21, 2022
Sunday, February 20, 2022
Saturday, February 19, 2022
Friday, February 18, 2022
Tuesday, February 15, 2022
Monday, February 14, 2022
Saturday, February 12, 2022
Friday, February 11, 2022
Thursday, February 10, 2022
Wednesday, February 9, 2022
Tuesday, February 8, 2022
Sunday, February 6, 2022
Wednesday, February 2, 2022
Tuesday, January 25, 2022
Monday, January 24, 2022
Thursday, January 20, 2022
Tuesday, January 18, 2022
Sunday, January 16, 2022
Friday, January 14, 2022
Tuesday, January 11, 2022
Rails - Counter Cache
Counter Cache
https://rubyinrails.com/2019/04/10/rails-counter-cache-associations/
https://scoutapm.com/blog/how-to-start-using-counter-caches-in-rails
For many-many association:
https://coderwall.com/p/muvy9w/forget-counter-cache-for-many-to-many-associations-in-rails
https://stackoverflow.com/questions/5256897/counter-cache-with-has-many-through
Monday, January 10, 2022
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
Friday, January 7, 2022
Thursday, January 6, 2022
Tuesday, January 4, 2022
Ruby/Rails related sites
https://rubyflow.com/ - Links to articles
https://www.speedshop.co/blog/ - Rails performance blog
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.