<?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 The Black Sheep on Medium]]></title>
        <description><![CDATA[Stories by The Black Sheep on Medium]]></description>
        <link>https://medium.com/@t-b-s?source=rss-a2f0932201e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cacNXi2HZg7qyKORzSfZ2A.jpeg</url>
            <title>Stories by The Black Sheep on Medium</title>
            <link>https://medium.com/@t-b-s?source=rss-a2f0932201e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 02:15:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@t-b-s/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[Distributed Computing — Chapter 18]]></title>
            <link>https://t-b-s.medium.com/distributed-computing-chapter-18-231252529057?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/231252529057</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 05:13:59 GMT</pubDate>
            <atom:updated>2022-07-25T05:13:59.076Z</atom:updated>
            <content:encoded><![CDATA[<h3>Distributed Computing — Chapter 18</h3><p>623–648</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tYxWuyksovxA1Thu8PggPQ.jpeg" /></figure><p>Things are easier when all the parts of your application are in one place, however it is not always possible. Starting from having to perform powerful computations on server side, to having to fetch data from a database. In this chapter, we’ll learn how to use Java Remote Method Invocation (RMI) technology, including Servlets, Enterprise Java Beans (EJB) ,and Jini. This includes how the EJB and Jini depends on RMI.</p><h4>Few important points about distributed computing using Java</h4><ul><li>An object on one heap cannot get a normal Java reference to an object on a different heap (running on a different JVM)</li><li>Java Remote Method Invocation (RMI) makes it seem like you’re calling a method on a remote object (i.e. an object in a different JVM), but you aren’t</li><li>When a client calls a method on a remote object, the client is really calling a method on a proxy of the remote object. The proxy is called a ‘stub’.</li><li>A stub is a client helper object that takes care of the low-level networking details (sockets, streams, serialization etc.) by packaging and sending method calls to the server.</li><li>To build a remote service (in other words, an object that a remote client can ultimately call methods on), you must start with a remote Interface.</li><li>A remote interface must extend the java.rmi.Remote interface. and all methods must declare RemoteException.</li><li>Your remote service implements your remote interface.</li><li>Your remote service should extend UnicastRemoteObject. (Technically there are other ways 10 create a remote object, but extending UnicastRemoteObject is the simplest).</li><li>Your remote service class must have a constructor, and the constructor must declare a RemoteException (because the superclass constructor declares one).</li><li>Your remote service must be instantiated, and the object registered with the RMI registry.</li><li>To register a remote service, use the static Naming.rebind(‘Service Name”, serviceInstance);</li><li>The RMI registry must be running on the same machine as the remote service, before you try 10 register a remote object with the RMI registry.</li><li>Almost everything related to RMI can throw a RemoteException (checked by the compiler). This Includes registering or looking up a service in the registry, and all remote method calls from the client to the stub.</li></ul><h4>About servlets</h4><ul><li>Servlets are Java classes that run entirely on (and/or within) an HTTP(web) server.</li><li>Servlets are useful for running code on the server as a result of client interaction with a web page. For example, if a client submits information in a web page form, the servlet can process the information, add it to a database, and send back a customized, confirmation response page.</li><li>To compile a servlet, you need the servlet packages which are in the servlets.jar file. The servlet classes are not part of the Java standard libraries, so you need to download the servlets.jar from java.sun.com or get them from a servlet capable web server.</li><li>To run a servlet, you must have a web server capable of running servlets, such as the Tomcat server from apache.org.</li><li>Your servlet must be placed in a location that’s specific to your particular web server, so you’ll need to find that out before you try to run your servlets. If you have a web site hosted by an ISP that supports servlets, the ISP will tell you which directory to place your servlets in.</li><li>A typical servlet extends HttpServlet and overrides one or more servlet methods, such as doGet() ordoPos().</li><li>The web server starts the servlet and calls the appropriate method (doGet(), etc.) based on the client’s request.</li><li>The servlet can send back a response by getting aPrintWriter output stream from the response parameter of the doGet() method.</li><li>The servlet can write out to an HTML page to produce the output.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=231252529057" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Release Your Code — Chapter 17]]></title>
            <link>https://t-b-s.medium.com/release-your-code-chapter-17-8426b6eef24e?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8426b6eef24e</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 04:59:45 GMT</pubDate>
            <atom:updated>2022-07-25T04:59:45.712Z</atom:updated>
            <content:encoded><![CDATA[<h3>Release Your Code — Chapter 17</h3><p>598–622</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RKe-komQEx7Fg-qa21Z59A.jpeg" /></figure><p>After writing, testing and refining your code you need to provide it to the end users. This chapter looks at how to organize, package, and deploy your Java code. It will look into local, semi-local, and remote deployment options including executable jars, JavaWeb Start, RMI, and Servlets. Also, organizing and packaging your code (regardless of the ultimate deployment choice) will also be looked at. After which would be the phase of maintenance.</p><p>A Java program is a bunch of classes. That’s the output of your development. The process of deployment consists of a bunch of steps.</p><h4>Deployment options</h4><ul><li>Local — The entire application runs on the end-user’s computer, as a stand-alone, probably GUI, program, deployed as an executable JAR</li><li>Combination of local and remote — The application is distributed with a client portion running on the user’s local system, connected to a server where other parts of the application are running</li><li>Remote — The entire Java application runs on a server system, with the client accessing the system through some non-Java means, probably a web browser.</li></ul><h4>Packages</h4><p>Packges can prevent name conflicts, but only if you choose a package name that’s guaranteed to he unique, The best way to do that is to preface your packages with your reverse domain name. You must put a class into a directory structure that matches the package hierarchy. The -d flag tells the complier, “Put the class into its package directory structure, using the class specified after the -d as the root directory. If the directories aren’t there, create them first and then put the class In the right place”.</p><p><em>package com.headfirstbooks.Book;</em></p><h4>Making an executable JAR with packages</h4><ol><li>Make sure all of your class files are within the correct package structure, under the classes directory.</li><li>Create a manifest.txt file that states which class has the main() method, and be sure to use the fully-qualified class name. Put the manifest tile into the classes directory.</li><li>Run the Jar tool to create a JAR file that contains the package directories plus the manifest. The only thing you need to include is the ‘com’ directory, and the entire package (and all classes) .</li></ol><h4>Few more important points about deployment</h4><ul><li>Organize your project so that your source code and class files are not in the same directory.</li><li>A standard organization structure is to create a project directory, and then put a source directory and a classes directory inside the project directory.</li><li>Organizing your classes into packages prevents naming collisions with other classes. If you prepend your reverse domain name on to the front of a class name. To put a class in a package, put a package statement at the top of the source code file, before any import statements</li></ul><p><em>package com.wickcedlysmart;</em></p><ul><li>To be in a package, a class must be in a directory structure that exactly matches the package structure. For a class, com.wickedlysmartFoo. the Foo class must be in a directory named wickedlysmart (which is in a directory named com)</li><li>To make your compiled class land in the correct package directory structure under the classes directory, use the -d compiler flag.</li><li>To run your code, cd to the classes directory, and give the fully-qualified name of your class.</li><li>You can bundle your classes into JAR (Java Archive) flies.</li><li>You can make an executable JAR file by putting a manifest into the JAR that states which class has the main() method. To create a manifest file, make a text file with an entry.</li><li>The entire package directory structure (and only the directories matching the package) must be immediately inside the JAR file.</li><li>To run an executable JAR file, type:</li></ul><p><em>java -jar MyJar.jar</em></p><h4>JWS</h4><p>Java Web Start technology lets you deploy a stand-alone client application from the Web. Java Web Start includes a ‘helper app’ that must be installed on the client (along with Java). A Java Web Start (JWS) app has two pieces: an executable JAR and a .jnlp file. A.jnlp file is a simple XML document that describes your JWS application. It includes tags for specifying the name and location of the JAR, and the name of the class with the main() method. When a browser gets a .jnlp file from the server (because the user clicked on a link to the .jnlp file), the browser starts up the JWS helper app. The JWS helper app reads the .jnlp file and requests the executable JAR from the Web server. When the JWS gets the JAR, it invokes the main() method as specified inthe .jnlp file.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8426b6eef24e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structures — Chapter 16]]></title>
            <link>https://t-b-s.medium.com/data-structures-chapter-16-611cefe8df18?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/611cefe8df18</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 04:38:21 GMT</pubDate>
            <atom:updated>2022-07-25T04:38:21.626Z</atom:updated>
            <content:encoded><![CDATA[<h3>Data Structures — Chapter 16</h3><p>547–598</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J38nYZU7gzu-4lQmtjlSUw.jpeg" /></figure><p>Sorting in Java can be easily done using tools for collecting and manipulating your data, without having to write your own sort algorithms. The Java Collections Framework’s data structure will help us achieve this.</p><h4>Few important data structures from Java</h4><ul><li>ArrayList</li><li>TreeSet — Keeps the elements sorted and prevents duplicates.</li><li>HashMap — Let’s you store and access elements as name value pairs.</li><li>LinkedLis — Designed to give better performance when you insert or delete elements from the middle of the collection. (In practice, an ArrayList is still usually what you want)</li><li>HashSet — Prevents duplicates in the collection, and given an element, can find that element in the collection quickly.</li><li>LinkedHashMap — Like a regular HashMap, except it can remember the order in which elements (name/value pairs) were inserted, or it can be configured to remember the order in which elements were last accessed.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=611cefe8df18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making a connection — Chapter 15]]></title>
            <link>https://t-b-s.medium.com/making-a-connection-chapter-15-dc2afb477d38?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc2afb477d38</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 04:32:00 GMT</pubDate>
            <atom:updated>2022-07-25T04:32:00.862Z</atom:updated>
            <content:encoded><![CDATA[<h3>Making a connection — Chapter 15</h3><p>488–545</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wv8rBaK2ROh574FhEwpcEg.jpeg" /></figure><p>Your Java program should be able to connect with another program in order make a proper system. Java takes care of all the low-level networking details through the <strong>java.net</strong> library. Java’s biggest benefits is its ability to send and receive data over either a file or network with a simple connection stream, using a class like BufferedReader. This chapter will talk about sockets, including client-sockets and server-sockets which could be then turned into clients and servers that talk with each other, in a multithreaded manner)</p><h4>There are three things we have to learn to get the client working</h4><ol><li>How to establish the initial connection between the client and server</li><li>How to send messages from the client</li><li>How to receive messages from the server</li></ol><p>To make a socket connection, you need to know 2 things about the server:</p><ol><li>who it is (IP address)</li><li>which port its running on (TCP port)</li></ol><h4>TCP ports</h4><p>The TCP port numbers range from 0 to 1023 — are reserved for well known services. Don’t use them for your own server programs.</p><h4>Few more import points from the chapter</h4><ol><li>Client and server applications communicate over a Socket connection.</li><li>A Socket represents a connection between two applications which may (or may not) be running on two different physical machines.</li><li>A client must know the IP address (or domain name) and the tcp port number of the server application.</li><li>A tcp port is a 16-bit unsigned number assigned to a specific server application. TCP port numbers allow different clients to connect to the same machine but communicate with different applications running on that machine.</li><li>The port numbers from 0 through 1023 are reserved for <strong>well-known services </strong>including HTTP, FTP, SMTP, etc.</li><li>A client connects to a server by making a Server socket</li></ol><p><em>Socket s= new Socket(“127.0.0.1”, 4200);</em></p><p>7. Once connected, a client can get input and output streams from the socket. These are low-level connection’ streams.</p><p><em>sock.getInputstream();</em></p><p>8. To read text data from the server, create a BufferedReader, chained to an InputStreamReader. which is chained to the input stream from the Socket.</p><p>9. InputStreamReader is a bridge stream that takes in bytes and converts them to text (character) data. Its used primarily to act as the middle chain between the high-level BufferedReader and the low-level Socket input stream.</p><p>10. To write text data to the server, create a PrintWriter chained directly to the Socket’s output stream. Call the print or println() methods to send Strings to the server.</p><p>11. Servers use a ServerSocket that waits for client requests on a particular port number.</p><p>12. When a ServerSocket gets a request it accepts the request by making a Socket connection with the client.</p><h4>Threads</h4><p>A thread is a separate thread of execution (a separate call slack) It is a Java class that represents a thread.</p><h4>How to launch a new thread</h4><ol><li>Make a Runnable object</li></ol><p><em>Runnable threadJob = new MyRunnable();</em></p><p>Runnable is an interface</p><p>2. Make a Thread object (the worker) and give it a Runnable (the job)</p><p><em>Thread myThread = new Thread(threadJob);</em></p><p>Pass the new Runnable object to the Thread constructor. This tells the new Thread object which method to put on the bottom of the new stack-the Runnable’s run() method.</p><p>3. Start the Thread</p><p><em>myThread.start();</em></p><p>Nothing happens until you call the Thread’s start() method. That’s when you go from having just a Thread instance to having a new thread of execution. When the new thread starts up. it takes the Runnable object’s run() method and puts it on the bottom of the new thread’s stack.</p><h4>Runnable</h4><p>Runnable is to a Thread what a job is to a worker. A Runnable is the job a thread is supposed to run. A Runnable holds the method that goes on the bottom of the new thread’s stack (<em>run()</em>). Once the thread becomes runnable, it can move back and forth between runnable, <em>running</em>, and an additional state: <em>temporarily not runnable</em> (also known as ‘blocked’).</p><h4>The Thread Scheduler</h4><p>It makes all the decisions about who moves from runnable to running. And about when (and under what circumstances) a thread leaves the running state. The scheduler decides who runs, and for how long, and where the threads go when the scheduler decides to kick them out of the currently running state.</p><h4>Few more points about threads</h4><ol><li>A thread with a lower-case “t” is a separate thread of execution in Java.</li><li>Every thread In Java has its own call stack.</li><li>A Thread with a capital “T” is the java.lang.Thread class. A Thread object represents a thread of execution.</li><li>A Thread needs a job to do. A Thread’s job is an instance of something that implements the Runnable interface.</li><li>The Runnable interface has just a single method, run(). This is the method that goes on the bottom of the new call stack. In other words. it is the first method to run in the new thread.</li><li>To launch a new thread, you need a Runnable to pass to the Thread’s constructor.</li><li>A thread is in the NEW state when you have instantiated a Thread object but have not yet called start().</li><li>When you start a thread (by calling the Thread object’s start() method), a new stack is created, with the Runnable’s run() method on the bottom of the stack. The thread is now in the RUNNABLE state, waiting to be chosen to run.</li><li>A thread is said to be RUNNING when the JVM’s thread scheduler has selected it to be the currently running thread. On a single-processor machine, there can be only one currently-running thread.</li><li>Sometimes a thread can be moved from the RUNNING state to a BLOCKED (temporarily non-runnable) state. A thread might be blocked because it’s waiting for data from a stream. Or because it has gone to sleep, or because it is waiting for an object’s lock.</li><li>Thread scheduling is not guaranteed to work in any particular way, so you cannot be certain that threads will take turns nicely. You can help influence turn taking by putting your threads to sleep periodically.</li></ol><p><em>try {</em></p><p><em>Thread.sleep(2000) ;</em></p><p><em>}catch(InterruptedException ex){</em></p><p><em>ex.printStackTrace();</em></p><p><em>}</em></p><p>12. Threads can lead to concurrent issues; which can be omitted by using a lock based implementation for resources. Every Java object has a lock. A lock has only one key. Most of the time, the lock is unlocked and nobody cares. But if an object has synchronized methods, a thread can enter one of the synchronized methods only if another thread hasn’t already grabbed the one key. However, having synchronized methods could also lead to deadlocks.</p><h4>Few more things about threads</h4><ol><li>The static Thread.sleep() method forces a thread to leave the running state for atleast the duration passed to the sleep method. <em>Thread.sleep(200) //puts a thread to sleep for 200 milliseconds.</em></li><li>The sleep() method throws a checked exception (InterruptedException), so all calls to sleep must be wrapped in a try/catch. or declared.</li><li>You can use sleep() to help make sure all threads get a chance to run, although there’s no guarantee that when a thread wakes up it’ll go to the end of the runnable line. It might for example, go right back to the front. In most cases, appropriately-timed sleep() calls are all you need to keep your threads Switching nicely.</li><li>You can name a thread using the (yet another surprise) setNameO method. All threads get a default name, but giving them an explicit name can help you keep track of threads. especially if you’re debugging with print statements.</li><li>You can have serious problems with threads if two or more threads have access to the same object on the heap.</li><li>Two or more threads accessing the same object can lead to data corruption if one thread, for example, leaves the running state while still in the middle of manipulating an object’s critical state. • To make your objects thread-safe, decide which statements should be treated as one atomic process (before another thread enters the same method on the same object)</li><li>Use the keyword <strong>synchronized</strong> to modify a method declaration, when you want to prevent two threads from entering that method.</li><li>Every object has a single lock, with a single key for that lock. Most of the time we don’t care about that lock; locks come into play only when an object has synchronized methods.</li><li>When a thread attempts to enter a synchronized method, the thread must get the key for that object, if it is not available, the thread goes into a kind of waiting lounge. until the key becomes available.</li><li>Even if an object has more than one synchronized method, there is still only one key. Once any thread has entered asynchronized method on that object, no thread can enter any other synchronized method on the same object This restriction lets you protect your data by synchronizing any method that manipulates the data.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc2afb477d38" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Saving Objects — Chapter 14]]></title>
            <link>https://t-b-s.medium.com/saving-objects-chapter-14-1608b0f1def4?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1608b0f1def4</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 04:01:13 GMT</pubDate>
            <atom:updated>2022-07-25T04:01:13.139Z</atom:updated>
            <content:encoded><![CDATA[<h3>Saving Objects — Chapter 14</h3><p>448–487</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cq6G7NxflTnjtbBkN6AfKw.png" /></figure><p>Objects can be persisted and restored (saved and retrieved) . The easiest way to get it done will be looked into in this chapter.</p><h4>Steps in writing a serialized object to a file</h4><p>Serialization saves the entire object graph (all objects referenced by instance variables, starting with the object being serialized)</p><ol><li>Make a FileOutputStream</li><li>Make an ObjectOutputStream</li><li>Write the object</li><li>Close the ObjectOutputStream</li></ol><h4>Connection Stream</h4><p>A connection to a source or destination (file, socket etc.) while chain streams can’t connect on their own and must be channeled to a connection stream.</p><h4>Steps in making an object deserialized</h4><ol><li>Object on the heap</li><li>Object serialized</li></ol><h4>Facts about saving objects using Java</h4><ol><li>You can save an object’s state by serializing the object.</li><li>To serialize an object, you need an ObjectOutputStream (from the java.io package)</li><li>Streams are either connection streams or chain streams</li><li>Connection streams can represent a connection to a source or destination, typically a file, network socket connection, or the console.</li><li>Chain streams cannot connect to a source or destination and must be chained to a connection (or other) stream.</li><li>To serialize an object to a file, make a FileOuputStream and chain into an ObjectOutputStream.</li><li>To serialize an object, call writeObject(theObject) on the ObjectOutputStream. You do not need to call methods on the FileOutputStream.</li><li>To be serialized. an object must implement the Serializable interface. If a superclass of the class implements Serializable, the subclass will automatically be serializable even if it does not specifically declare/ implements Serializable.</li><li>When an object is serialized, its entire object graph is serialized. That means any objects referenced by the serialized object’s instance variables are serialized, and any objects referenced by those objects…and soon.</li><li>If any object in the graph is not serializable, an exception will be thrown at runtime, unless the instance variable referring to the object is skipped.</li><li>Mark an instance variable with the transient keyword if you want serialization to skip that variable. The variable will be restored as null (for object references) or default values (for primitives).</li><li>During deserialization, the class of all objects in the graph must be available to the JVM.</li><li>You read objects In (using readObjeet()) in the order in which they were originally written.</li><li>The return type of readObjectO is type Object, so deserialized objects must be cast to their real type.</li><li>Static variables are not serialized it doesn’t make sense to save a static variable value as part of a specific object’s state. since all objects of that type share only a single value.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1608b0f1def4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Work on Your Swing — Chapter 13]]></title>
            <link>https://t-b-s.medium.com/work-on-your-swing-chapter-13-bbd610a26e3a?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bbd610a26e3a</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 03:43:58 GMT</pubDate>
            <atom:updated>2022-07-25T03:43:58.354Z</atom:updated>
            <content:encoded><![CDATA[<h3>Work on Your Swing — Chapter 13</h3><p>418–446</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DW5MGeAZgoP464ZUoNtKsA.jpeg" /></figure><p>Layout Manager objects control the size and location of the widgets in a Java GUI. Swing is an addition to layout managers, which includes widgets. Swing helps it easier to obtain results with layout manager.</p><p>A widget is technically a Swing component. Almost every thing you can stick in a GUI extends from javax.Swing.JComponent.</p><h4>The three layout managers</h4><ol><li>borderlayout — A BorderLayout manager divides a background component into five r~ions. You canadd only one component per region to a background controlled by a BorderLayout manager. Components laid out by this manager usually don’t get to have their preferred size. 9orderlayout Is the default layout II\Qna~ for Q fromel</li><li>flow — A FlowLayout manager acts kind of like a word processor, except with components instead of words. Each component is the size it wants to be, and they’re laid out left to right in the order that they’re added. with ·word-wrap” turned on. So when a component won’t tit horizontally, it drops to the next “line” in the layout. FlowLayout Is the default layout mo~,. for a pone”</li><li>box — A BoxLayout manager is like FlowLayout in that each component gets to have its own size, and the components are placed in the order in which they’re added. But. unlike FlowLayout. a BoxLayout manager can stack the components vertically (or horizontally, but usually we’re just concerned with vertically). It’s like a FlowLayout but instead of having automatic ‘component wrapping’, you can insert a Sort of ‘component return key’ and force the components to start a new line. -</li></ol><h4>Few facts about Swing</h4><ol><li>Layout managers control the size and location of components nested within other components.</li><li>When you add a component to another component (sometimes referred as a background component, the added component is controlled by the layout manager of the background component</li><li>A layout manager asks components for their preferred size, before making a decision about the layout. Depending on the layout manager’s policies, it might respect all, some, or none of the component’s wishes.</li><li>The BorderLayout manager lets you add a component to one of the five regions. You must specify the region when you add the component, using the following syntax:</li></ol><p>add (BorderLayout. EAST, panel);</p><p>5. With BorderLayout, components in the north and south get their preferred height but not width. Components In the east and west get their preferred width, but not height. The component in the center gets whatever is left over (unless you use pack () ).</p><p>6. The pack() method is like shrink-wrap for the components; It uses the full preferred size of the center component, then determines the size of the frame using the center as a starting point, building the rest based on what’s in the other regions.</p><p>7. FlowLayout places components left to right. top to bottom, in the order they were added, wrapping to a new line of components only when the components won’t fit horizontally.</p><p>8. RowLayout gives components their preferred size in both dimensions.</p><p>9. BoxLayout lets you align components stacked vertically, even if they could fit side-by-side. Unlike FlowLayout, BoxLayout uses the preferred size of the component in both dimensions.</p><p>10. BorderLayout is the default layout manager for a frame; FlowLayout Isthe default for a panel.</p><p>11. If you want a panel to use something other than flow, you have to call setLayout () on the panel.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bbd610a26e3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Very Graphic Story — Chapter 12]]></title>
            <link>https://t-b-s.medium.com/a-very-graphic-story-chapter-12-4055d03f306c?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4055d03f306c</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 03:33:55 GMT</pubDate>
            <atom:updated>2022-07-25T03:33:55.063Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Very Graphic Story — Chapter 12</h3><p>374–416</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cL73Rje3s6r2CMr9yZv0Tg.jpeg" /></figure><p>A graphical interface is a must to bring in the user friendliness to an application. Command line applications can be powerful yet inflexible, and unfriendly. This chapter brings in UI features in Java, such as how to include buttons on a screen, and making it all pretty.</p><h4>Few important facts about creating GUI from Java</h4><ol><li>A listener interlace is the bridge between the listener (you) and event source (the button). When you implement a listener interface, you. give the button a way to call you hack. The interface is where the call-hack method is declared.</li><li>To make a GUI, start with a window, (usually a JFrame</li></ol><p><em>JFrame frame = new JFrame();</em></p><p>3. You can add widgets (buttons, text fields, etc.) to the JFrame using:</p><p><em>frame.getcontentPane().add(button);</em></p><p>4. Unlike most other components, the JFrame doesn’t let you add to it directly, so you must add to the JFrame’s content pane.</p><p>5. To make the window (JFrame) display, you must give it a size and tell it be visible:</p><p><em>frama.setSize(300,300);</em></p><p><em>frame.sBtVisihle(true);</em></p><p>6. To know when the user clicks a button (or takes some other action on the user interface) you need to listen for a GUI event.</p><p>7. To listen for an event, you must register your interest with an event source. An event source is the thing (button, checkbox,etc.) that ‘fires’ an event based on user interaction.</p><p>8. The listener Interface gives the event source away to call you back, because the Interface defines the methods the event source will call when an event happens.</p><p>9. To register for events with a source, call the source’s registration method. <em>add&lt;EventType&gt;Listener</em></p><p>10. To register for a button’s ActionEvents</p><p><em>button.addActionListener(this);</em></p><p>11. Implement the listener interface by implementing all of the interface’s event-handling methods. Put your event handling code in the listener call-back method.</p><p>12. For ActionEvents, the method is:</p><p><em>public void actionPerformed(ActionEvent event) {</em></p><p><em>button. setText (“you elicked! “) ;</em></p><p><em>}</em></p><p>13. The event object passed into the event-handler method carries information about the event, Including the source of the event.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4055d03f306c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Risky Behaviour — Chapter 11]]></title>
            <link>https://t-b-s.medium.com/risky-behaviour-chapter-11-19b99640ff09?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/19b99640ff09</guid>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 03:25:28 GMT</pubDate>
            <atom:updated>2022-07-25T03:25:28.174Z</atom:updated>
            <content:encoded><![CDATA[<h3>Risky Behaviour — Chapter 11</h3><p>336–372</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PaSd438M1qGfS5hcM_NbxQ.jpeg" /></figure><p>No matter how good a programmer you are, you can’t control everything. When you write a risky method, you need code to handle the bad things that might happen. There is code that you can’t guarantee will work at runtime. Code that expects the file to be in the right directory, the server to be running, or the <strong>thread </strong>to stay asleep.</p><p>Few main points about Java exceptions include,</p><ol><li>an Exception is a type of a class that enables you to create objects ( from the inheritance tree)</li><li>An exception unless called, is always thrown back to the caller</li><li>The compiler checks for everything except RuntimeExceptions — The compiler guarantees: If you throw an exception in your code you must declare it using the throws keyword in your method declaration.</li><li>If you call a method that throws an exception (in other words, a method that declares It throws an exception), you must acknowledge that you’re aware of the exception possibility. One way to satisfy the compiler is to wrap the call in a try/catch.</li><li>A method can throw an exception when something fails at runtime.</li><li>The compiler does NOT pay attention to exceptions that are of type RuntimeException. A RuntimeException does not have to be declared or wrapped in a try/catch (although you’re free todo either or both of those things)</li><li>All Exceptions the compiler cares about are called ‘checked exceptions’</li><li>Either handle or declare an exception.</li></ol><h4>try-catch block</h4><p>A finally block is where you put code that must run regardless of an exception.</p><p>If the try block fails (an exception), flow control immediately moves to the catch block. When the catch block completes, the finally block runs.</p><p>When the finally block completes, the rest of the method continues on.</p><p>If the try block succeeds (no exception), flow control skips over the catch block and moves to the finally block.</p><p>When the finally block completes, the rest of the method continues on.</p><p>If the try or catch block has a return statement, finally will still run. Flow jumps to the finally, then back to the return.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19b99640ff09" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Numbers Matter — Chapter 10]]></title>
            <link>https://t-b-s.medium.com/numbers-matter-chapter-10-3f9ce0bb8580?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f9ce0bb8580</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[math]]></category>
            <category><![CDATA[static]]></category>
            <category><![CDATA[numbers]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Sun, 24 Jul 2022 16:05:56 GMT</pubDate>
            <atom:updated>2022-07-24T16:05:56.769Z</atom:updated>
            <content:encoded><![CDATA[<h3>Numbers Matter — Chapter 10</h3><p>312–334</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aZXYqmUEGin1NLG_SnvOew.jpeg" /></figure><p>There are no global methods in Java. However static methods are similar to global method in callability.</p><p>Eg:</p><blockquote>Math.round() //rounds a floating point number to the nearest integer.</blockquote><blockquote>Math.min() //takes two numerical primitives and returns the smaller</blockquote><blockquote>Math.max() //takes two numerical primitives and returns the smaller</blockquote><blockquote>Math.abs() //returns the absolute value of a number.</blockquote><p>You simply can’t make instances of Math class.</p><p>Math m = new Math(); //will give compiler error (since Math has a <strong>private </strong>accessor) (Typically if a class has all its membes as static, best approach is to make its constructor private)</p><p>The only way to get a new object are by using <strong>new</strong> or <strong>deserialization </strong>or something called <strong>Java Reflection API.</strong></p><p><strong>Referencing between static and non-static methods</strong></p><p>Static methods can’t use non-static methods and non-static methods can’t use static methods either. This is because static variables are shared across all the objects in one class.</p><p>A static method is good for utilizing a method that does not (and will never) depend on a particular instance variable value.</p><h4>Initializing a static variable</h4><p>Static variables are initialized when a class is loaded. (either the JVM or the programmer can decide to load the class).</p><p>Static variables in a class are initialized before,</p><ol><li>any object of that class can be created.</li><li>any static method of the class runs.</li></ol><p>Also, unless provided, all static variables will hold the default value once the class in initialized.</p><h4>Static final variables are constants</h4><p>The value of a static final variable will stay the same (constant) as long as the class is loaded. Constant variable names should be in all cap, with underscores separating words. Eg: Math.PI API</p><p>public static final double PI = 3.141592653589793;</p><p><strong>static blocks </strong>can be used to initialize static variables are they are run as soon as the class is loaded (before any static variable can be used). However, if a value for final static variables is not provided in either of those places (declaration line or static block), the compiler will throw a <strong>might not have been initialized </strong>error.</p><h4><strong>Final</strong></h4><p><strong>final variable — </strong>can’t change its value</p><p><strong>final method — </strong>you can’t override the method. If the class is final, there’s no need to mark the methods final (if a class is final it can never be sub-classed) (none of its methods can ever be overridden)</p><p><strong>final class</strong> — can’t extend the class (i.e. you can’t make a subclass) (for security reasons) (to make sure a particular implementation of the methods on a class stays the same) Eg: String</p><h4>Math methods</h4><p><strong>Math.random — </strong>returns a double between 0.0 (not including) and 1.0. double rl = Math. random 0 ;</p><p>int r2 = (int) (Math.random() * 5)</p><p><strong>Math.abs()</strong> — returns a double that is the absolute value of the argument. You can pass it an int and get an int or pass a double and return a double.</p><p>int x = Math .abs(-240); //returns 240</p><p>double d = Math.abs(240.45); //returns 240.45</p><p>//returns 90876.49</p><p><strong>Math.round() — r</strong>eturns an int for float and long for double, rounded to the nearest integer value.</p><p>int x = Math.round(-24.8f); //returns -25</p><p>int y = Math.round(24.45f); //returns 24</p><p>Math.min() — returns a value that is the minimum of the two arguments. The method is overloaded to take ints , longs, floats, or doubles.</p><p>int x = Math.min(24,240); //returns 24</p><p>double y = Math.min(90876.5, 90876 .49);</p><p>Math.max() — returns a value that is the maximum of the two arguments. The method is overloaded to take ints, longs, floats, or doubles.</p><p>int x = Math.max(24,240); //returns 240</p><p>double y = Math.max(90876 .5, 90876.49); //returns 90876.5</p><h4><strong>Wrapping a primitive</strong></h4><p>There’s a wrapper class for every primitive type, and since the wrapper classes are in the java. lang package, you don’t need to import them. Mostly used to storing a primitive value inside a collection like an ArrayList or HashMap. However, the autoboxing feature added to Java 5.0 does the conversion from primitive to wrapper object automatically. Autoboxing can also be used in parameter values, return values and operand operations.</p><h3>Vocabulary</h3><p>static — a variable or method whose behavior doesn’t depend on an instance variable value.</p><p>constants In Java-static final variables</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f9ce0bb8580" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern JavaScript Every Software Engineer Must Know]]></title>
            <link>https://t-b-s.medium.com/modern-javascript-every-software-engineer-must-know-392fb0b0d252?source=rss-a2f0932201e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/392fb0b0d252</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ecmascript]]></category>
            <category><![CDATA[js]]></category>
            <category><![CDATA[callback]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[The Black Sheep]]></dc:creator>
            <pubDate>Mon, 18 Jul 2022 14:01:53 GMT</pubDate>
            <atom:updated>2022-07-18T14:01:53.874Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7M2ozah2nfvoMu9kcYd5_A.png" /><figcaption>JS logo</figcaption></figure><p>JavaScript often abbreviated as JS, is a programming language that conforms to the ECMAScript specification. JavaScript is high-level, often just-in-time (JIT) compiled, and multi-paradigm. It has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.</p><p>The word “modern” when it comes to technologies is really subjective. For JS, 1995 modern - was JavaScript events, in 2004 - modern was AJAX, in 2006 - modern was jQuery, in 2010 - modern was Angular 1, in 2012 - modern was Node JS, in 2014 - modern was React, in 2016 - modern was Angular 2 in 2019 - modern was the Deno runtime.</p><p>This being said, JavaScript techniques from 20 years ago are still considered modern best practices.</p><p>JavaScript is created using ECMA as the syntax which could be considered as its building block. Here are few things every JavaScript Enigineer MUST know.</p><ol><li><strong>The difference between var and let.</strong></li></ol><p><em>for(var i = 0;i&lt;10;i++){</em></p><p><em>var k=i;</em></p><p><em>console.log(“&gt;&gt;&gt; “+i);</em></p><p><em>}</em></p><p><em>console.log(“last value “+i); //prints 10</em></p><p><em>console.log(“inner value “+i); //prints 9</em></p><p>However,</p><p>changing the second line to <em>let k = i; </em>will give a runtime error. Therefore, using let guarantees that a certain variable is made invisible outside of its scope.</p><p>On the other hand, using <em>const k = i; </em>will also give out the same error. Using <em>const k; </em>on top of the loop to define will also not work as you have to initial a const in its declaration.</p><p>2. <strong>Const on a non-variable (such as an object or array) works fine</strong></p><p><em>const city =”Colombo”;</em></p><p><em>city =”Colombo”; // error</em></p><p>However,</p><p><em>const city =[”Colombo”,”Galle”];</em></p><p><em>city.push(”Colombo”); // works fine as its an array</em></p><p><em>console.log(city);</em></p><p><strong>3. arrow functions</strong></p><p><em>function area(x,y){</em></p><p><em>return x*y;</em></p><p><em>}</em></p><p><em>const area2 = (x,y)=&gt;{ //an arrow function</em></p><p><em>return x*y;</em></p><p><em>}</em></p><p><em>const area3 = (x,y)=&gt;return x*y; //same function</em></p><p><em>const area4=x=&gt;x*x;</em></p><p><em>console.log(area(10,12));</em></p><p><em>console.log(area(10,12));</em></p><p><em>console.log(area(10,12));</em></p><p><em>console.log(area(10));</em></p><p><strong>4. functions and arrow functions don’t behave the same</strong></p><p>A typical function represents the <em>this </em>keyword of a function. But an arrow function does not.</p><p><em>const print={</em></p><p><em>function1: function(){</em></p><p><em>console.log(“this is function 1 ”,this));</em></p><p><em>},</em></p><p><em>function2: ()=&gt;{</em></p><p><em>console.log(“this is function 2”,this);</em></p><p><em>}</em></p><p><em>}</em></p><p><em>print.function1(); //this is function 1 {function1:[Function: function1], function2: [Function: function2]}</em></p><p><em>print.function2(); //this is function 2 {}</em></p><p>5. Object handling in modern JS</p><p><em>let SQRT = Math.SQRT2;</em></p><p><em>const vehicle={ // a standard object with key-value pairs inside</em></p><p><em>make:”Mitsubishi”,</em></p><p><em>p1:100, //a key-value pair</em></p><p><em>p2:200, //a key-value pair</em></p><p><em>drive(){}, //a function</em></p><p><em>stop:()=&gt;{}, //an arrow function</em></p><p><em>//[status]:”ready”, //a dynamic property</em></p><p><em>SQRT //can use a variable from outside (is equal to SQRT:SQRT)</em></p><p><em>}</em></p><p>console.log(vehicle); //uncommenting the dynamic property gives error “status is not defined”. But if you define a variables as <em>status=”order condition”, the error will be fixed.</em></p><p>Simply put, if the key of a certain key-value pair is going to be dynamic, then it could be saved in a variable. Eg: To save a record based on the customer id.</p><p>6.</p><p><em>let obj = {“country”:””};</em></p><p><em>obj.country=”Sri Lanka”;</em></p><p><em>console.log(obj); //Sri Lanka</em></p><p><em>obj.country=”USA”;</em></p><p><em>console.log(obj); //USA</em></p><p><em>let obj = {“country”:””};</em></p><p><em>obj.country=”Sri Lanka”;</em></p><p><em>//Object.freeze(obj); //Freezing the object stops it from changing its value</em></p><p><em>console.log(obj); //Sri Lanka</em></p><p><em>obj.country=”USA”;</em></p><p><em>console.log(obj); //Sri Lanka</em></p><p>This could be used to freeze a value when a certain variable is passed from one function to another etc.</p><p><em>let flower={</em></p><p><em>name:””,</em></p><p><em>price:{</em></p><p><em>t1:10,</em></p><p><em>t2:20</em></p><p><em>}</em></p><p><em>}</em></p><p><em>flower.name=”rose”;</em></p><p><em>flower.price.t1=15;</em></p><p><em>console.log(flower); //{name: ‘rose’, price:{t1:15,t2:20}}</em></p><p><em>Object.freeze(flower);</em></p><p><em>flower.name=”Violet”;</em></p><p><em>flower.price.t1=18;</em></p><p><em>console.log(flower); //{name: ‘rose’, price:{t1:18,t2:20}}</em></p><p>Object.freeze() only changes first level. It does not freeze deeper levels.</p><p><strong>7. Printing values from inside an object</strong></p><p><em>const person={</em></p><p><em>fname:john”,</em></p><p><em>lname:”doe”,</em></p><p><em>age:30,</em></p><p><em>country:”USA”</em></p><p><em>}</em></p><p><em>let intro=`congrats ${person.name}`;</em></p><p><em>console.log(intro);</em></p><p><strong>8. OOP concepts</strong></p><p><em>class Employee{</em></p><p><em>constructor(name){</em></p><p><em>this.name = name; //no need of a local variable</em></p><p><em>}</em></p><p><em>banner=()=&gt; console.log(this.name + ‘ is an Employee’);</em></p><p><em>}</em></p><p><em>class Manager extends Employee{</em></p><p><em>constructor(name, section){</em></p><p><em>super(name);</em></p><p><em>this.section = section;</em></p><p><em>}</em></p><p><em>banner=()=&gt; console.log(this.name + ‘ is an Employee’);</em></p><p><em>}</em></p><p><em>const e1 = new Employee(“Brian”);</em></p><p><em>const e2 = new Manager(“Chriss”, “QA”);</em></p><p><em>e1.banner(); //Brian is an Employee</em></p><p><em>e2.banner(); // Chriss is an Employee an manager of QA</em></p><p><em>e2.banner()=&gt;console.log(“this function is overriden”); //this function is overriden</em></p><p><em>e2.banner();</em></p><p><strong>9. imports</strong></p><p><em>//option 1 for imports</em></p><p><em>const PI=Math.PI</em></p><p><em>const SQRT2=Math.SQRT2</em></p><p><em>//option 2 for imports</em></p><p><em>const {PI,SQRT}=Math</em></p><p><strong>10. value passing</strong></p><p><em>const square = {</em></p><p><em>base:12.2,</em></p><p><em>id:”main”,</em></p><p><em>color:”blue”,</em></p><p><em>line:true,</em></p><p><em>rounded:false,</em></p><p><em>round:0</em></p><p><em>}</em></p><p><em>const area = ({base})=&gt;{ //only the property is passed inside</em></p><p><em>return base*base;</em></p><p><em>}</em></p><p><em>console.log(area(square))</em></p><p><em>const area2= ({base},{round=3}={})=&gt;{</em></p><p><em>return (base*base).toFixed(round); //for rounding up</em></p><p><em>}</em></p><p><em>console.log(area2(square));</em></p><p><strong>11. function imports</strong></p><p><em>//import option 1</em></p><p><em>var fs=require(‘fs’);</em></p><p><em>fs.writeFile(‘sample2.txt’,’Hello JS!!’, function(err){</em></p><p><em>if(err) throw err;</em></p><p><em>console.log(‘Saved!’);</em></p><p><em>});</em></p><p><em>//import option 2</em></p><p><em>const {writeFile}=require(‘fs’);</em></p><p><em>writeFile(‘sample2.txt’,’Hello JS!!’, function(err){</em></p><p><em>if(err) throw err;</em></p><p><em>console.log(‘Saved!’);</em></p><p><em>});</em></p><p><strong>12. rest operator</strong></p><p><em>//skipping in array option 1</em></p><p><em>const [jan,feb,march,,may]=[10,20,30,40,50]; //4 variables 5 values (40 will be skipped and 50 will be assigned to may)</em></p><p><em>console.log(jan); //10</em></p><p><em>console.log(may); //50</em></p><p><em>//skipping in array option 2 (rest operator)</em></p><p><em>const [month1, …otherMonths]=[10,20,30,40,50];</em></p><p><em>console.log(month1); //10</em></p><p><em>console.log(otherMonths); //20,30,40,50</em></p><p><em>let newArray= […otherMonths]; //copying the values of otherMonths to newArray</em></p><p>let new2=[…otherMonths,newArray]</p><p><em>console.log(newArray); //10,20,30,40,50</em></p><p><em>console.log(new2); //10,20,30,40,50,10,20,30,40,50</em></p><p><strong>13. rest use to eliminate</strong></p><p><em>const data={</em></p><p><em>name:”Brian”,</em></p><p><em>city:”NY”,</em></p><p><em>country:”USA”,</em></p><p><em>age:48,</em></p><p><em>vehicle:”ford”,</em></p><p><em>game:”baseball”</em></p><p><em>}</em></p><p><em>let {vehicle,game, …person}=data; //to extract separate values from an object</em></p><p><em>console.log(person); //rest is assigned to the person object</em></p><p><em>const person2={</em></p><p>…person //copy the values inside one object to another object</p><p><em>}</em></p><p>console.log(person2)</p><p>Thanks for reading. Until next time! 👋🏽</p><p><strong>References</strong></p><ol><li><a href="https://www.youtube.com/watch?v=Jc2iW4yVv38">https://www.youtube.com/watch?v=Jc2iW4yVv38</a></li><li><a href="https://quocent.com/QUOCENT-CMS/userfiles/StaticBanner/1529923467_Javascript.png">https://quocent.com/QUOCENT-CMS/userfiles/StaticBanner/1529923467_Javascript.png</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=392fb0b0d252" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>