<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: angelamchunu</title>
    <description>The latest articles on DEV Community by angelamchunu (@angelamchunu).</description>
    <link>https://dev.to/angelamchunu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F186437%2Fa21daf76-0a7f-4797-89bc-af6e17452bfd.png</url>
      <title>DEV Community: angelamchunu</title>
      <link>https://dev.to/angelamchunu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/angelamchunu"/>
    <language>en</language>
    <item>
      <title>What they don’t tell you in the “Starting a new position” posts.</title>
      <dc:creator>angelamchunu</dc:creator>
      <pubDate>Mon, 12 Jun 2023 20:15:58 +0000</pubDate>
      <link>https://dev.to/angelamchunu/what-they-dont-tell-you-in-the-starting-a-new-position-posts-kcp</link>
      <guid>https://dev.to/angelamchunu/what-they-dont-tell-you-in-the-starting-a-new-position-posts-kcp</guid>
      <description>&lt;p&gt;Everyday on LinkedIn we see someone starting a new job. There is always some beautiful story about how excited they are to start their new journey. We only see the end result, the success story and sometimes a perfectly inspirational summary of how they got there. I wish I could add to the list but I think I owe my past self a good venting . There are plenty of resources that can help you get motivated , this is not one of them. This is the dose of wallowing you need , just to say you are not the only miserable one and there is definitely someone out there hating it as much as you are.&lt;/p&gt;

&lt;p&gt;My biggest unsolved mystery is how people job hop so often, I hated so much about it. It’s time consuming, it’s emotionally draining and it’s just overall exhausting. What makes job hunting such an extreme sport is that all your efforts don’t always yield results. You can put in your absolute best and still have nothing to show for it. From recruiters ghosting you, to falling off the final stage of a 5 step interview process, 10/10 would not recommend. Unfortunately, in order to progress in your career, it has to be done. There are a few things that make job hunting a different kind of hell, here are some of mine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recruiters
&lt;/h2&gt;

&lt;p&gt;Where do I even start , I can’t summarise recruiters in a paragraph. Between not responding at all ,to trying too hard to convince you take a role that doesn’t benefit you, we could be here all day. I have met a hand full of recruiters that I felt have been on my side. It feels like they are more concerned about “making the sale” than finding a good fit. How are you reaching out to me about an Android project when I don’t have a single mobile dev technology on my profile? I wanted a greenfield project but I mean if they’re looking for someone to maintain their legacy system that sounds like a great match.&lt;/p&gt;

&lt;p&gt;Its almost as if getting to know you or what you want is a big ask. I once received the following message on LinkedIn :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2poW2CT5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/faihiguua5k0ln26h5nt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2poW2CT5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/faihiguua5k0ln26h5nt.png" alt="An image showing conversation with recruiter using the wrong name" width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s so much to unpack here. The only information I have is the company name . Not the technologies they’re using , the domain or even the skills I’d need . I don’t have enough information to know if I want to know more. I can get past all of that but, really my biggest concern is who on earth is Martha? My name is literally right there while you’re typing the message. How can I trust you with my next career move if you can’t even get my name right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Assessments
&lt;/h2&gt;

&lt;p&gt;Just kill me now . Was chewing glass not an option?&lt;/p&gt;

&lt;p&gt;That might have been an over-reaction, but in my defence, I really hate them. I’d prefer a technical panel interview any day over an assessment. While I can appreciate that the company needs a way to filter for and find the best candidates, it might be filtering them out. It’s okay to go back to the drawing board sometimes .&lt;/p&gt;

&lt;p&gt;There’s usually two types of assessments, the first one is a take home assessments which ranges anything from odd occurrence to building a full end to end project with responsive screens, 100% unit test, mutation test ,acceptance test coverage, cure for world hunger and a fix for the country’s electricity crisis. It’s an entire feature that needs to be done in 2 days all while still having to do your actual job. I’ve had some of these that aren’t that bad, some companies can be reasonable. But then there’s the monsters that give you an 8 story point ticket and then not reply after you submit. Surely that’s the makings of anyone’s villain origin story .&lt;/p&gt;

