<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pranav Karpe on Medium]]></title>
        <description><![CDATA[Stories by Pranav Karpe on Medium]]></description>
        <link>https://medium.com/@pranavk53451?source=rss-572c3100a857------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*lsNQbtHUQeILYIvj</url>
            <title>Stories by Pranav Karpe on Medium</title>
            <link>https://medium.com/@pranavk53451?source=rss-572c3100a857------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:36:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pranavk53451/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Setting Up Android Studio and Creating Your First Project]]></title>
            <link>https://medium.com/@pranavk53451/setting-up-android-studio-and-creating-your-first-project-3fdfc71f18db?source=rss-572c3100a857------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fdfc71f18db</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android-installation]]></category>
            <category><![CDATA[android-studio]]></category>
            <dc:creator><![CDATA[Pranav Karpe]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 15:09:36 GMT</pubDate>
            <atom:updated>2026-03-15T15:09:36.019Z</atom:updated>
            <content:encoded><![CDATA[<p>Are you ready to dive into the world of Android app development? The very first step is setting up your workspace. In this simple guide, we will walk through installing Android Studio, understanding the basics, and creating your very first app project. Don’t worry if you have never done this before, we will take it one step at a time!</p><h3>Part 1: Setting Up Android Studio</h3><p>Android Studio is the official program (also known as an Integrated Development Environment, or IDE) used by developers to make Android apps. Think of it as your digital workbench — it gives you all the tools you need in one place.</p><p><strong>Step 1: Search and Download</strong></p><p>First, open your web browser and search for “Android Studio” on Google. Click on the official Android Developers link to go to the download page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pevCZxCFLElwvjuPBPSC3g.png" /></figure><p>Once you are on the page, you will see a big download button for Android Studio. Click it to download the installer file to your computer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OmUo5diORRcWkviQ8x4xWQ.png" /></figure><p><strong>Step 2: Run the Setup File</strong></p><p>After the download finishes, find the downloaded file (usually in your Downloads folder) and double-click it to start the installation.</p><p><strong>Step 3: Choose Components</strong></p><p>During the setup, a window will ask you which parts you want to install. Make sure both “Android Studio” and “Android Virtual Device” have checkmarks next to them. The “Android Virtual Device” is basically a fake phone that runs on your computer screen. It is very useful because it lets you test your apps without needing to plug in a real Android phone!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*Q1CZgOlqjoJ4eUOMT7hzIg.png" /></figure><p><strong>Step 4: Configuration Settings</strong></p><p>Next, it will ask where you want Android Studio to be installed on your computer. You can just leave this exactly as it is (it usually says C:\Program Files…) and click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*o5YJrvHxO1lgr83Di3bBcA.png" /></figure><p><strong>Step 5: Choose Start Menu Folder</strong></p><p>The setup will ask where you’d like to place the program shortcuts in your Start menu. Leaving it as the default “Android Studio” folder is perfectly fine. Click Install.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/493/1*qDUK0vJuxMRJBi1ArwwpqQ.png" /></figure><p>Wait a few moments for the installation progress bar to complete all the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*MUdZGEa9Dy_HXDwgpRiMuQ.png" /></figure><p><strong>Step 6: Finish Setup</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*LTl7QG6sUB60TkLkohh_WA.png" /></figure><p>Once the green bar is full, you’ll see a completion screen! Leave the “Start Android Studio” box checked and hit the Finish button. Android Studio will now open up.</p><h3>Part 2: Understanding the Layout</h3><p>When Android Studio opens for the first time, it might look a little overwhelming because there are a lot of buttons. Don’t panic! You only need to know a few things to get started.</p><p>When you open a project, your screen will be divided into a few main areas:</p><p>- The left side will show all your project files and folders.</p><p>- The big middle area is where you will write your code or design what your app looks like.</p><p>- The edges (bottom and sides) have hidden tool windows that you can click to pop open, like one for seeing error messages or one for showing your fake phone screen.</p><h3>Part 3: Creating Your First Project</h3><p>Now that you have Android Studio installed and open, let’s create a blank app together!</p><p><strong>Step 1: Start a New Project</strong></p><p>On the main welcome screen of Android Studio, look for the button that says “New Project” and click it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/902/1*kPGG8ULE26r7srXe_46hSA.png" /></figure><p><strong>Step 2: Select a Project Template</strong></p><p>Android Studio gives you a bunch of starting templates so you don’t have to build everything from scratch. For a simple beginner application, look for the one called “Empty Views Activity” under the “Phone and Tablet” section. Click on it to select it, and then click Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*dTY8s4wRLNib_Skd7d6aDQ.png" /></figure><p><strong>Step 3: Configure Your Project Details</strong></p><p>Now it’s time to fill in the details for your new app:</p><p>- Name: Give your app a name! In our example, we named it Demo1.</p><p>- Package name: This is an invisible identifier for your app. You can usually leave whatever it auto-fills, or use something like com.yourname.appname.</p><p>- Save location: This is where the app’s files will be saved on your computer. You can leave this as the default.</p><p>- Language: Choose either Java or Kotlin. We recommend Java if you are following older tutorials, but Kotlin is the modern standard. In our screenshots, we selected Java.</p><p>- Minimum SDK: This dropdown asks what is the oldest Android phone your app can run on. Leaving it at the default is usually the safest choice.</p><p>Once everything is filled out, click Finish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*g6h9H3U2jNc-dGCUmT1GsQ.png" /></figure><p>And that’s it! Android Studio will now spend a minute or two loading up your new workspace. Once it finishes loading, you are officially ready to start building your app. Congratulations on taking your first step!</p><h3>Part 4: Building and Running Your App</h3><p>Now that your project is created and loaded, let’s explore where your code lives and how to actually see your app in action!</p><p><strong>Step 1: Locate Your Design and Code Files</strong></p><p>In the project window on the left side, you will mainly be working with two very important files:</p><p>1. `activity_main.xml` (Your App’s Design): You can find this under `app &gt; res &gt; layout`. If you double-click this file, you’ll see a visual editor. This is where you design what your app looks like by dragging and dropping buttons, text, and images.</p><p>2. `MainActivity.java` or `MainActivity.java` (Your App’s Logic): You can find this under `app &gt; java &gt; com.yourname.demo1`. This is where you write the actual code to make your app function and respond to user actions.</p><pre>1. XML Layout (activity_main.xml)</pre><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    android:orientation=&quot;vertical&quot;<br>    android:gravity=&quot;center&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;&gt;<br>&lt;TextView<br>        android:id=&quot;@+id/textView&quot;<br>        android:text=&quot;Press the Button&quot;<br>        android:textSize=&quot;20sp&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;/&gt;<br>    &lt;Button<br>        android:id=&quot;@+id/button&quot;<br>        android:text=&quot;Click Me&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;/&gt;<br>&lt;/LinearLayout&gt;</pre><pre>2. Java Code (MainActivity.java)</pre><pre>package com.example.helloandroid;<br>import android.os.Bundle;<br>import android.view.View;<br>import android.widget.Button;<br>import android.widget.TextView;<br>import androidx.appcompat.app.AppCompatActivity;<br>public class MainActivity extends AppCompatActivity {<br>    TextView text;<br>    Button btn;<br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.activity_main);<br>        text = findViewById(R.id.textView);<br>        btn = findViewById(R.id.button);<br>        btn.setOnClickListener(new View.OnClickListener() {<br>            @Override<br>            public void onClick(View v) {<br>                text.setText(&quot;Hello Android&quot;);<br>            }<br>        });<br>    }<br>}</pre><p><strong>Step 2: Designing the Interface</strong></p><p>Open your `activity_main.xml` file. By default, Android Studio has already added a small text field to the center of your screen that says “Hello World!”.</p><p>Let’s modify it slightly:</p><p>- Click on the “Hello World!” text on the phone screen.</p><p>- Look for the “Attributes” panel on the right side of your screen.</p><p>- Find the “text” property, and change it from “Hello World!” to “My First App!”.</p><p>- Press Enter. You should instantly see the text change on the screen!</p><p><strong>Step 3: Running Your App</strong></p><p>Now for the most exciting part — seeing your app come to life on a phone!</p><p>1. Look at the top right area of Android Studio for a green “Play” triangle button.</p><p>2. Right next to the play button, make sure your Android Virtual Device (AVD) is selected in the dropdown menu (it usually defaults to the one you set up earlier, like “Pixel X API XX”).</p><p>3. Click the green Play button.</p><p>Android Studio will now compile all your code and start up the emulator (the fake phone screen). The first time you do this, it might take a couple of minutes, so be patient!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SR7DzbgxY5DX1ulLsWD_9A.png" /></figure><p>Once the emulator boots up, it will automatically install and open your app. You should see a phone screen pop up right on your computer displaying “My First App!”.</p><p>Congratulations! Your First App IS Ready.</p><p>Do Like and Share :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-m914VaZhMin0oPcaZWpA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fdfc71f18db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Version Stamps in NoSQL]]></title>
            <link>https://medium.com/@pranavk53451/version-stamps-in-nosql-842c0873745a?source=rss-572c3100a857------2</link>
            <guid isPermaLink="false">https://medium.com/p/842c0873745a</guid>
            <category><![CDATA[stamp]]></category>
            <category><![CDATA[databse]]></category>
            <category><![CDATA[nosql-database]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[version]]></category>
            <dc:creator><![CDATA[Pranav Karpe]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 18:00:18 GMT</pubDate>
            <atom:updated>2025-09-14T18:00:18.936Z</atom:updated>
            <content:encoded><![CDATA[<p>There are a huge amount of transaction in the Nosql database but they have aggregates. transactions are useful tool for developers to support consistency. Aggregate oriented NOSQL database supports atomic updates with aggregates.</p><p>A large number of NOSQL databases do not allow transactions. The main feature to rely on for consistency is transactions. As RDBMS heavily relies on the transaction concept, they are capable of giving strong consistency. The transaction feature is also a great help to database developers and programmers while they are coding for consistency in any DBMS application. Aggregates have enabled NOSQL databases to support atomic updates. The occurrence of transactions with limitations is also acknowledged. Human interventions are still needed, though while atomic updates are carried out within transactions. These human interventions will, thus, keep transactions open for quite some time. Version stamps have been introduced to deal with such scenarios</p><p>EXAMPLE Suppose,You are shopping online and finally find the perfect pair of shoes. You add them into your cart, entering all your details ,and someone calls you. You go with him outside for a long time, just like 4 or three hours. And you return, you go to Place Order. However, during that break, the store sometimes changes the price, or the product is out of stock . There is working version behind it. They keep track of changes, so you don’t pay the wrong price or buying something that is out of stock.</p><p>As locks are held for long time in banking or some other transactions and short period of time in system transactions This means that calculations or decisions might be made using old data if the information changes during that time. To handle this type of queries should always check for the latest changes in the data before making final decisions.</p><p>Version stamps are used to detect concurrency conflicts in database systems .each data i item have version stamp associated with it . When an item gets updated the version stamp gets updated. Before updating a data item, a process can check its version stamp to see if it has been updated since it was last read</p><h3><strong>Why NoSQL Doesn’t Always Do Transactions</strong></h3><p><strong>ACID transactions</strong>:</p><p>Atomicity- Atomicity means a transaction is all-or-nothing either all its operations succeed, or none are applied . If any part of the transaction fails, the entire transaction is cancel, and all changes are undone. This process is called rollback</p><p>Consistency- Consistency in transactions means that the database must remain in a valid state before and after a transaction</p><p>Isolation- Isolation ensures that transactions run independently without affecting each other. Changes made by one transaction are not visible to others until they are committed.</p><p>Durability- Durability ensures that once a transaction is committed, its changes are permanently saved, even if the system fails. The data is stored in non-volatile memory, so the database can recover to its last committed state without losing data.</p><p>The problem is that rules have a cost. Suppose if one online website lock the all database while customer type card details. That cannot work when millions are shopping.</p><p>NoSQL databases handle scale many users, much data, many servers. To do this, they relax ACID rules and use eventual consistency. Updates can take time to update database , but after some time all data matches.But, we need another way to be sure users can not use old data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*xHuV4Vp8RySxlYupQOh9Iw.png" /></figure><h3>WE CAN USE VERSION STAMP</h3><p>for this Data that has a version stamp indicates when it was last updated. when the data is changed associated stamp also update changed. when app reads the data it shows current state of that data if app changed then stamp reflects change.update is successful if and only if stamp matches with earlier data. If the stamp does not match, the data was changed by someone before.</p><p>Optimistic Concurrency Control is the term for this. Finally, it checks to know what the data has changed.</p><p>The Example of Online Shopping Return to your shopping cart.</p><p>1. Version v12 was present in the product data when you looked at those shoes.</p><p>2. You leave for lunch. The shoe price is updated by the system to version v13 in the meantime.</p><p>3. Your online app displays the message, “you are buying item on version v12,” when you back to confirm your order.</p><p>4. The database shows Sorry, this data changed” after remember that its version is 13.</p><p>Please refresh site.</p><p>This can use to check errors and can stop it.</p><h3>How Do You Make a Version Stamp</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*Zlt-kbn7EMpI-1niwUPHyw.png" /></figure><p>There are various ways to create a version stamps some of them explain as follows</p><h3>1. Counter</h3><p>Like numbering updates as pages in a diary.</p><p>You can use a counter always incrementing it when you update the resource</p><p>Counters are useful since they make it easy to tell if one version is more recent than another</p><p>They require the server to generate the counter value</p><p>They need a single master to ensure the counters are not be duplicated</p><h3>2. Globally Unique IDs</h3><p>• A large number that’s guaranteed to be unique.</p><p>• These use some combination of dates,hardware information and whatever other sours of randomness they can pick up</p><p>• The nice thing about guids is that they can be generated by anyone and you have never get duplicate</p><p>• A disadvantage is that they are large and can not be compared directly for recntness</p><h3>3. Hash</h3><p>Like a fingerprint of data.</p><p>To make a hash of the contents of the resource</p><p>With a big enough hash key size a content hash can be globally unique like GUID</p><p>Generated by anyone</p><p>Advantage: deterministic any node will generate the same content hash for same resource data</p><p>Disadvantage: like GUIDs they can’t be directly compared for recentness and they can be lengthy</p><h3>4. Timestamps</h3><p>Use date and time of last change.</p><p>• To use timestamp of the last update.</p><p>• Like counters they are reasonably short and can be directly compared for recentness</p><p>• Advantage: does not need single master,multiple machines can generate timestamps(their clocks can be keep in synchronization way)</p><ul><li>Disadvantag: one node with a bad clock can cause all sorts of data corruptions</li></ul><h3><strong>Working of version Stamp:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*zaPkuTbRjxULJZWhf0Xwyw.png" /></figure><p>This diagram tell us working of version stamp works in NOSQL databases to manage concurrent updates without locking.on the left hand side diagram shows data stored in NoSQL database and it is attached to a version stamp it is small tag that changes when data Is modified. When a user reads the data and later tries to update it, the system checks whether the version stamp they’re sending back matches the current one in the database. The decision matching is shown in the middle of the diagram asking “ if Version stamp matches current one.” If the answer is yes, the update is make and the version stamp is refreshed to reflect the new state. If the answer is means no, someone is already changed data and the update is rejected and a conflict is detected .this is simple method used helps avoid overwriting newer data and keeps the system consistent. its a simple, lightweight way to handle concurrency.</p><h3>Version stamping on multiple nodes</h3><p>Version stamping works well in a single-node or primary and secondary system, where the primary is responsible for maintaining the version stamp. Secondary nodes simply follow the primary node. In the case of a peer-to-peer system, this system of version stamping needs to be enhanced because version stamping is not happening in one place; every node in a peer-to-peer system is stamping the version, which requires coordination and reconciliation.</p><p>If you receive updates from two nodes, and each one provides a different version, you have the choice to get the latest version and discard the non-recent version, assuming that the non-recent version node has not been able to get the update due to a network issue or something else. Another scenario would be updates that are inconsistent from two nodes; in that case, you would need a mechanism for reconciliation and conflict resolution.</p><p>A commonly used technique in peer-to-peer systems is using a special version stamp called a vector stamp. Simply put, a vector stamp is a set of counters, one for each node. For example, a vector stamp for three nodes (node1, node2, node3) would be [node1: 54, node2: 65, node3: 71]. Each time a node goes through an update, it updates its counter. For example, if node1 goes through an update, the resulting vector stamp would be [node1: 55, node2: 65, node3: 71]. Whenever two nodes communicate, they synchronize their vector stamps. There are several variations of how this synchronization happens.</p><p>Apart from version stamps, other options include <strong>vector clocks</strong> and <strong>version vectors</strong>. <strong>Which version is recent</strong> node1:20 , node2: 21 , node3: 23 — — newer node2 counter is greater here rest remain same</p><p>node1:20 , node2: 20 , node3: 23</p><h3>Write — write conflict</h3><p>If both stamps have a counter greater than other node1:20 , node2: 21 , node3: 23 node1:21 , node2: 20 , node3: 23</p><h3>Missing value detection</h3><p>[node1:20 , node3: 23]</p><p>[node1:20 , node2: 0 , node3: 23]</p><p>New node can be easily added without invalidating the existing vector stamp.</p><p>Vector stamp is important tool which help her spot inconsistencies but it dosen’t resolve it for you. Conflict resolution would depend on the domain and business decision you working with. This is part of consistency / latency tradeoffs. It’s the decision to make whether network partition may make our system unavailable or we can detect and deal with the inconsistency.</p><p><strong>Use case of version stamps:</strong></p><p>1.Banking and Finance:</p><p>In banking systems, many transactions are take place at one time.Suppose two people trying to withdraw money from the same account and same time.withdrawals can be successful and account could be go in a negative balance without version stamps .if the version stamps is used banks can detect that one transaction is already successful and the account balance is updated and stop the second transaction if there is no sufficient balance</p><p>2. E-commerce:</p><p>Online shopping platforms handles millions of buying and selling of product.Version stamps keep tracking that user doesn’t purchase an out-of-product or product price is not a old one. Because of this both customers and sellers are safe from mistakes</p><p>3. Messaging Apps:</p><p>Apps like WhatsApp or Instagram are used at same time in one or more devices ,such as phone ,tab, laptop.if both devices try to change the same chat at the same time one device can erase other to prevent this. Version stamps is used. whenever the chat is updated. Before saving a new change, the app checks the version stamp to see if the chat was already changed on another device</p><p>4.Gaming:</p><p>In online games like Free Fire or PUBG player data like health ,score change all the time.if two servers trying to update same player data at a time one server may overwrite another server this can cause error .To avoid this, games use version stamps, which act like update numbers when the player’s data changes the version stamps increase. Before applying a new change, the system checks the version stamp to make sure no other update has already happened. This method helps to detect conflict and keeps player progress accurate.</p><p><strong>Definition</strong>: A version stamp is a unique identifier attached to a specific version of data or software, used to track changes and ensure consistency</p><h3>Why version stamps are good</h3><p>• Lightweight and scalable.</p><p>• Avoid long locks.</p><p>• Make conflicts visible.</p><p>• Useful for providing session consistency <strong>Why they are difficult:</strong></p><p>• They don’t solve conflicts, only detect them.</p><p>• Timestamps require perfect clock sync.</p><p>• Vector stamps add complexity.</p><h3>Key points</h3><p>• NoSQL databases often skip traditional transactions to stay fast and scalable.</p><p>• Version stamps help keep data consistent without locking data for long</p><p>• You can build them using counters, GUIDs, hashes, timestamps.</p><p>• Version stamps can spot conflicts, but they don’t resolve them on their own. • It track changes</p><h3>Conclusion</h3><p>• As apps and data grow bigger and spread across many servers, the old way of keeping things in server doesn’t work well anymore. We need faster, smarter tools.</p><p>• Version stamps are one of those tools. They’re easy to use, work in many systems, and help keep data from getting mixing up.</p><p><strong>References:</strong></p><p>1.Pramod J. Sadalage, M. F. (2012). NoSQL Distilled. Retrieved from <a href="https://www.thoughtworks.com/content/dam/thoughtworks/documents/books/b%20k_NoSQL_Ch_13_en.pdf">https://www.thoughtworks.com/content/dam/thoughtworks/docume nts/books/b k_NoSQL_Ch_13_en.pdf</a></p><p>2.Dr.Dipali Meher Retrived from</p><p><a href="https://www.slideshare.net/slideshow/version-stamps-in-nosql-databases/261460492">https://www.slideshare.net/slideshow/version-stamps-in-nosqldatabases/261460492</a></p><p>3.Arun das Retrived from<a href="https://medium.com/@aruna.das29/version-stamp-technique-of-conflict-resolution-8-e9b74150955e"> Version Stamp : Technique of conflict resolution — 8 | by Aruna Das | Medium</a></p><p>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=842c0873745a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>