Miscellaneous Tech

  • Bitcoin resources  Youtube resource      Learning Bitcoin from CLI
  • APK (Android Package Kit) - file format used by Android to install apps
    • has all components of app and packaged in single apk → code, resources, assets
    • Like .exe are executables on Windows → APKs are for Android
    • Mod APK (Modified APK) - altered version of original Android app
    • Sideloading - installing apps on device from sources other than official app store
      • Used for apps not available on Play Store or for beta versions

  • XAPK (extended Android package kit) APK file + OBB files + graphics + media
    • compressed for easy distribution of large apps/heavy games for android
    • not officially supported by Android → special installers are needed
    • Manually, users can extract XAPK and place OBB files in respective folder

  • OBB (Opaque Binary Blob) files - extra data files used by some Android apps to store large assets like graphics, media files, and game data that don’t fit in APK
    • APK works as the installer and OBB provides bulk of the content

  • After we Delete File permanently  system do not immediately erase data  only index pointer (the file’s address) is removed from file system  data is still intact
    • In Hard Disk Drives (HDD), data blocks remain intact until new files overwrite them  the sooner you try to recover, the better your chances are
      • Sometimes, we may get corrupted images (half visible, half damaged)
    • In Solid State Drives (SSD), if TRIM is enabled → OS quickly wipes free blocks
      • very hard to recover data
    • In Phone Storage (Flash Memory) - recovery chances are very low because memory cells are reused quickly

  • Dual-boot - install multiple OS on separate partition/disk with bootloader at startup to select & load only that OS’s kernel and system files from its partition while other OS stays inactive → after installing Linux, Windows Boot Manager replaced with GRUB
  • X’s (twitter) API return both id and id_str → some environments can handle 64-bit integers directly, but in JavaScript integers larger than 53 bits risks precision errors
    • unacceptable risk when identifiers must remain exact
    • id: 64-bit unsigned integer              id_str: same identifier represented as string

  • Proxy hiccup - temporary, short failure in proxy layer but client and backend are fine 
    • Causes when proxy reloads its configuratio, edge-case connection or websockets can be forcefully dropped during worker process swap
      • proxy has limited pool of TCP connections to backend servers If sudden spike in traffic, then proxy may run out of ephemeral ports → reject new requests until old connections close and free up space
    • Solution for client - clear cookies as error redirection may be stored in cache, retry again as network fluctuations could be there, check internet
    • If client gets error, automatically sends request again but if all 10,000 clients retry immediately at exact time, they will unintentionally cause DDoS attack and crash proxy permanently → Exponential Backoff with Jitter + Idempotency
      • client waits 1s to retry If that fails, it waits 2s, then 4s, then 8s. "Jitter" adds random few milliseconds to each wait time so that all clients don't retry at exact same synchronized moment

  • CMDB (Configuration Management DB) centralized repo that stores info about all critical components (Hardware & Software) of organization's IT environment
    • each component is called Configuration Item (CI) and its detail is called attribute
    • CMDB map and track complex relation and dependency between all CI whether they are hardware, software apps, cloud service, or network infrastructure
    • In ITIL (Information Technology Infrastructure Library) framework, CMDB acts as "single source of truth" for IT operations
    • CI can also be Logical Entities like Policies, SLAs, specific IT personnel
    • CMDB data is fed via manual data entry or automated Discovery Tools that scan corporate to detect new device, monitor config changes, update dependencies
    • Benefit - If router needs maintenance, consult CMDB to check all dependency to schedule downtime safely & notify right people. To find exact failed component, if any service goes down. Useful for large companies to track cost and value.

  • Compiler vs Interpreter
    • Compiler - translates entire source code into machine executable code at once before execution → Faster execution + more efficient
      • checks for syntax errors at end during compilation → Example: C, C++
    • Interpreter - translate code line by line and execute instruction by instruction
      • Easy to detect errors but slower execution → Example: Python, JavaScript
  • Authentication vs Authorization
    • Authentication - confirms identity of users by verifying login credentials
      (e.g., username, password, biometric)
       → happens before any authorization check
    • Authorization - checks if user has permission to perform certain actions/access specific data based on roles, permissions, or access levels
  • Integrated Development Environment (IDE) - place to write, run and debug code
    • Example: Visual Studio, PyCharm, Jupyter Notebook
  • storage/emulated/0/ - root directory of user-accessible internal storage on Android 
    • represents user’s primary storage ("Internal Storage”)

  • To run batch file in PowerShell → add ./ before script name for security reasons
    • This 100% ensures that running batch file of current directory

  • Software bloat - when program becomes slow and oversized due to inefficient code or unnecessary features → apps consume more memory, storage, CPU
  • coder-decoder (codec) - compress and decompress digital data (audio + video files)
    • Audio Codecs - MP3, AAC (used by iTunes and YouTube)
    • Video Codecs - H.264/AVC (widely used for streaming, Blu-ray, and web video), HEVC/H.265 (better successor to H.264), AV1 (royalty-free codec for streaming)
      • AV1 → built by alliance of Google, Microsoft, Netflix, Amazon, etc. bcz H.264 charges royalty → give efficient bitrates compared to other codecs (means better video quality at low internet speed)
        • Issues - consume more CPU/GPU + very slow at encoding + compatibility issues with old devices since AV1 is new

  • Date Based Versioning - Stripe does not use traditional ways to name API versions like v1/payment or v3/users → uses "Stripe Version : 2015-07-18" passed via header
    • BENEFIT - Users on older version have no tension to switch every time new version arrives (Maintains trust) + All versions available till date can be used
    • How is it possible to maintain thousands of version ?
      • Request Compatibility Layer → normalise any old version of API calls to latest version → then send to core business logic (written wrt latest version)
      • Gate System → Feature flags based on version date and feature
        • Let's say "amount" is deprecated in new version but old one still use it
        • new version API → "amount" will be off but for old ones it will be on
        • No messy if-else statements + All gates are at one place + High code readability + Easy to manage
      • Transformation modules → used when sends response back to user
        • small, isolated modules to downgrade latest version to user's version
        • latest version → downgrade to 2025 → downgrade to 2024 → so on...
        • In 2027, only make for 2025 and 2026 (bcz others already exist)

  • Digital Object Identifier (DOI) unique alphanumeric string assigned to a document providing persistent link to location on internet → attached to object (not location)
    • In past, researchers cited sources using URLs → if website was reorganized or publisher changed servers → links break (called "link rot") → can't find source
    • Even if journal moves article to new web page → DOI remains same and will redirect you to correct place → like permanent "digital fingerprint"
  • Parquet - optimized for fast processing & high compression in big data ecosystems → group data by column reducing read time, storage space when query specific fields
  • closed protocol - company don't want to publicly document/share how their system works internally → like WhatsApp never publish how their app talks to their servers
***********************************************************************************
Image Formats
  • JPEG (Joint photographic experts group) - lossy compression
    • JPEG = JPG due to new windows update of "3 characters limit on file extension"
    • convert RGB to YCbCr → Y=brightness, Cb=blue difference, Cr=red difference
      → used in compression bcz eyes detect variation in light and shadow better than fine details in color → discard Cb and Cr color channels + keep Y channel sharp
    • Discrete Cosine Transform (DCT) → image is divided into 8x8 pixel blocks 
      • DCT transform these blocks into frequency domain → isolate gradual color changes (low frequency) from sharp edges or noise (high frequency)
    • Loss - High-frequency details are divided by quantization matrix and rounded off
      → 
      permanently discard less visible data before using lossless Huffman coding
    • EXIF (Exchangeable Image File Format) - standard to store metadata directly within image → automatically record GPS coordinate, camera model, date, time, exposure settings (like ISO and aperture) → take screenshot to remove EXIF
      • social media platforms automatically remove EXIF to protect privacy
      • Formats like TIFF, JPG, WebP, and modern PNGs can retain EXIF data
    1. PNG (Portable network graphics) - lossless compression [bigger size than JPG]
      • reduce file size without discarding visual data → preserve image quality
      • supports alpha channel which allows smooth, variable background transparency
      • Used for flat illustrations → where colors are limited and can be counted
    2. TIFF (Tagged Image File Format) - industry-standard format used in professional photography & print publishing → preserves absolute, maximum image quality
      • use no compression → preserve all layers, depth, sharp details → large size
    3. SVG (Scalable Vector Graphics) - XML-based format that use math equations (lines, curves) to draw image instead of grid of pixels → since rely on math rather than fixed pixels, it can be scaled infinitely to any size without losing quality or becoming blurry
      • stay sharp across screen density + small in size
    4. WebP - modern image format developed by Google → provide both lossless and lossy compression (optimized for web image) → highly versatile, supports both transparent backgrounds of PNG and animated frames of GIF + significantly small size than JPEG
    5. HEIC (High-Efficiency Image Container) - modern format popularized by Apple uses advanced video compression techniques to store photos at roughly half size of standard JPEG + better visual quality → highly versatile, support up to 16-bit color depth, transparent backgrounds, can store multiple images or audio within single file
      • Compatibility issue → only supported by Mac, IPhone
    6. AVIF (AV1 Image File Format) - open-source, royalty-free image format derived from AV1 video codec → outperforms formats like JPG, WebP and HEIC
      • offers highly small sizes + preserve superior image quality
      • considered next-generation standard as supports advanced features like High Dynamic Range (HDR), wide color gamut, transparency and animations
      • Issue - old browsers don't support it yet
    ***********************************************************************************

    Comments

    Popular posts from this blog

    Corporate Tips + Higher Studies

    Interview Tips + Puzzles