&lt;p&gt;The other type of assessments are a time machine to your varsity days with exam like rules. It’s a timed closed book assessment, no help from the internet or friends. My main issue with this is that it gives the idea that to be the best developer, all the answers must live inside of you at that specific moment in time . When really that’s not accurate at all. The answers are on StackOverflow/Udemy/YouTube, they’re with your team mates , they’re in a conversation with an experienced architect in the company . Development isn’t an all or nothing in that one moment. It’s people working together over years to continuously do what’s best for the problem. Someone you’ve never met is one day going to have to change your code because it’s no longer the best fit. All of that to say, exam like assessments are far from what you’re actually going to be doing day to day . If you’re really about a team focussed company, dare I say agile, why are we simulating a stressful scenario that will never actually happened on the job . Production issues are less stressful than these assessments, that’s a lie but you get the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bad Interviews
&lt;/h2&gt;

&lt;p&gt;A part of me wants to skip this section because I’ve had so many embarrassing moments that I’d really rather forget, but surely we all have ?Are you even job hunting if you don’t have bad interview stories that you look back and cringe at ? The ones where you struggled to answer a good 60% of the questions. I’ve had some really bad ones before. Bad doesn’t mean I just didn’t get it , bad means I was racking my brain trying to remember the word “request”. Bad means I couldn’t answer what language the computer “speaks”. I blacked out on the word binary… BINARY! I once had an interview go so horribly, the interviewer implied that someone did the assessment for me. He couldn’t possibly reconcile the person they were interviewing to the the code that had been submitted. Now while this very rude, I could understand the disconnect, it was really bad .&lt;/p&gt;

&lt;p&gt;It’s very important to take these kinds of experiences with a pinch of salt . They’re not at all an indication of your actual skills . They’re just off days, we all have them and you’re allowed to have them . They’ll just tell a funny story one day. More than anything, they teach you what not to do .&lt;/p&gt;

&lt;h2&gt;
  
  
  LinkedIn
&lt;/h2&gt;

&lt;p&gt;I wouldn’t be doing this list justice if I didn’t mention LinkedIn and how painful it can be there. Don’t get me wrong it’s a good place to find a job , or at least get you in touch with the right people . But, seeing “so and so started a new position” everyday after reading “we regret to inform you” is a special kind of hell. Especially if you follow the company and they’re congratulating everyone. Sometimes this can serve as motivation but on bad days, it’s torture . You need to find a healthy balance for it or it can really leave you feeling defeated. This might sound like you are a hater that can’t celebrate other people’s accomplishments but I think you can be simultaneously happy for people and sad for yourself at the same time. You can still be happy that they’re thriving but still be sad that you’re still in the same place.&lt;/p&gt;

&lt;h2&gt;
  
  
  Almost but Not Quite
&lt;/h2&gt;

&lt;p&gt;For every successful interview, there’s probably a few “We regret to inform you” emails . These interview experiences are probably the most deflating of them all . It’s the ones you’re most excited about because it feels like this might actually be the one. You did everything “right”, you put in hours on Leetcode/HackerRank, you’ve checked with Glassdoor and you’ve done a couple of practice interviews , you even did your affirmations that morning. You’re so deep in interview prep even your YouTube algorithm is stuck on a “Why should we hire you best answer ” loop . The interviews went great; you loved meeting the team, you probably even had a few rounds , they’ve told you everything about the company and sounds just like what you want. I think you get the picture ,you put in the work and if you’re anything like me, you’re cautiously optimistic, without the caution.&lt;/p&gt;

&lt;p&gt;You can tell within the first 5 seconds of the conversation/ email if it’s gonna be a rejection. There’s a tone or certain amount of waffling that happens, almost like filler sentences before they break the news. They sort of recap the process to tell you how well you’ve done only to tell you to kick rocks. I think it’s worse over the phone because you still have to listen to the whole speech and respond with a tone that doesn’t make it awkward for everyone involved. It’s basically the professional version of “it’s not you , it’s me” . I can appreciate that this is probably uncomfortable for the recruiter too, but they can write their own article. Surely they could just send an email saying “Nah sis, this ain’t it” . Obviously I’m joking… Maybe.&lt;/p&gt;

&lt;p&gt;Aside from having to tell your family and friends after all the excitement you had that you got rejected and listen to all the cliches about rejections being redirections . The worst part is having to pick yourself up again , it’s having to somehow find it in yourself to put yourself through all of that again. It’s easier after a bad interview, or helpful feedback because you know what to tackle. But I can’t tackle “The team really loved you, but they’re looking for someone with a bit more experience, please try again in a year or so” . How do I tackle that ? How do I make sure I don’t repeat that same mistake? It’s vague and unhelpful, I could literally just repeat the same year and try again and still fail. I had been very specific about the companies I wanted to apply to and at this point it felt like I was aiming way too high. Somehow with all that doubt, you have to try again with a clear positive mind . It’s the absolute pits.&lt;/p&gt;

