<?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 Sachin Patil on Medium]]></title>
        <description><![CDATA[Stories by Sachin Patil on Medium]]></description>
        <link>https://medium.com/@sachpa?source=rss-9562e6fc68b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oquaIKqv3tWJgEP-Lc2XUA.jpeg</url>
            <title>Stories by Sachin Patil on Medium</title>
            <link>https://medium.com/@sachpa?source=rss-9562e6fc68b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:49:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sachpa/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[Factory Method Pattern]]></title>
            <link>https://medium.com/@sachpa/factory-method-pattern-d6be494804f1?source=rss-9562e6fc68b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/d6be494804f1</guid>
            <dc:creator><![CDATA[Sachin Patil]]></dc:creator>
            <pubDate>Sun, 21 Jan 2018 09:43:53 GMT</pubDate>
            <atom:updated>2018-01-21T14:10:39.327Z</atom:updated>
            <content:encoded><![CDATA[<p>Can you “write an example of Factory Method pattern”? Someone may end up writing following code.</p><pre><strong>public interface </strong>Car {<br>    int maxSpeed();<br>}</pre><pre><strong>public class </strong>Civic implements Car {<br>    public int maxSpeed() {<br>         return 170;<br>    }<br>}</pre><pre><strong>public class </strong>Accord<strong> </strong>implements Car {<br>    public int maxSpeed() {<br>         return 155;<br>    }<br>}</pre><pre><strong>public class </strong>CarFactory {<br>    public Car produce(String type) {<br>        Car car;<br>        <strong>if</strong> (&quot;civic&quot;.equals(type)) {<br>             car = new Civic();<br>        } <strong>else if</strong> (&quot;accord&quot;.equals(type)) {<br>             car = new Accord();<br>        } <strong>else</strong> {<br>             car = DummyCar()<br>        }<br>        // Label Car&#39;s maximum speed<br>        return car;<br>    }<br>}</pre><p>He may call method “produce(type)” as Factory Method pattern. What if I create Utils class which has same produce(type) method? What will be difference between these two implementations? Why should I call produce(type) method as Factory Method?</p><blockquote><strong>Above implementation is NOT a Factory Method pattern. It’s not even considered as design pattern.</strong></blockquote><p>Now, let’s consider cars in countries like India and US.</p><p>Same car model in India and US have differences in driver seat location, maximum speed, number of gears, etc. So, Region specific factory needs to produce cars for given region.</p><p>Code will be like below:</p><pre><strong>public class abstract</strong> CarFactory {<br>    public Car produce(String type) {<br>         Car car = <strong>getCar(type)</strong>;<br>         // Label car speed<br>         return car;<br>    }<br>    <br>    <strong>public abstract Car getCar(String type);</strong><br>}</pre><pre><strong>public class</strong> IndiaCarFactory extends CarFactory {<br>   public Car getCar(String type) {<br>        if (&quot;civic&quot;.equals(type)) {<br>             return new IndiaCivic();<br>        } else if (&quot;accord&quot;.equals(type)) {<br>             return new IndiaAccord();<br>        }<br>        return new IndiaDummyCar();<br>   }<br>}</pre><pre>public class USCarFactory extends CarFactory {<br>   public Car getCar(String type) {<br>        if (&quot;civic&quot;.equals(type)) {<br>             return new USCivic();<br>        } else if (&quot;accord&quot;.equals(type)) {<br>             return new USAccord();<br>        }<br>        return USDummyCar();<br>   }<br>}</pre><p>Here, CarFactory uses Car to label maximum speed on it. However, it does not create instances of Car by its own. Rather, it defers creation of Car instances to its subclasses i.e. regional factory. This deferring to subclasses to get concrete instances via method is very important to call this pattern as Factory Method.</p><p>Method getCar(type) is “interface” provided by super class for subclasses to create instances and provide them back for usage. So,</p><blockquote><strong>Define an interface for creating an object, but let subclasses decide which class to instantiate. The Factory method lets a class defer instantiation it uses to subclasses. — GoF</strong></blockquote><p>Here is difference between two UML diagrams of above code examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*ExOD3lL4q4-MBdG-BqkudQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d6be494804f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating and reading DEX file]]></title>
            <link>https://medium.com/@sachpa/creating-and-reading-dex-file-965ecd8b3206?source=rss-9562e6fc68b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/965ecd8b3206</guid>
            <category><![CDATA[dex]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[bytecode]]></category>
            <dc:creator><![CDATA[Sachin Patil]]></dc:creator>
            <pubDate>Sun, 10 Sep 2017 01:24:40 GMT</pubDate>
            <atom:updated>2017-09-10T01:24:40.931Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://developer.android.com/studio/build/index.html">Android’s build process</a> compiles Java source code to <a href="https://source.android.com/devices/tech/dalvik/dalvik-bytecode">bytecode</a> (.class file) and later converts it, along with resources, into .dex (Dalvik Executable a.k.a DEX) format to run efficiently on Android devices. So,</p><blockquote><strong>MyCode.java → MyCode.class → MyCode.dex</strong></blockquote><p>Sometimes, developer wants to understand generated instruction sequence in DEX file to understand performance impact of given code.</p><p>Both .class files and .dex files are not readable. However, one can create readable instruction sets by executing sequence of commands. If you are only interested in .class files, then you can use “javap -private -c MyCode.class” command. Let’s see how to create .dex files from sample java source code.</p><p><strong>Converting Java Source code into .jar file</strong></p><p>Create a jar file containing .class file for given source code using below commands. (decades old commands :))</p><p>#<strong>javac</strong> MyCode.java</p><p>#<strong>jar</strong> cvf MyCode.jar MyCode.class</p><p>Note : If you are using Android build tools which are less than version 26.x, then use Java 7 for compilation. Otherwise, use Java 8. This is for compatibility of class files with DEX tools.</p><p><strong>Converting .jar files into .dex file</strong></p><p>Find latest build tools version installed with your android SDK. By default, On Mac, it can be found in user directory like /Users/your_user_name/Library/Android/sdk/build-tools/. Let’s assume you got latest build tools version as 25.0.3. Use following command :</p><p>#/Users/your_user_name/Library/Android/sdk/build-tools/25.0.3/<strong>dx</strong> --dex --output MyCode.dex MyCode.jar</p><p>This will generate MyCode.dex file in current working directory.</p><p><strong>Reading .dex file</strong></p><p>We can create Dalvik Virtual Machine bytecode from dex file using dexdump tool (read disassembler) provided by android. Here, we go :</p><p>#/Users/your_user_name/Library/Android/sdk/build-tools/25.0.3/<strong>dexdump</strong> -d MyCode.dex</p><p>It dumps dex format with byte codes.</p><p><strong>Sample Code and Dalvik Machine byte code</strong></p><p>Finding max using two ways.</p><pre><strong>public class </strong>MyCode {<br><br>    <strong>private int </strong>getMax1(<strong>int </strong>arr[]) {<br>        <strong>int </strong>max = Integer.<strong><em>MIN_VALUE</em></strong>;<br>        <strong>for </strong>(<strong>int </strong>i = 0; i &lt; arr.<strong>length </strong>; i++) {<br>            <strong>int </strong>value = arr[i];<br>            <strong>if </strong>(max &lt; value) {<br>                max = value;<br>            }<br>        }<br>        <strong>return </strong>max;<br>    }<br><br>    <strong>private int </strong>getMax2(<strong>int </strong>arr[]) {<br>        <strong>int </strong>max = Integer.<strong><em>MIN_VALUE</em></strong>;<br>        <strong>for </strong>(<strong>int </strong>value : arr) {<br>            <strong>if </strong>(max &lt; value) {<br>                max = value;<br>            }<br>        }<br>        <strong>return </strong>max;<br>    }<br>}</pre><p>Extracting related Dalvik byte codes from dexdump output</p><pre>// MyCode.getMax1</pre><pre>|[000140] MyCode.getMax1:([I)I<br>|0000: const/high16 v1, #int -2147483648 // #8000<br>|0002: const/4 v0, #int 0 // #0<br>|0003: array-length v2, v4<br>|0004: if-ge v0, v2, 000e // +000a<br>|0006: aget v2, v4, v0<br>|0008: if-ge v1, v2, 000b // +0003<br>|000a: move v1, v2<br>|000b: add-int/lit8 v0, v0, #int 1 // #01<br>|000d: goto 0003 // -000a<br>|000e: return v1</pre><pre>// MyCode.getMax2</pre><pre>|[000170] MyCode.getMax2:([I)I<br>|0000: const/high16 v1, #int -2147483648 // #8000<br>|0002: array-length v3, v5<br>|0003: const/4 v0, #int 0 // #0<br>|0004: move v2, v0<br>|0005: if-ge v2, v3, 0010 // +000b<br>|0007: aget v0, v5, v2<br>|0009: if-ge v1, v0, 0011 // +0008<br>|000b: add-int/lit8 v1, v2, #int 1 // #01<br>|000d: move v2, v1<br>|000e: move v1, v0<br>|000f: goto 0005 // -000a<br>|0010: return v1<br>|0011: move v0, v1<br>|0012: goto 000b // -0007</pre><p>See byte code reference and check which version runs fast, consumes less memory. Would you mind taking array.length out of loop in getMax1 version?</p><p><strong>References and further reading</strong></p><ul><li><a href="https://source.android.com/devices/tech/dalvik/dalvik-bytecode">Dalvik bytecode | Android Open Source Project</a></li><li><a href="https://source.android.com/devices/tech/dalvik/dex-format">Dalvik Executable format | Android Open Source Project</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=965ecd8b3206" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Builder Design Pattern— Client Perspective]]></title>
            <link>https://medium.com/@sachpa/builder-pattern-client-perspective-43da0f21509b?source=rss-9562e6fc68b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/43da0f21509b</guid>
            <category><![CDATA[design-patterns]]></category>
            <category><![CDATA[optional-fields]]></category>
            <category><![CDATA[builders]]></category>
            <category><![CDATA[builder-design-pattern]]></category>
            <dc:creator><![CDATA[Sachin Patil]]></dc:creator>
            <pubDate>Sat, 25 Mar 2017 08:17:52 GMT</pubDate>
            <atom:updated>2017-04-03T02:20:07.832Z</atom:updated>
            <content:encoded><![CDATA[<p>Almost every software code base may be using builder design pattern. It helps to create complex object by separating its representation. Same construction process can create different representations. (<a href="https://medium.com/@p.osinaga/using-builder-design-pattern-in-java-2598dd804c6c">See more</a>)</p><p>We know that its for building “complex” objects. Complexity increases with number of optional fields as such optional fields needs to be checked for existence before getting values from it.</p><p>Article focuses on implementation of Builder from its client perspective to make its life easier with many optional fields. Sometimes complexity is passed over to client or Builder has code that is not easy to maintain.</p><p><strong>Evolving to Builder</strong></p><p>Let’s see example where developer decides to use Builder pattern. A Book object creation. Book is defined as follows:</p><pre><strong>class </strong>Book {<br>    <strong>private </strong>String <strong>title</strong>; // Required<br>    <strong>private </strong>String <strong>author</strong>;  // Required<br><br>    <em>/**<br>     * This is optional as some books are not for sale.<br>     * Yes, there are!<br>     */<br>    </em><strong>private int price</strong>;<br><br>    <em>// Other optional fields to follow.<br>}</em></pre><p>After applying Builder pattern, one may end up with this structure:</p><pre><strong>class </strong>Book {<br>    <strong>private </strong>String <strong>title</strong>;<br>    <strong>private </strong>String <strong>author</strong>;<br>    <strong>private int price</strong>;<br><br>    <strong>private </strong>Book(Builder builder) {<br>        <strong>title </strong>= builder.<strong>title</strong>;<br>        <strong>author </strong>= builder.<strong>author</strong>;<br>        <strong>price </strong>= builder.<strong>price</strong>;<br>    }<br><br>    String getTitle() {<br>        <strong>return title</strong>;<br>    }<br><br>    String getAuthor() {<br>        <strong>return author</strong>;<br>    }<br><br>    <strong>int </strong>getPrice() {<br>        <strong>return price</strong>;<br>    }<br><br>    <strong>static class </strong>Builder {<br>        <strong>private </strong>String <strong>title</strong>;<br>        <strong>private </strong>String <strong>author</strong>;<br>        <strong>int price</strong>;<br><br>        Builder setTitle(String title) {<br>            <strong>this</strong>.<strong>title </strong>= title;<br>            <strong>return this</strong>;<br>        }<br><br>        Builder setAuthor(String author) {<br>            <strong>this</strong>.<strong>author </strong>= author;<br>            <strong>return this</strong>;<br>        }<br><br>        Builder setPrice(<strong>int </strong>price) {<br>            <strong>this</strong>.<strong>price </strong>= price;<br>            <strong>return this</strong>;<br>        }<br><br>        Book build() {<br>            <strong>if </strong>(isInvalid()) {<br>                <strong>throw new </strong>IllegalArgumentException(<strong>&quot;Title and author is required&quot;</strong>);<br>            }<br>            <strong>return new </strong>Book(<strong>this</strong>);<br>        }<br><br>        <strong>boolean </strong>isInvalid() {<br>            <strong>return title </strong>== <strong>null </strong>|| <strong>author </strong>== <strong>null </strong>|| <strong>title</strong>.isEmpty() || <strong>author</strong>.isEmpty();<br>        }<br>    }<br>}</pre><p><strong>Corresponding Client code:</strong></p><pre><strong>public class </strong>Client {<br>    <strong>public static void </strong>main(String[] args) {<br>        Book harryPotterPart1 = <strong>new </strong>Book.Builder()<br>                .setTitle(<strong>&quot;Harry Potter - Part 1&quot;</strong>)<br>                .setAuthor(<strong>&quot;J K&quot;</strong>)<br>                .setPrice(100)<br>                .build();<br><br>        Book freeEbook = <strong>new </strong>Book.Builder()<br>                .setTitle(<strong>&quot;Free Ebook - Design Patterns&quot;</strong>)<br>                .setAuthor(<strong>&quot;GoF&quot;</strong>)<br>                .setPrice(0)<br>                .build();<br><br>        Book productsBook = <strong>new </strong>Book.Builder()<br>                .setTitle(<strong>&quot;Company products&quot;</strong>)<br>                .setAuthor(<strong>&quot;XYZ Pvt. Ltd&quot;</strong>)<br>                .build(); // Book with no price tag.<br><br>        <em>printBookPrice</em>(harryPotterPart1);<br>        <em>printBookPrice</em>(freeEbook);<br>        <em>printBookPrice</em>(productsBook);<br>    }<br><br>    <strong>private static void </strong>printBookPrice(Book book) {<br>        System.<strong><em>out</em></strong>.println(<strong>&quot;Book title &quot;  </strong>+ book.getTitle());<br>        System.<strong><em>out</em></strong>.println(<strong>&quot;Book Price : &quot; </strong>+ book.getPrice());<br>    }</pre><p>Problem with above builder is : Client cannot reliably determine whether book is free or not for sale. Because, default value of int is zero and free books price is also zero.</p><blockquote>Various alternatives to get rid of this ambiguity for optional fields are: Setting known default value, Using Wrapper classes for primitive variables, using boolean state variables and recommended one.</blockquote><p><strong>Setting known default value</strong></p><p>One may quickly think and set it as -1 to distinguish between two states. May be that is sufficient for today. And client code will be changed like this:</p><pre>priceToPrint = book.getPrice() == -1<br>                     ? <strong>&quot;Not for Sale&quot; <br>                     </strong>: <strong>&quot;&quot; </strong>+ book.getPrice();</pre><p>Now, lets assume that one generous book shop owner decides to give very old and good books to frequent book buyers with cashback of same price with condition of buying one new book along with it. That’s affordable to him because old books has low price compared to current times.</p><p>So, price of “old and good book” can be negative and so logic of using -1 is no more valid. Client will not determine difference again.</p><p><strong>Using Wrapper classes</strong></p><p>Wrapper class object (which can be null) for primitive variables. So, instead of using optional variable as</p><pre><strong>private int price</strong>;</pre><p>one can use</p><pre><strong>private Integer price</strong>;</pre><p>And client code will become</p><pre>priceToPrint = book.getPrice() == null<br>                     ? <strong>&quot;Not for Sale&quot; <br>                     </strong>: <strong>&quot;&quot; </strong>+ book.getPrice();</pre><p>This solves problem for primitive types but its not generic enough to accomodate other optional fields of type like String. Because, null can be valid value for such optional fields.</p><p><strong>Boolean state variables</strong></p><p>What if we use boolean variable to track whether ‘price is set or not’ using builder API. Excerpt from code with this change :</p><pre><strong>class </strong>Book {<br>    <br>    .....<br><br>    <strong>private int price</strong>;<br>    <strong>private boolean isPriceSet</strong>; // boolean state variable for price<br><br>    <strong>private </strong>Book(Builder builder) {<br>        <strong>....</strong><br>        <strong>price </strong>= builder.<strong>price</strong>;<br>        <strong>isPriceSet </strong>= builder.<strong>isPriceSet</strong>;<br>    }<br><br>    // This is new API to simplifiy client code.<br>    <strong>boolean </strong>hasPrice() {<br>        <strong>return isPriceSet</strong>;<br>    }<br><br>    <strong>int </strong>getPrice() {<br>        <strong>return price</strong>;<br>    }<br><br>    <strong>static class </strong>Builder {</pre><pre>        .....</pre><pre>        <strong>private int price</strong>;<br>        <strong>private boolean isPriceSet</strong>;</pre><pre>        Builder setPrice(<strong>int </strong>price) {<br>            <strong>this</strong>.<strong>price </strong>= price;<br>            <strong>isPriceSet </strong>= <strong>true</strong>;<br>            <strong>return this</strong>;<br>        }</pre><pre>        .....</pre><pre>    }<br>}</pre><p>Client code now:</p><pre>priceToPrint = book.hasPrice()<br>                    ? <strong>&quot;&quot; </strong>+ book.getPrice()<br>                    : <strong>&quot;Not for Sale&quot;</strong>;</pre><p>As we can see, client code is simplified. It can easily determine whether price is set or not. However, code in Builder and Book will get cluttered with lot of booleans as soon as there are many optional variables similar to price. Every boolean state variable needs to be passed from Builder to Book.</p><p><strong>A Flag for all fields (Recommended)</strong></p><p>Builder can be simplified using byte/short/int variable as flag with every bit in it reserved for boolean state variables for optional fields.</p><pre><strong>class </strong>Book {</pre><pre>    .....</pre><pre>    <strong>private int price</strong>;<br>    <strong>private static byte </strong><em>PRICE_FLAG </em>=  0x1;<br><br>    <strong>private byte fieldsFlag</strong>; // common flag for optional fields<br><br>    <strong>private </strong>Book(Builder builder) {<br>        <strong>title </strong>= builder.<strong>title</strong>;<br>        <strong>author </strong>= builder.<strong>author</strong>;<br>        <strong>price </strong>= builder.<strong>price</strong>;<br>        <strong>fieldsFlag </strong>= builder.<strong>fieldsFlag</strong>;<br>    }</pre><pre>    .... </pre><pre>    <strong>boolean </strong>hasPrice() {<br>        <strong>return </strong>hasFlag(<em>PRICE_FLAG</em>);<br>    }<br><br>    <strong>private boolean </strong>hasFlag(<strong>byte </strong>flag) {<br>        <strong>return </strong>flag == (<strong>fieldsFlag </strong>&amp; flag);<br>    }<br><br>    <strong>int </strong>getPrice() {<br>        <strong>return price</strong>;<br>    }<br><br>    <strong>static class </strong>Builder {<br>        .....</pre><pre>        <strong>private int price</strong>;<br>        <strong>private byte fieldsFlag</strong>;<br><br>        ....</pre><pre>        Builder setPrice(<strong>int </strong>price) {<br>            <strong>this</strong>.<strong>price </strong>= price;<br>            setFlag(<em>PRICE_FLAG</em>);<br>            <strong>return this</strong>;<br>        }<br><br>        <strong>private void </strong>setFlag(<strong>byte </strong>flag) {<br>            <strong>fieldsFlag </strong>= (<strong>byte</strong>) (<strong>fieldsFlag </strong>| flag);<br>        }<br>          <br>        .....</pre><pre>    }<br>}</pre><p>Code in Builder/Book is lot readable and more maintainable after above change. Client code does not require null or default value checks as well.</p><h3><strong>Conclusion</strong></h3><p>Passing single flag from Builder for all optional fields has advantages of keeping Builder, its target object and client code maintainable, readable and efficient. Solution is generic enough to apply in all situations for Builder pattern. It is recommended where many fields are optional in target object getting created.</p><blockquote>If you liked this article, please hit the ❤ icon below and follow me. Leave comment :)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43da0f21509b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nashik — Holy place]]></title>
            <link>https://medium.com/@sachpa/nashik-holy-place-51e8ca9eea94?source=rss-9562e6fc68b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/51e8ca9eea94</guid>
            <category><![CDATA[nashik]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[trimbak]]></category>
            <dc:creator><![CDATA[Sachin Patil]]></dc:creator>
            <pubDate>Sun, 19 Feb 2017 05:34:28 GMT</pubDate>
            <atom:updated>2017-02-19T06:11:14.058Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ba0v8PzHV6LM_3GWqoAw8Q.jpeg" /></figure><p>We (myself, wife and son) planned to visit <a href="https://en.wikipedia.org/wiki/Nashik">Nashik</a> for four days. Dates were 11th, 12th, 13th and 14th February 2017.</p><h3><strong>Day One — Traveling to Nashik from Kharadi (Pune).</strong></h3><p>Initially, we planned to go by bus. However, due to work and time constraints, we could not make it by Bus and as final decision pulled out our car: Honda City (our loyal and trusted partner from last four years).</p><p>Quick search on Google Map showed us shortest route from Kharadi to Nashik is via Shirur/Parner/Sakur. We decided to take route as suggested by Google Maps (It’s my companion at all places I visit. <strong>Sometimes it cheats but I forgive as it is not so “local” to these places :) </strong>).</p><p>First thing I had to do was fill nitrogen into tyre (40Rs) and make tank full with Petrol (1.5K). Both these tasks were completed in Kharadi and Wagholi respectively. I always feel secure when these things are done while going out for long drive.</p><p>We had to start navigation in Google Maps as road till Lonikand was familiar to us and as expected it was having terrible traffic at Kesnand Phata. Navigation was started after reaching to Lonikand. Almost no traffic was shown on route there onwards. However, road quality wasn’t that good till Pune-Nashik highway.</p><p>Just after taking left turn from Pune-Ahmadnagar main road and after crossing Shirur, we came across Ralegan Siddhi village. As rightly heard, it is village with greenery and due to which it stands out among other villages there.</p><p>Now, as lot of time passed on relatively bad road and we were not heading at expected pace towards highway, we decided to take a stop at village Parner. Local vendor served best Vadapav and Misal even though we initially hesitant to go there due to external appearance (85Rs). This village has direct bus from Pune via Chakan. It was well connected unlike we imagined.</p><p>We were among few car owners who travelled newly constructed Alephata — Nashik highway without toll. However, while returning back we had to pay toll as it was started when we reached to Nashik :).</p><p>Finally, we reached Nashik by 9pm. We started looking for hotels and got to know that almost all hotels are full due to Saturday. It was out of our mind. We searched for good hotels around Dwarka chowk as it was at good distance from city and Trimbakeshwar which was our next day plan. <a href="http://www.oyorooms.com/">OYO</a> suggested hotels too far from our location and hence could not go there. I loved service provided by OYO and will use it again for sure. At last, we decided to stay at Hotel Radhika (1k Rs)</p><p><strong>A review of Hotel Radhika:</strong></p><p>At first look, it seemed to be good hotel. However, it turned out to be not so worth to spend a night. After booking a decent room, we found that it has many problems. Room’s TV was not in good condition. It was not perfectly clean. Bed was not smooth. Curtain was not covering that large single window. Water was very hard. We had dinner at nearby Hotel Dwarka (370Rs) and went to sleep after making a next day’s plan.</p><h3><strong>Day Two</strong></h3><p>Got up by 7am as hot water was available after 7am only. It’s common in Nashik Hotels. There was no hot water for sometime but later there was good flow. We started for Trimbakeshwar by around 8.15am. Road till outside of city was reserved for Marathon arranged by Nashik Police. So has to take one way on Trimbakeshwar Road.</p><p><strong>Trimbak</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*01HQvFUYpKTVkOviEBR6CQ.jpeg" /></figure><p>It’s around 26 km from stay. Open parking was available provided by Nagar Parishad (20rs). Parking area was large however not clean. We had idli, pohe and misal at Hotel Kamat. Quality is below average but costs (185Rs) was high(normal 80Rs). We felt that it would have been better if we had street food just visible from hotel. It seemed that Street vadapav was more popular by looking at its customers.</p><p>From Kamat hotel, we had to walk for 5 mins to reach Trimbakeshwar temple. Trimbakeshwar, a holy place for Hindus, is one of the 12 Jyotirlingas. Shivaliks during Kumbhmela come here to have holy bath.</p><p>There was east gate however it was heavily charged for direct entry skipping serpentine queue from other side. Normal entry has queue of more than 200 people. It took around one hour. Bag and mobiles were not allowed inside and hence kept in lockers provided outside (30Rs). Local vendors selling Candy, ice-cream are boon to parents. 10 Rs candy and kid will chew it up for entire queue time. As far as I remember, this is first place I have seen where queue has standing as well as sitting facility. Queue goes via Nandi and then Linga.</p><p>Temple design and carving is amazing. Queue straight goes via Nandi and then Linga. Lots of people were doing puja, rituals, etc. Personally, I felt it was unnecessary. But yes, people has their own faith and we were there for faith only. After taking darshan, we came out of temple with content feeling. We had to walk dirty roads barefeet to reach Kushavart. For betterment of people, road could have been changed to nice footpath. Kushavart has medium sized “Kund” (well). Godavari river, also known as South Ganga, vanishes from Brahmagiri mountain and reappears here. Kushavart witnesses Kumbhmela, World’s largest religious gathering, every 12 years. Last time, it was held in 2014–15. Lot of people were taking holy bath. After washing feet, we took darshan of Godavari. Shlok enjoyed playing with water and idols of various deities. Without instruction, he did not miss to bow a bit and join his hands before deity.</p><p>We had to come back outside of Trimbakeshwar temple to collect phone n bag. While walking back to car parking, we enjoyed guavas and bought some wooden items. Nearby to car, a road romeo on cycle almost hit me as cycle slipped in front of me. There was quick verbal fight as I said “barkya, mar khalla asatas aata” (You might have been beaten now).<br>Door glass of car was haivng hotel cards with message “bring this and get 15% discount”. I just picked them but was not at all sure about its use<br>While coming back, we skipped Anjaneri Tirth (birth place of Hanuman) as it was at 6 km and road was rough. Coin Museum was in our plan. While looking for Coin Museum, we got hungry and decided to stop for lunch.<br>We landed up at one of the hotels (Hotel Krishna) for which I had discount coupon. Food was good though not best (340Rs).<br>Just after leaving hotel, we could locate Coin Museum but found that it was under renewing and was temporarily closed. We changed plan and decided to visit Someshwar, then Pandavleni and Nehru Van Udyan on the same day itself. It was already around 1pm.</p><p><strong>Someshwar Temple</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwAX23H3dpUgM_0BCr5cww.jpeg" /></figure><p>Again this is popular among city visitors. Its the only temple in India (might be in World) where Shiva is not accompanied (guarded by) Nandi but by calf who saved Shiva at this place. Looking at people around, it must be a picnic spot for Nashikkars. Its good for family with kids due to availability of slider, see-saw, a small train (20rs) in small garden. One can do boating also. Car was safe at good parking facility with cost of 15Rs.</p><p>Shubhangi, although from Kolhapur (known for Sugar cane and its by-products), had sugarcane juice (10Rs) for the first time. I was surprised and joked a lot at her. Someshwar waterfall is also famous but as river dries up in February (Summer), it wasn’t there. We had super duper corns (20Rs n 15Rs). We spent good time at this place.</p><p>Next place to visit was planned as Pandav Leni. However, it was at some height and we had to walk. On reaching at the base, we saw two Smaraks Buddha and Phalke. So, due to time crunch, decided to visit those first and if time permits then will go for Pandav leni.</p><p><strong>Buddha Smarak:</strong><br>It’s cool and silent place to visit. Designed like stupa surrounded by large garden. Center building is like stupa with huge statue (around 30 feet) of Buddha and photo frame of Dr. Babasaheb Ambedkar placed beside it. Even whispers get echoed. Its nice place for meditation. Free entry except 1Rs for chappal stand. Photos were not allowed here.</p><p><strong>Phalke Smarak:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I8WsMVncQZlXffTcvWDnMg.jpeg" /></figure><p>It is dedicated to Dadasaheb Phalke, founder of Indian Cinema. It consists of lot of things like auditoriums, museum, small theater, etc. Couples were strictly asked to identify themselves except if you have kids. When one of the guards saw Shlok and exclaimed, “Ohh you don’t need ID proofs, you have one”. We started calling Shlok as “Identity Card” :). There was no events at auditoriums and small theater at that time. Museum is dedicated to history of Indian films starting with Phalke’s Raja Harishchandra. Facts given there about historical films are interesting. It is must watch for movie lovers.</p><p>Water park was inside and closes by 5pm. Entry fee is 15Rs for Phalke Smarak but for Water Park separate fee of Rs 90 for adults. We got to know from watchman there that it’s amazing inside and must visit in Nashik. Shlok enjoyed playing for almost 45 mins at garden near entrance. Good place for kids to hang out.</p><p>As it took our lot of time in Buddha and Phalke Smarak, we directly headed to Nehru Van Udyan by skipping Pandav Leni. It was already 6.00pm.</p><p><strong>Nehru Van Udyan</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46RP9FxfsCinqhSZIiSvyw.jpeg" /></figure><p>Its at 2 mins drive from Phalke Smarak. Due to Sunday, it was huge rush there. There was long queue for tickets. Good thing is that queue was fast moving. I heard that you can also do pre-booking and have direct entry. Cost 50Rs for adults. My son (3+) had free entry. It was developed by Nashik Municipal Corporation with partner as Tata Trust. So you can expect good quality and maintenance. Car parking is along side of service road outside of Udyan. It was around 6.30pm when we reached inside. It was less than half an hour in queue.</p><p>Guiding boards are kept properly. There are many chairs with butterfly design. By the way, theme of this park is Butterfly. Huge Entrance and it’s gate is also of butterfly shape. People normally gets queued at first butterfly chair for photos. Don’t do it, there are many such chairs in park and most of them will be empty. Fortunately, we did not stop at first chair due to lack of time and it turn out to be good decision.</p><p>Garden consists of variety of trees and birds residing on them are described well. Good for tree lovers and bird lovers. Small play area can keep your child busy for sometime. Different species of Artificial elephants like Asian, African, etc are placed in such a way that it looks like all are alive and standing in reserved area. Movements of elephant’s ear and eyebrows are mechanized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R61VEHtGtlo9kW8Hq2vGdA.jpeg" /></figure><p>Don’t miss show of “Katha Aranyachi” (Story of Forest). We were informed that there are only three shows — 7pm, 7.30pm and 8pm. All are of 20 minutes. Each show has capacity of 300. We were not aware about show or its times and hence got worried when reached at show place by 7.10pm. It has nice entry decorated with peacocks and word “Katha Aranyachi”. It was so nicely written that I felt proud that we use this language. People were crazy. No single line. Due to medium sized Entrance there was mob outside of gate. As soon as previous show was finished everyone rushed inside. Dangerous for kids.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DrIFk2CakSPs18hvgkSPQg.jpeg" /></figure><p>It’s open theater with sitting facility of around 100 people. People were sitting on the floor, alongside chairs and also standing behind last chairs. I don’t think capacity is ever checked inside. Play consists of three trees in lead role. Emotions of trees are showed using laser lights. For me, it is nice to see and hear however I felt it too much emotional towards end. One should hurry up and occupy middle or last chairs for best view. As effects were given using laser, sitting too close or side by will not have good view.</p><p>No one was waiting outside when our show of 7.30pm finished. So not sure if there is really 8pm show. Exit gate is same as that of entry. Rush for exit was only due to head count. Due to checkout time and we wanted to change hotel, we came back immediately after show. It didn’t take even 15 minutes to reach hotel due to nice flyover.</p><p>We moved to hotel Dwarka. It was Sunday night and rates were slashed significantly (from 1.5K to 1K.) I think, during week days it will go down again. It’s decent hotel but didn’t have wifi and breakfast as compared to other hotels suggested by OYO. Btw, OYO call center is helpful but again suggested hotels far away from our current location. So, offline search worked well.</p><p>We had nice time due to room and hotel ambience. It had nicely organized open roof dinner. It was only our family there for that Royal feeling.</p><p>Hotel watchman asked for car cleaning/washing in early morning and charged 50Rs. It’s a norm there in every hotel.</p><h3><strong>Day Three</strong></h3><p>Woke up late by 7.30am (this is only time we were behind time but thanks to hotel). Rakesh called me and we planned for Ambika Misal suggested by him. I was more worried about finding place to park car in city area. When reached chowk nearby Ambika Misal and asked about parking facility, Vadapav gada owner gave me suggestion to park outside of BJP office in crowded area and roam around freely.</p><p>It’s 30 seconds walk from there to Ambika Misal. We waited for Rakesh and his wife along with their daughter to join us.</p><p><strong>Ambika misal</strong></p><p>It is one of the famous food places in Nashik which serves black misal instead of normally brown/red misal. It’s worth try as it’s taste is different.</p><p><strong>Sita gunfa and other spiritual places</strong></p><p>It’s at walking distance from Ambika Misal. We took two left turns on narrow lanes and reached at the Sita gunfa. It has narrow entrance. One has to sit and keep moving ahead. We were told that this is the place where Sita was kept when Ravan’s 14000 Rakshas (devils) atacked Ram after Shurpnakha was humiliated by Lakshman. Sita gunfa is surrounded by five (Panch in Sanskrit) Baniyan (Vat in Sanskrit) trees sowed by Ram. Hence the name is Panchvati.</p><p>Along with Rakesh’s family, we hired Rikshaw from there to all important spiritual places in the vicinity. It was one hour journey and driver was more of guide like he promised earlier. He showed Kumbhmela area for Viashnav, first temple being visited by Sadhus after taking holy bath in Kumbhmela, Ram’s Kuti, Lakshman temple, Shurpnakha Nak-kati, Lambe Hanuman, Lakshman Rekha, etc. He has given information at every place however was in too much hurry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*61mRNbb6iqX2hR_f2yD7xA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAOCf3NBk4XuNzVA7b_YQQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gHsrqBj6W0o4X2CsUupYkA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dQF4K3orFsN4ECxC9ZdDzQ.jpeg" /><figcaption>Sita Gufaa and other places</figcaption></figure><p>We reached back to Sita gunfa. Rakesh and family left for the day. Our family headed towards <a href="https://en.wikipedia.org/wiki/Kalaram_Temple">Kalaram Mandir</a>. As written there, Kalaram was first established by Samarth Ramdas as small temple and later it was renewed. It’s area is huge. It is also famous for entry given for Dalits by Dr. Babasaheb Ambedkar. However, it seems that entry backside entrance is totally closed now. Last time, when I was there it was proudly written on large board outside. I couldn’t locate it this time. We spent good amount of time mainly due to its artistic and huge nature.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8XaKGif_1ysPiOU8Y-CdHQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_-Bv5qh76QDhpTI9iWVC0A.jpeg" /><figcaption>Kalaram Mandir</figcaption></figure><p><strong>Chetana Dining Hall</strong></p><p>As suggested by Rakesh, we headed towards Chetana Dining Hall for lunch. We had parked our car at some distance from hotel location shown by Maps. While searching for it we felt it may not be good as building was very crowded and looked like it was having only offices. It was on the first floor of very old building. However, once entered in hotel, we felt nice and thanked Rakesh for good suggestion. They serve Maharashtrian Thali and deserts should be separately ordered. Food was a bit sweeter than we are not used to. We enjoyed food a lot. I could not control and ate too much chapatis that I could not take rice after it. I completely forgot what Samarth Ramdas had taught “Parsthali bahu bhojan kari to ek murkh” (One who eats a lot at foreign place is idiot). Shlok enjoyed Gulab jamun ordered after lunch.</p><p>We started for shopping by 3pm at Shalimar and CBS area for 3–4 hours. Shalimar market is famous and crowded place for shopping. Shubhangi enjoyed shopping as usual. I only looked for CottonKing shop rest of the time was of Shubhangi :). By 7, we were done with shopping and left for Hotel again. Meanwhile, Rakesh had called me to join Dnyaneshwar’s Haladi program that night. So, we decided to go to marriage hall where accomodation was also available.</p><p>We checked out from Hotel Dwarka and went straight to Lakshita Hall. It has nice look and if get bored during marriage one can do shopping at mall opposite to Hall.</p><h3><strong>Day Four</strong></h3><p>On marriage day, we had fast (Angaraki Sankasthi). It was special day (14th Feb) for Dnyaneshwar and hence both, he and his fiancée, decided this date. By hearing story of Dnyaneshwar, I was shocked and Shubhangi was doubly shocked. We got introduced with Dnyaneshwar’s family and met with friends attending marriage.</p><p><strong>Bhagur</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*35wGoPEnNdKEXluT3XCL5g.jpeg" /><figcaption>Birthplace of Veer Savarkar</figcaption></figure><p>A goodby to Dnyneshwar and his wife, we headed towards Pune by around 3pm with intention of reaching it early. However, after sometime, I remembered that Bhagur was in my initial plan and we had not visited it. Bhagur is birthplace of <a href="https://en.wikipedia.org/wiki/Vinayak_Damodar_Savarkar">Vinayak Damodar Savarkar</a>, a freedom fighter who decided to devote his entire life for country. He is one of the gems produced by India.</p><p>Distance and time wise, it was not significant difference if we plan to cover Bhagur while coming back. It’s on the way to Pune but not on shortest path as shown by Google. Its small, well connected village. Savarkar wada (home) is converted into Savarkar Smarak. Rare historical photos tell story of Savarkar and inspire us. When asked by Shlok, I told him short story of jumping into sea by Savarkar. He also asked me why his statue is looking angrily at us. I and people around us loved my answer and smiled. I told him that not everybody says “Bharat mata ki jai” (Hail Motherland) nowadays and hence he is angry. Shlok started the slogan, everyone smiled and I joined him as he was looking at me :). I once again looked at Savarkar’s photo and astonished by recollecting that he, at the age of 9, had written poem in Sanskrit and mailed it to publisher without naming him due to fear of not getting published. Publisher might reject it by thinking that such powerful poem cannot be written by 9 year old kid.</p><p>It is always inspirational to visit places touched by gems of India. Sacrifice is common among them. Some places are maintained well while others are ignored.</p><p><strong><em>Due to Bhagur, Nashik is more holier place for Hinduism.</em></strong> He defined Hindutva (way of life) in 20th century. Supreme Court of India has given same judgement for “What is Hindutva?” in 21st Century.</p><p>Total expenses including shopping : Rs. 11,000+</p><p>Map of travel path:</p><p><a href="https://www.google.com/maps/d/embed?mid=1Q-RsciV-bxh7H_W4GnlpLc6TukM">https://www.google.com/maps/d/embed?mid=1Q-RsciV-bxh7H_W4GnlpLc6TukM</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51e8ca9eea94" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>