&lt;p&gt;Now that I’m done venting, all of these are just a bump in the road. As lame as it sounds, your friends are right about rejection being redirection. Each of them are lessons that will hopefully get you closer to where you want to go. Being kind to yourself throughout this process can go a long way, hard as it is, you shouldn’t take the rejections personally. There is a light at the end of this painful tunnel, I promise. Good Luck :)&lt;/p&gt;

</description>
      <category>jobhunting</category>
      <category>career</category>
      <category>recruiters</category>
      <category>rejection</category>
    </item>
    <item>
      <title>Beginners guide to optimization in C# (Part One)</title>
      <dc:creator>angelamchunu</dc:creator>
      <pubDate>Mon, 04 Nov 2019 14:10:39 +0000</pubDate>
      <link>https://dev.to/angelamchunu/beginners-guide-to-optimization-in-c-part-one-318j</link>
      <guid>https://dev.to/angelamchunu/beginners-guide-to-optimization-in-c-part-one-318j</guid>
      <description>&lt;p&gt;When you’re working on a legacy system, after some time there are bound to be a few issues. It’s an occupational hazard; you have different developers rotated on and off the project, different approaches and different priorities. Depending on the task, efficiency of a solution is usually an afterthought and over time this can cause some slow running queries.&lt;/p&gt;

&lt;p&gt;Tackling slow running queries can be overwhelming, where do you even start? Is it your database, is it your code, is it the network, is it a ghost in the machine. You’ve looked at your profiler and it tells you which method is the time waster but what now? In this two part series I aim to show how changing little things can make quite a difference.&lt;/p&gt;

&lt;p&gt;Part One of my optimization post focuses on the code side of things ; how to get the best out of LINQ by choosing the “right” data structure , deferred execution and your loading strategy.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Data Structures&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Data structures are a way of storing data in an organised manner. Each structure is aimed at being efficient in a particular function, mainly sorting, searching and insertions/deletions. Therefore choosing the right one can save a substantial amount of time. Data structures are important when using LINQ, most beginners default to IEnumerable or Lists which gets the job done but isn’t necessarily optimal. Here are some examples of data structures and how to use each one for the best performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;IEnumerable&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;IEnumerable is an interface that is implemented in most C# collections. They are best used when writing multiple and embedded LINQ queries.&lt;br&gt;
They tend not to fair well with aggregate function such as count , max or average. This is because we don’t have any knowledge of the number of objects in the collection. A common mistake is using the &lt;em&gt;Count()&lt;/em&gt; method which iterates through the entire collection to count each item, needless to say, this is where optimization goes to die. &lt;br&gt;
IEnumerables also aren’t great when it comes to finding a particular value in the collection , it has to iterate through every item until it finds the value which sucks if the value is the last one.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Lists&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Lists are one of the most common data structures, they are a collection of items. They implement IEnumerable interface, they have knowledge of the size of the collection and have indexes. Indexes are keys for finding a specific location, Lists use indexes to find values at a particular position in the collection. For instance if you need the 100th item in the list, it will go to the item directly and retrieve it, unlike having to search 99 items before finding it. This also makes insertions and deletions much easier by providing the index of the item.&lt;/p&gt;

&lt;p&gt;Lists also have their downfalls, they are unable to search for a particular value without the index. So for example if you have a grocery list with Milk, Eggs, Wine and Broccoli and you wanted to find out if you remembered to add Wine on the grocery list. Using a list would not be ideal because it would iterate all items, meaning it would compare “Wine ”with “Milk ”and then “Wine” with “Eggs ”first before reaching “Wine”. This isn’t the worst thing if you only have 4 items, but what happens when you own a chain of restaurants? The list will obviously be more than 4 items , it’s most likely going to be extremely long. Will you iterate the entire list to find one item? In C# a common beginners mistake is using the &lt;em&gt;Contains()&lt;/em&gt; method which does exactly that, when you have large amounts of data this can get slow.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Dictionary&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Dictionaries are optimized for searching a particular item in a collection using key/value pairs. This works by choosing a key which acts as your index . The key is used in a hash function to create a hash value and store the data at that hash value. They are very similar to real life dictionaries , if you are searching for the definition of a word , you would check the index page for the word you are looking for and it gives you the location of the definition. Without the index, you would have to look through all the words in the dictionary until you find the word. Therefore on lookup , the key is used to find the particular value , giving a &lt;em&gt;O(1)&lt;/em&gt; lookup no matter how large the data gets compared to lists which have &lt;em&gt;O(n)&lt;/em&gt; .&lt;/p&gt;

&lt;p&gt;For example, if we have a list of subjects and we want to check if “Theology” exists in this list. As opposed to using the &lt;em&gt;Contains()&lt;/em&gt; method in a List, converting the List to a Dictionary and then searching for it as illustrated below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Dictionary&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;int&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;subjectsDictionary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; 
&lt;span class="nx"&gt;subjectsList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ToDictionary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SubjectName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SubjectID&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;subjectsDictionary&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ContainsKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;Theology&lt;/span&gt;&lt;span class="err"&gt;”&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This also should be used with caution, there is a cost to serializing a List to a Dictionary. The value of converting is seen when you have multiple lookups.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;HashSet&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Hash Set is an implementation of a Set that uses hash functions as its searching optimisation algorithm. Sets are the same as the mathematical definition which is a collection of distinct objects. Meaning it is a collection of objects that ensure there is no duplication. HashSets work very similar to dictionaries because they use a hash function on lookup but differ in that they don’t use key/value pairs, they only store that actual value. They are also optimal in finding a particular value.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Deferred Execution&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The idea of deferred execution is that you only enumerate once the query is filtered to the detail you need it to be. i.e serializing an IEnumerable to a List (calling &lt;em&gt;ToList&lt;/em&gt;) too soon can add extra time to your query. In calling &lt;em&gt;ToList&lt;/em&gt; method, you are bringing the entire list into memory . If the list is not filtered accurately , unnecessary data will be enumerated. Basically, wait to the last possible moment before you enumerate your results . &lt;/p&gt;

&lt;p&gt;Say for example we have two classes, Students and Subjects. We want to use Linq to find the names of students over 25 that are studying Psychology. One possible way of doing it is the example below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;psycStudents&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;students&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SubjectID&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;ToList&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;psycStudentsOverTwentyFive&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;psycStudents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Age&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;Select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;StudentName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code would work, but the problem is that it enumerates before properly filtering. It brings all students that are studying Psychology(SubjectId =1) into memory which is unnecessary because we are only looking for a subset of these students. A better way of writing this query would be :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;psycStudentsOverTwenty&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;students&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;SubjectID&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Age&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;Select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;StudentName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way Linq only returns the data we need and saves time especially if the dataset is large. This can also help when you need to iterate through the items, it ensure that only the items you need are iterated over.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Loading Strategy&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Entity Framework(EF) has 3 ways in which it handles the loading of data: lazy, eager and explicit loading . In this section I will briefly discuss what each strategy means and how to use each one to help optimise your code. The loading strategies are changed at the DbContext (intermediary class between your database and domain classes) level, for the examples let’s call the context VarsityContextEntities.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Lazy Loading&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;This is the most common of the three, the name gives some context into how it loads data. If you are a lazy person , you will do the bare minimum , the same applies with data retrieval . When making a query, only the requested entity is returned and nothing more. EF retrieves data as it is required in the code, so there is not need to load all entities upfront. Lazy loading becomes helpful in one-to-many relationships where one entity is linked to a list of another type of entity. Similar to the Student and Subjects example, each student can have many subjects. If we had to query for all the students, enabling lazy loading would ensure we would only get the Student entity and not Subjects which can save some time. An example in code would be as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;students&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Students&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ToList&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Student&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The issue with lazy loading is that it leads to the N+1 query problem which is when a query is made for the parent entity (Student), there will be one made for each child entity(Subjects) . So instead of making one call to retrieve all entities, N+1 queries are made(N for retrieving the Subjects for each Student and 1 for the initial call for Student) . This causes multiple calls being made to the DB which isn't great for performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Eager Loading&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;When making a query to the database, the requested entity along with all its related entries are returned. For example, if the Student entity was linked to Subjects and Faculty. If eager loading is enabled , when a query for students is made, both Subjects and Faculty entities are retrieved. This becomes useful if both entities are needed, it reduces the number of calls made to the database. A way of implementing eager loading is using the &lt;em&gt;Include()&lt;/em&gt; method , here’s an example of Student being loaded with their respective Subjects and Faculty using eager loading :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;VarsityContextEntities&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;students&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Students&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Subject.Faculty&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FirstOrDefault&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Student&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Eager loading is also a solution for the N+1 problem because all the entities you need are already loaded in just 1 query.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Explicit Loading&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Explicit loading is similar to lazy loading in that it only returns the requested data, but you can explicitly request a particular entity. You tell EF when to load which entity . For example, if we want the students but somewhere later in the scope we would like to use the Subject entity. Instead of making two calls to the database, the first for retrieving Student and the second call to retrieve Subjects, you only make one call. Explicit loading is achieved by using the &lt;em&gt;Load()&lt;/em&gt; method, using the above example, this is how it can be shown in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;VarsityContextEntities&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;students&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Students&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FirstOrDefault&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Student&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Entry&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;Collection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Subject&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;Load&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; 
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As a beginner, C# provides you with quite a few optimisation traps. You just press dot (.) and you are instantly bombarded with a list of options to choose from. It is very easy to just pick the one that sounds closest to what you want without being cognisant of the ramifications. Hopefully this post makes you a bit more aware and intentional in your coding.&lt;/p&gt;

</description>
      <category>optimization</category>
      <category>csharp</category>
      <category>datastructures</category>
      <category>beginners</category>
    </item>
    <item>
      <title>The real reason your “diversity hire” leaves</title>
      <dc:creator>angelamchunu</dc:creator>
      <pubDate>Fri, 05 Jul 2019 14:27:10 +0000</pubDate>
      <link>https://dev.to/angelamchunu/the-real-reason-your-diversity-hire-leaves-2op</link>
      <guid>https://dev.to/angelamchunu/the-real-reason-your-diversity-hire-leaves-2op</guid>
      <description>&lt;p&gt;Contrary to the title above, there are many reasons why people in general leave a company; pay, distance from home, &lt;em&gt;insert generic sugar coated reason for leaving&lt;/em&gt;. But in my experience, diversity hires leave because companies don’t truly believe in diversity as they promised in the interview.&lt;/p&gt;

&lt;p&gt;A company will claim to care about diversity but all the games in break room are enjoyed primarily by men. All executives are men, most events are designed for the men, all executives mingle with the men. This creates a culture that is clearly designed for men, and leaves little room for women to fit in anywhere. I don’t mean that there’s some form of testosterone entry fee, I just mean the culture is brogrammer compliant. There is no active effort to include anyone that is not a quintessential developer.&lt;/p&gt;

&lt;p&gt;Many companies show very little desire to deviate from the norm — if it ain’t broke don’t fix it. They’ve yet to experience the true effects of a diverse team.&lt;/p&gt;

&lt;p&gt;I’m gonna use Hollywood to explain what I mean. Let’s take Brooklyn nine-nine as an example, they are truly a diverse cast. Every character has an equally important role, their roles are independent of their race or gender. If Rosa or Captain Holt left, you would notice, it wouldn’t be the same without anyone of them. They could make an episode with just the 2 of them and it would still be funny. Their differences truly add to the humor of the show and in turn make it great.&lt;/p&gt;

&lt;p&gt;In contrast, if you take a movie like The Other Woman, Nicki Minaj, whom I love, had absolutely no impact on the movie whatsoever. You could take out all her scenes and the movie would make sense. She was clearly there for some quota I’m assuming Hollywood is starting to impose. Many companies that say they care about diversity end up being exactly like this.&lt;/p&gt;

&lt;p&gt;In the tech world, the Nicki equivalent would be the one who always has to do the documentation, gets a report using a script already written for them. They’re always given the same type of mundane tasks while their peers are pushed or mentored. They are left out of design meetings, technology upgrade decisions are made without their input and just overall subtle exclusion.&lt;/p&gt;

&lt;p&gt;A diversity hire dreams of finding a Brooklyn nine-nine job but constantly find themselves in a ‘The Other Woman’ situation. Basically what happens is your diversity hire realizes they deserve better than just being the sassy black friend with great advice and funny one liner jokes. They will leave because they are too qualified to not be taken seriously. They will leave to pursue a challenge that is currently a luxury for their peers. They will leave because brogrammers are gross and no one wants to see that.&lt;/p&gt;

&lt;p&gt;Until companies truly understand the benefits or need for diversity, not just a BEE Score need, then they will most likely always hemorrhage diversity hires.&lt;/p&gt;

</description>
      <category>inclusion</category>
      <category>diversity</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>Consuming a SOAP web service in Jython.</title>
      <dc:creator>angelamchunu</dc:creator>
      <pubDate>Wed, 26 Jun 2019 11:43:02 +0000</pubDate>
      <link>https://dev.to/angelamchunu/consuming-a-soap-web-service-in-jython-2lp9</link>
      <guid>https://dev.to/angelamchunu/consuming-a-soap-web-service-in-jython-2lp9</guid>
      <description>&lt;p&gt;A few months ago I was placed on a project that required an automated process to communicate with an API . The automation was done in Jython, an implementation of Python on the JVM which allows for dynamic compilation of java objects. Basically if you want to use a scripting language packed with a library of tools, you should consider Jython.&lt;/p&gt;

&lt;p&gt;I went through a few approaches before I landed on this one, my first approach was to consume it using Python libraries but the firewall prevented any pip installs. You could try manually install all the dependencies, but why not watch paint dry instead. There is a way around the firewall but it only works if you have the proxy, which I didn’t so I had to find another way.&lt;/p&gt;

&lt;p&gt;The second approach I tried is to consume it directly in java and package it into a jar file and call it in the jython application. This will work but I wouldn’t recommend it because you are managing two separate applications. If something breaks, how do you know where your problem is? Is it Jython or Java? You will have to get the original source code, change it, repackage it and retest. This approach is not easily maintainable, especially if the you leave. All the new developer has is the jar file and debugging becomes painful.&lt;/p&gt;

&lt;p&gt;There’s an easier way to solve this. Jython already allows for Java libraries. Using a Java library with Jython syntax is a much easier way to do this.I decided to go with the SAAJ API and this is how I did it.&lt;/p&gt;

&lt;p&gt;I created a service that returns Beyonce album release dates given the album name(Yes I’m a huge fan).&lt;/p&gt;

&lt;p&gt;The first step is to construct the SOAP message that you’re sending. I did it a little different from the documentation. I added the soap envelope to an xml file, I substituted the parameter (i.e. the album name) with a variable that will be mapped in the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;soapenv:Envelope&lt;/span&gt; &lt;span class="na"&gt;xmlns:soapenv=&lt;/span&gt;&lt;span class="s"&gt;"http://schemas.xmlsoap.org/soap/envelope/"&lt;/span&gt; &lt;span class="na"&gt;xmlns:tem=&lt;/span&gt;&lt;span class="s"&gt;"http://tempuri.org/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;soapenv:Header/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;soapenv:Body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;tem:GetBeyonceAlbumYear&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!--Optional:--&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;tem:albumName&amp;gt;&lt;/span&gt;${albumName}&lt;span class="nt"&gt;&amp;lt;/tem:albumName&amp;gt;&amp;lt;/tem:GetBeyonceAlbumYear&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/soapenv:Body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/soapenv:Envelope&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The mapping of the variables is relatively easy, using the StrSubstitutor method from the apache commons library. Have a look at the code below which maps the variable :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;mapVariableToRequestFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;albumName&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;mapping&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;HashMap&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"albumName"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;albumName&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;xmlFile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pathToXmlRequest&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;fileStream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;FileInputStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;xmlFile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;template&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;IOUtils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fileStream&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;sub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;StrSubstitutor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;mapping&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;template&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next step is to create the actual message that will be sent. The library creates the message from the bytes of the request, we can easily get the bytes from our request returned from mapVariableToRequestFile. Explicit casting is sometimes required, the type that Jython returns might not necessarily be the one you need. In order to use the getBytes() method of the String class, I had to cast request to a String because it was returning a unicode object.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;createSOAPMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
  &lt;span class="n"&gt;messageFactory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;MessageFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;newInstance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="n"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ByteArrayInputStream&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;String&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;getBytes&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
  &lt;span class="n"&gt;soapMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;messageFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;stream&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;soapMessage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;saveChanges&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;soapMessage&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final step is to send the actual message. I did not use any authentication in my example(no cert required) and therefore used the library’s connection method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;sendSoapRequest&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
  &lt;span class="n"&gt;request&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;mapVariableToRequestFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Lemonade"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;soapMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;createSOAPMessage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="n"&gt;soapConnectionFactory&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;SOAPConnectionFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;newInstance&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="n"&gt;soapConnection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;soapConnectionFactory&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;createConnection&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
  &lt;span class="n"&gt;soapResponse&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;soapConnection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;soapMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;soapEndpointUrl&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can easily see the response by writing to system.out and printing it out as follows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;soapResponse&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;writeTo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;println&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method , unlike doing it in java, doesn’t force you to do any error handling. You can add that in yourself like a good developer, the exception types will also have to be imported and handled accordingly.&lt;/p&gt;

&lt;p&gt;Finding a solution for my problem was a whole nightmare for me, here’s to hoping it eliminates that for someone else.&lt;/p&gt;

</description>
      <category>python</category>
      <category>jython</category>
      <category>soap</category>
    </item>
  </channel>
</rss>
